Changeset 407 in tmcsimulator for trunk/src/tmcsim
- Timestamp:
- 05/16/2019 01:02:37 PM (7 years ago)
- Location:
- trunk/src/tmcsim
- Files:
-
- 4 edited
-
application.properties (modified) (1 diff)
-
cadsimulator/CADServer.java (modified) (2 diffs)
-
cadsimulator/Coordinator.java (modified) (4 diffs)
-
cadsimulator/managers/TrafficModelManager.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/application.properties
r398 r407 1 #Thu, 25 Apr 2019 16:57:59-07001 #Thu, 16 May 2019 14:30:48 -0700 2 2 3 Application.revision= 3973 Application.revision=406 4 4 5 Application.buildnumber=13 75 Application.buildnumber=138 -
trunk/src/tmcsim/cadsimulator/CADServer.java
r382 r407 129 129 * Class name of desired user interface. 130 130 */ 131 USER_INTERFACE("UserInterface"); 131 USER_INTERFACE("UserInterface"), 132 /** 133 * Filepath to which is written the simulation time. 134 */ 135 ELAPSED_TIME_FILE("ElapsedTimeFile"); 136 132 137 public String name; 133 138 … … 240 245 theModel = new CADSimulatorState(); 241 246 theModel.addObserver(theViewer); 242 243 theCoordinator = new Coordinator(theModel); 247 /** Load the simulation time filename from properties */ 248 String simTimeFilename = 249 cadServerProperties.getProperty( 250 CAD_PROPERTIES.ELAPSED_TIME_FILE.name); 251 if (simTimeFilename == null) 252 { 253 cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 254 propertiesFile + " missing property for " + CAD_PROPERTIES.ELAPSED_TIME_FILE.name); 255 throw new SimulationException(SimulationException.PROPERTY_MISSING_ERROR); 256 } 257 theCoordinator = new Coordinator(theModel, simTimeFilename); 244 258 245 259 startRegistry(Integer.parseInt( -
trunk/src/tmcsim/cadsimulator/Coordinator.java
r376 r407 31 31 import tmcsim.cadsimulator.managers.ParamicsSimulationManager; 32 32 import tmcsim.cadsimulator.managers.SimulationClockManager; 33 import tmcsim.cadsimulator.managers.TrafficModelManager; 34 import static tmcsim.cadsimulator.managers.TrafficModelManager.loadProperties; 33 35 import tmcsim.cadsimulator.viewer.model.CADSimulatorState; 34 36 import tmcsim.client.cadclientgui.CardfileReader; … … 96 98 * The name of the file where the simulation clock time is written 97 99 */ 98 p ublic static finalString kSimClockFilename = "webapps" +100 private String kSimClockFilename = "webapps" + 99 101 System.getProperty("file.separator") + "dynamicdata" + 100 System.getProperty("file.separator") + "sim_elapsedtime.json"; 102 System.getProperty("file.separator") + "sim_elapsedtime.json"; 101 103 /** 102 104 * Error logger. … … 119 121 private static CardfileData cardfileData; 120 122 private CADSimulatorState cadModel; 121 123 122 124 /** 123 125 * Constructor. Call UnicastRemoteObject constructor and call … … 126 128 * @throws RemoteException 127 129 */ 128 public Coordinator(CADSimulatorState model ) throws RemoteException130 public Coordinator(CADSimulatorState model, String simTimeFilename) throws RemoteException 129 131 { 130 132 super(); 131 133 cadModel = model; 134 kSimClockFilename = simTimeFilename; 132 135 clientList = new LinkedList<CADClientInterface>(); 133 136 cadData = new CADData(); -
trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java
r345 r407 64 64 EVENTS_FILE("Events_File"), 65 65 OUTPUT_DEST("Output_Destination"), 66 JSON_PATH("Json_Path");66 HIGHWAY_STATUS_FILE("Highway_Status_File"); 67 67 68 68 public String name; … … 123 123 { 124 124 props = loadProperties(propertiesFile); 125 jsonPath = props.getProperty(PROPERTIES. JSON_PATH.name);125 jsonPath = props.getProperty(PROPERTIES.HIGHWAY_STATUS_FILE.name); 126 126 //logger.logp(Level.INFO, "Traffic Manager", "Constructor", 127 127 // "Highway network json output: " + jsonPath);
Note: See TracChangeset
for help on using the changeset viewer.
