Changeset 186 in tmcsimulator for trunk/src/atmsdriver/model/LoopDetector.java
- Timestamp:
- 10/28/2017 06:48:11 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/atmsdriver/model/LoopDetector.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/model/LoopDetector.java
r184 r186 68 68 } 69 69 70 /** 71 * Returns the loop metadata in condensed form. 72 * This is just a quick script function to make a proper highway 73 * metadata configuration file, so that we can read the network 74 * faster. 75 * 76 * @return loop metadata 77 */ 78 public String getLoopMeta() 70 /** Returns a string of highways data. If MetaDataOnly is true, you get a full 71 * dump of the highways meta data, which does not include dynamic loop values, 72 * and does include the string location names. If MetaDataOnly is false, 73 * dynamic loop values are included, and unnecessary information like string 74 * location values are included. 75 * 76 * The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly 77 * value of false, over the socket. 78 * 79 * The MetaDataOnly flag should be used to get a full dump of the highways 80 * information. This was used to get the highways_fullmap.txt output. 81 * 82 * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim 83 * @return String, highways data in condensed format 84 */ 85 public String toCondensedFormat(boolean MetaDataOnly) 79 86 { 80 87 StringBuilder build = new StringBuilder(); … … 83 90 build.append(Integer.toString(this.laneNum)); 84 91 build.append(" "); 85 build.append(this.loopLocation); 92 if(!MetaDataOnly) 93 { 94 build.append(" "); 95 build.append(this.occ); 96 build.append(" "); 97 build.append(this.vol); 98 build.append(" "); 99 build.append(this.spd); 100 } 101 else 102 { 103 build.append(this.loopLocation); 104 } 86 105 build.append("\n"); 87 106 return build.toString();
Note: See TracChangeset
for help on using the changeset viewer.
