Changes between Version 2 and Version 3 of TrafficModel


Ignore:
Timestamp:
06/23/2019 01:05:57 PM (7 years ago)
Author:
jdalbey
Comment:

fix typo

Legend:

Unmodified
Added
Removed
Modified
  • TrafficModel

    v2 v3  
    2929Reference the [wiki:TrafficModelActivityDiagram Traffic Model Activity Diagram] while reading this section. It helps to describe system behavior. 
    3030 
    31 When the CAD Server starts, the Traffic Model Manager and the Highways model are instantiated. The Traffic Model Manager spawns a thread, the !WriteToJsonThread, which outputs the current traffic conditions on 30 second intervals.  To do so, the !WriteToJsonThread calls upon the Highways class's writeToJson() method. 
     31When the CAD Server starts, the Traffic Model Manager and the Highways model are instantiated. The Traffic Model Manager spawns a thread, the !WriteToJsonThread, which outputs the current traffic conditions on 10 second intervals.  To do so, the !WriteToJsonThread calls upon the Highways class's writeToJson() method. 
    3232 
    3333The CPTMS (running on a separate Apache web server) reads the json data and the traffic conditions are displayed to trainees on the interactive map. 
     
    3737 
    3838==== Behavior ==== #trafficmodelbehavior 
    39 As previously stated, the Traffic Model consists of the Traffic Model Manager and the Highways model. The Traffic Model Manager contains an instance of the Highways class. Both the Traffic Model Manager and the Highways model are instantiated upon CAD Server start up. Once instantiated, the Traffic Model Manager spawns an instance of the !WriteToJsonThread, which sends the current traffic conditions of the Highways to the CPTMS by calling the Highways class' writeToJson() method every 30 seconds. 
     39As previously stated, the Traffic Model consists of the Traffic Model Manager and the Highways model. The Traffic Model Manager contains an instance of the Highways class. Both the Traffic Model Manager and the Highways model are instantiated upon CAD Server start up. Once instantiated, the Traffic Model Manager spawns an instance of the !WriteToJsonThread, which sends the current traffic conditions of the Highways to the CPTMS by calling the Highways class' writeToJson() method every 10 seconds. 
    4040 
    4141The Traffic Model Manager also loads Traffic Events from a batch file into a queue, the eventsQueue, when instantiated. The Traffic Events batch file is specified in the Traffic Model Manager's properties file. A Traffic Event changes the current traffic conditions at a specified location. As the simulation runs, the Traffic Model Manager queries the Coordinator object for the current simulation time, and then checks the queue to see if there are Traffic Events that should be applied to the Highways model at the current simulation time.  When a traffic event occurs the manager requests the Highways model to update itself by altering the state of traffic flow values at specific locations on the highway network.