Changeset 128 in tmcsimulator for trunk/src/tmcsim/client/ATMSBatchDriver.java
- Timestamp:
- 10/17/2017 09:11:22 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/tmcsim/client/ATMSBatchDriver.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/client/ATMSBatchDriver.java
r127 r128 114 114 /** Instance of ConsoleDriver that contains the highway model */ 115 115 private ConsoleDriver console; 116 116 117 /** GUI for this driver */ 118 private ATMSBatchViewer theView; 119 117 120 /** 118 121 * Constructor. Initialize data from parsed properties file. Create a socket … … 142 145 // READ THE BATCH FILE OF COMMANDS and put in a queue 143 146 readBatchFile(); 147 // Launch the display 148 theView = new ATMSBatchViewer(); 149 theView.setVisible(true); 150 theView.update("0:00", eventQueue); 144 151 // Create a timer that fetches the simulation time every second. 145 152 Timer timer = new Timer(ONE_SECOND, new ActionListener() … … 162 169 System.exit(-1); 163 170 } 164 System.out.println("Current clock: " + currentClock);171 //System.out.println("Current clock: " + currentClock); 165 172 } catch (RemoteException ex) 166 173 { … … 181 188 eventQueue.remove(); 182 189 } 183 System.out.println("Next event will be launched at: " + formatter.format(eventTime)); 190 //System.out.println("Next event will be launched at: " + formatter.format(eventTime)); 191 theView.update(currentClock, eventQueue); 184 192 // Check the queue of events to see if the first 185 193 // item should be launched. IF so, … … 381 389 while (true) 382 390 { 383 // Write the highway network status to the FEP Simulator 384 highways.writeToFEP(); 391 try { 392 // Write the highway network status to the FEP Simulator 393 highways.writeToFEP(); 394 } catch (SimulationException ex) 395 { 396 System.out.println("Skipping writeToFEP..."); 397 } 385 398 386 399 // Wait for FEP Sim to process the data we just sent
Note: See TracChangeset
for help on using the changeset viewer.
