Changeset 186 in tmcsimulator for trunk/src/atmsdriver/model/Highways.java
- Timestamp:
- 10/28/2017 06:48:11 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/atmsdriver/model/Highways.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/model/Highways.java
r184 r186 354 354 } 355 355 } 356 357 /** 358 * Returns the highways metadata in condensed form. This function took the 359 * highways model and wrote it into condensed form. It is also useful for 360 * testing. 361 * 362 * @return the highways meta data string 363 */ 364 public String getHighwaysMeta() 365 { 366 StringBuilder build = new StringBuilder(); 367 build.append(lines.size()); 368 build.append("\n"); 369 for (FEPLine line : lines) 370 { 371 build.append(line.getLineMeta()); 372 } 373 return build.toString(); 374 } 375 356 357 /** Returns a string of highways data. If MetaDataOnly is true, you get a full 358 * dump of the highways meta data, which does not include dynamic loop values, 359 * and does include the string location names. If MetaDataOnly is false, 360 * dynamic loop values are included, and unnecessary information like string 361 * location values are included. 362 * 363 * The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly 364 * value of false, over the socket. 365 * 366 * The MetaDataOnly flag should be used to get a full dump of the highways 367 * information. This was used to get the highways_fullmap.txt output. 368 * 369 * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim 370 * @return String, highways data in condensed format 371 */ 372 public String toCondensedFormat(boolean MetaDataOnly) 373 { 374 StringBuilder build = new StringBuilder(); 375 build.append(lines.size()); 376 build.append("\n"); 377 for(FEPLine line : lines) 378 { 379 build.append(line.toCondensedFormat(MetaDataOnly)); 380 } 381 return build.toString(); 382 } 383 376 384 /** 377 385 * Returns the Highways model data in XML format.
Note: See TracChangeset
for help on using the changeset viewer.
