Changeset 422 in tmcsimulator for trunk/src/atmsdriver


Ignore:
Timestamp:
06/23/2019 10:27:35 AM (7 years ago)
Author:
jdalbey
Message:

Remove ATMS functionality. Reworked and simplified the Highway model to use only VDS data from PeMS. Updated all unit tests.

Location:
trunk/src/atmsdriver
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/atmsdriver/ConsoleTrafficDriver.java

    r255 r422  
    11package atmsdriver; 
    22 
    3 import atmsdriver.model.Highways; 
    4 import atmsdriver.model.Station.DIRECTION; 
    5 import atmsdriver.model.Highway; 
    6 import atmsdriver.model.Station; 
    7 import atmsdriver.model.LoopDetector.DOTCOLOR; 
     3import tmcsim.highwaymodel.Highways; 
     4import tmcsim.highwaymodel.Station.DIRECTION; 
     5import tmcsim.highwaymodel.Highway; 
     6import tmcsim.highwaymodel.Station; 
     7import tmcsim.highwaymodel.LoopDetector.DOTCOLOR; 
    88import java.io.FileInputStream; 
    99import java.util.ArrayList; 
     
    4949                // Create the Highway Model 
    5050                Highways highways = new Highways( 
    51                     "config/vds_data/highways_fullmap.txt", 
    52                     ConsoleDriverProperties.getProperty( 
    53                         "FEPWriterHost"), 
    54                     Integer.parseInt(ConsoleDriverProperties.getProperty( 
    55                         "FEPWriterPort"))); 
     51                    "config/vds_data/highways_fullmap.txt"); 
    5652 
    5753                // Construct the console driver using the highways model 
     
    139135            { 
    140136                // Send highway model to FEP for transmit to ATMS 
    141                 try { 
    142                     highways.writeToFEP(); 
    143                 } catch (SimulationException ex) { 
    144                     System.out.println("Skipping writeToFEP..."); 
    145                 } 
     137                highways.toJson(); 
    146138                System.out.println("Add another entry or Quit? (A/Q)"); 
    147139                choice = sc.next().toUpperCase().trim().charAt(0); 
  • trunk/src/atmsdriver/GoogleMapAnimator.java

    r340 r422  
    11package atmsdriver; 
    22 
    3 import atmsdriver.model.Highways; 
    4 import atmsdriver.model.TrafficEvent; 
     3import tmcsim.highwaymodel.Highways; 
     4import tmcsim.highwaymodel.TrafficEvent; 
    55import java.io.FileInputStream; 
    66import java.io.FileNotFoundException; 
     
    6767        incidents = new HashMap<String, List<TrafficEvent>>(); 
    6868        highways = new Highways( 
    69                 "config/vds_data/highways_fullmap.txt", 
    70                 // following aren't used by this application 
    71                 "localhost", 8080); 
     69                "config/vds_data/highways_fullmap.txt"); 
    7270        final String CONFIG_FILE_NAME = "traffic_model_config.properties"; 
    7371        String propertiesFile = "config" + System.getProperty("file.separator")  
  • trunk/src/atmsdriver/TrafficEventsAnimator.java

    r246 r422  
    11package atmsdriver; 
    22 
    3 import atmsdriver.model.Highways; 
    4 import atmsdriver.model.TrafficEvent; 
     3import tmcsim.highwaymodel.Highways; 
     4import tmcsim.highwaymodel.TrafficEvent; 
    55import java.io.FileInputStream; 
    66import java.io.FileNotFoundException; 
     
    6666        incidents = new HashMap<String, List<TrafficEvent>>(); 
    6767        highways = new Highways( 
    68                 "config/vds_data/highways_fullmap.txt", 
    69                 // following aren't used by this application 
    70                 "localhost", 8080); 
     68                "config/vds_data/highways_fullmap.txt"); 
    7169        final String CONFIG_FILE_NAME = "traffic_model_config.properties"; 
    7270        String propertiesFile = "config" + System.getProperty("file.separator")  
  • trunk/src/atmsdriver/trafficeventseditor/TimeFrames.java

    r240 r422  
    1 /* 
    2  * To change this license header, choose License Headers in Project Properties. 
    3  * To change this template file, choose Tools | Templates 
    4  * and open the template in the editor. 
    5  */ 
     1 
    62package atmsdriver.trafficeventseditor; 
    73 
    8 import atmsdriver.model.Highway; 
    9 import atmsdriver.model.Highways; 
    10 import atmsdriver.model.LoopDetector; 
    11 import atmsdriver.model.LoopDetector.DOTCOLOR; 
    12 import atmsdriver.model.Station; 
     4import tmcsim.highwaymodel.Highway; 
     5import tmcsim.highwaymodel.Highways; 
     6import tmcsim.highwaymodel.LoopDetector; 
     7import tmcsim.highwaymodel.LoopDetector.DOTCOLOR; 
     8import tmcsim.highwaymodel.Station; 
    139import java.util.ArrayList; 
    1410import java.util.List; 
     
    3531    { 
    3632        frames = new ArrayList<>(); 
    37         highways = new Highways("./config/vds_data/highways_fullmap.txt",  
    38                 "192.168.251.46", 8080); 
     33        highways = new Highways("./config/vds_data/postmile_coordinates.txt"); 
    3934    } 
    4035     
     
    194189    void writeToFEP() 
    195190    { 
    196         try 
    197         { 
    198             highways.writeToFEP(); 
    199         }  
    200         catch (SimulationException ex) 
    201         { 
    202             System.out.println("writeToFEP() failed"); 
    203         } 
     191            highways.toJson(); 
    204192    } 
    205193 
  • trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java

    r343 r422  
    11package atmsdriver.trafficeventseditor; 
    22 
    3 import atmsdriver.model.Highway; 
    4 import atmsdriver.model.LoopDetector; 
    5 import atmsdriver.model.LoopDetector.DOTCOLOR; 
    6 import atmsdriver.model.Station; 
     3import tmcsim.highwaymodel.Highway; 
     4import tmcsim.highwaymodel.LoopDetector; 
     5import tmcsim.highwaymodel.LoopDetector.DOTCOLOR; 
     6import tmcsim.highwaymodel.Station; 
    77import timeselector.*; 
    88import java.io.File; 
  • trunk/src/atmsdriver/trafficeventseditor/TrafficLaneEvent.java

    r238 r422  
    11package atmsdriver.trafficeventseditor; 
    22 
    3 import atmsdriver.model.LoopDetector; 
    4 import atmsdriver.model.LoopDetector.DOTCOLOR; 
    5 import atmsdriver.model.Station; 
     3import tmcsim.highwaymodel.LoopDetector; 
     4import tmcsim.highwaymodel.LoopDetector.DOTCOLOR; 
     5import tmcsim.highwaymodel.Station; 
    66 
    77/** 
Note: See TracChangeset for help on using the changeset viewer.