Changeset 140 in tmcsimulator for trunk/src/tmcsim
- Timestamp:
- 10/18/2017 10:34:17 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/tmcsim/client/ATMSBatchDriver.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/client/ATMSBatchDriver.java
r135 r140 145 145 "config/vds_data/loop.txt", 146 146 "config/vds_data/highwaysMeta.txt", 147 "localhost", 8080); 147 "192.168.251.46", 8080); //IP address of FEP Sim Linux VM 148 // "localhost", 8080); 148 149 // Create console driver but don't start run() method 149 150 console = new ConsoleDriver(highways); … … 217 218 Station.DIRECTION dir = Station.DIRECTION.toDirection(lineScan.next()); 218 219 double postmile = lineScan.nextDouble(); 219 int range = lineScan.nextInt();220 double range = lineScan.nextDouble(); 220 221 ConsoleDriver.DOTCOLOR dotcolor = ConsoleDriver.DOTCOLOR.toDotColor(lineScan.next()); 221 222 // apply colorization to highways … … 255 256 // Read a line and add it to the event queue 256 257 String line = scan.nextLine(); 257 eventQueue.add(line); 258 // Parse the incident from the line 259 Scanner lineScan = new Scanner(line); 260 String incident = lineScan.next(); 261 // Add the line to the list for the corresponding incident 262 List evtList; 263 if (incidents.containsKey(incident)) 264 { 265 evtList = incidents.get(incident); 266 } 267 else 268 { 269 evtList = new ArrayList<String>(); 270 } 271 evtList.add(line); 272 // and put it back in the map 273 incidents.put(incident, evtList); 258 if (line.charAt(0) != '#') 259 { 260 eventQueue.add(line); 261 // Parse the incident from the line 262 Scanner lineScan = new Scanner(line); 263 String incident = lineScan.next(); 264 // Add the line to the list for the corresponding incident 265 List evtList; 266 if (incidents.containsKey(incident)) 267 { 268 evtList = incidents.get(incident); 269 } 270 else 271 { 272 evtList = new ArrayList<String>(); 273 } 274 evtList.add(line); 275 // and put it back in the map 276 incidents.put(incident, evtList); 277 } 274 278 } 275 279 } catch (FileNotFoundException ex) { … … 307 311 Station.DIRECTION dir = Station.DIRECTION.toDirection(lineScan.next()); 308 312 double postmile = lineScan.nextDouble(); 309 int range = lineScan.nextInt();313 double range = lineScan.nextDouble(); 310 314 // apply colorization to highways, forcing to green, indicating cleared 311 315 console.applyColorToHighwayStretch(routeNumber, dir, postmile, range, ConsoleDriver.DOTCOLOR.GREEN);
Note: See TracChangeset
for help on using the changeset viewer.
