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

The Traffic Visualization Module includes 2D/3D Visualization Systems which generate 2D and 3D representations of the simulation and provide tools for users to interact with the traffic simulation at run-time (e.g., trigger events, modify agent properties). These systems also include the Editing System which allow users of the simulation to specify virtual traffic environments (e.g., build a virtual city) and modify them at run-time (e.g., add/edit/delete environment objects).

1. Tunning the “traffic-visualization” module configuration

We start by tunning the POM configuration of the “traffic-visualiation” module to manage its dependencies.

Configuration Steps:

    1. Double click on the “pom.xml” file located inside the “traffic-visualization” module. The Maven POM Editor should appear.
    2. In the opened window, click on the “pom.xml” tab. The content of the project object model (POM) should be displayed in XML format as follows:
      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <!-- ======================================= -->
         <!-- ==== Project Information === -->
         <!-- ======================================= -->
         <parent>
            <groupId>edu.utdallas.mavs.traffic</groupId>
            <artifactId>traffic</artifactId>
            <version>1.0.0-SNAPSHOT</version>
         </parent>
         <artifactId>traffic-visualization</artifactId>
         <name>traffic-visualization</name>
         <description>Visualization of the traffic system</description>
         <packaging>jar</packaging>
      </project>
    3. Add the following dependencies’ configuration to include the dependencies used by the traffic visualization module. You should be careful here, the group information should match to the information you used in Tutorial 1. The content of the project object model (POM) should be as follows:
      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <!-- ======================================= -->
         <!-- ==== Project Information === -->
         <!-- ======================================= -->
         <parent>
            <groupId>edu.utdallas.mavs.traffic</groupId>
            <artifactId>traffic</artifactId>
            <version>1.0.0-SNAPSHOT</version>
         </parent>
         <artifactId>traffic-visualization</artifactId>
         <name>traffic-visualization</name>
         <description>Visualization of the traffic system</description>
         <packaging>jar</packaging>
         <!-- ======================================= -->
         <!-- ==== Dependencies === -->
         <!-- ======================================= -->
         <dependencies>
            <!-- Project Dependencies -->
            <dependency>
               <groupId>edu.utdallas.mavs.traffic</groupId>
               <artifactId>traffic-simulation</artifactId>
               <version>1.0.0-SNAPSHOT</version>
            </dependency>
            <!-- General Dependencies -->
            <dependency>
               <groupId>edu.utdallas.mavs.divas</groupId>
               <artifactId>divas-core</artifactId>
               <version>${divas.version}</version>
            </dependency>
            <dependency>
               <groupId>edu.utdallas.mavs.divas</groupId>
               <artifactId>divas-mts</artifactId>
               <version>${divas.version}</version>
            </dependency>
            <dependency>
               <groupId>edu.utdallas.mavs.divas</groupId>
               <artifactId>divas-utils</artifactId>
               <version>${divas.version}</version>
            </dependency>
            <dependency>
               <groupId>edu.utdallas.mavs.divas</groupId>
               <artifactId>divas-visualization</artifactId>
               <version>${divas.version}</version>
            </dependency>
            <dependency>
               <groupId>com.google.inject</groupId>
               <artifactId>guice</artifactId>
               <version>${guice.version}</version>
            </dependency>
            <dependency>
               <groupId>org.apache.activemq</groupId>
               <artifactId>activemq-core</artifactId>
               <version>${activeMQ.version}</version>
            </dependency>
            <dependency>
               <groupId>org.apache.xmlbeans</groupId>
               <artifactId>xmlbeans</artifactId>
               <version>2.5.0</version>
            </dependency>
            <dependency>
               <groupId>jme3</groupId>
               <artifactId>vecmath</artifactId>
               <version>${jmonkey.version}</version>
            </dependency>
            <!-- Nifty GUI -->
            <dependency>
               <groupId>jme3</groupId>
               <artifactId>jME3-niftygui</artifactId>
               <version>${jmonkey.version}</version>
            </dependency>
            <dependency>
               <groupId>lessvoid</groupId>
               <artifactId>nifty</artifactId>
               <version>${nifty.version}</version>
            </dependency>
            <dependency>
               <groupId>jme3</groupId>
               <artifactId>nifty-default-controls</artifactId>
               <version>${jmonkey.version}</version>
            </dependency>
            <dependency>
               <groupId>jme3</groupId>
               <artifactId>nifty-style-black</artifactId>
               <version>${jmonkey.version}</version>
            </dependency>
         </dependencies>
      </project>

2. Creating the inner packages

    1. Right click on the folder”src/main/java” > New > Package and create a package named “edu.utdallas.mavs.traffic.visualization”. You can use your own rules to name the package.
    2. In the same way, create the following sub-packages inside the package “edu.utdallas.mavs.traffic.visualization”:
      1. vis2D
      2. vis3D
      3. guice