Changeset 186 in tmcsimulator for trunk/src/atmsdriver/model/Station.java
- Timestamp:
- 10/28/2017 06:48:11 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/atmsdriver/model/Station.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/model/Station.java
r184 r186 88 88 return oppTotVol; 89 89 } 90 91 /** 92 * Returns the station metadata in condensed form. This is just a quick 93 * script function to make a proper highway metadata configuration file, so 94 * that we can read the network faster. 95 * 96 * @return station metadata 97 */ 98 public String getStationMeta() 90 91 /** Returns a string of highways data. If MetaDataOnly is true, you get a full 92 * dump of the highways meta data, which does not include dynamic loop values, 93 * and does include the string location names. If MetaDataOnly is false, 94 * dynamic loop values are included, and unnecessary information like string 95 * location values are included. 96 * 97 * The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly 98 * value of false, over the socket. 99 * 100 * The MetaDataOnly flag should be used to get a full dump of the highways 101 * information. This was used to get the highways_fullmap.txt output. 102 * 103 * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim 104 * @return String, highways data in condensed format 105 */ 106 public String toCondensedFormat(boolean MetaDataOnly) 99 107 { 100 108 StringBuilder build = new StringBuilder(); … … 111 119 build.append(Integer.toString(loops.size())); 112 120 build.append(" "); 113 build.append(this.location); 121 if(MetaDataOnly) 122 { 123 build.append(this.location); 124 } 114 125 build.append("\n"); 115 126 for (LoopDetector loop : loops) 116 127 { 117 build.append(loop. getLoopMeta());128 build.append(loop.toCondensedFormat(MetaDataOnly)); 118 129 } 119 130 return build.toString();
Note: See TracChangeset
for help on using the changeset viewer.
