+1 (972) 883-2091
ECSS 4.220, 800 W Campbell Rd, Richardson, TX 75083–0688, US

Running the Traffic Simulation System

As mentioned in the tutorials, the simulation host and the visualization and editing system are totally decoupled in DIVAs. Both components reside on isolated execution environments running on the same host machine. This approach allows for multiple concurrent visualizations providing multiple perspectives of a single simulation, and multiple concurrent users interactions.

To start the simulation:

First, we start the simulation service. This is done by: Right click the class “TrafficMain.java” > Run As > Java Application

Running-Simulation

As we can see in the follwing figure that shows the console, the traffic simulation is created and initialized to be run at the localhost with the IP address 0.0.0.0 using the port 24555. Also, the default environment is loaded into the simulation.

Running-Simulation

Once the simulation is running, we start the simulation GUI and we connect to the simulation. This is done by:

    1. Right click the class “TrafficGui.java” > Run As > Java Application

Running-Simulation

    1. On the pop-up window, make sure to set the connection type tp “local” and the “Port” to “24555”.
    2. Press “Connect”

Running-Simulation

Now, a connection is esatblished between the GUI and the simulation service. We can control the simulation using the GUI panel. For instance, we can run the simulation byh pressing the “Run Simulation” button.

Running-Simulation

The simulation status is also displayed on the GUI to show useful information to the user as illustrated in the following figure:

Running-Simulation