Changeset 474 in tmcsimulator for trunk


Ignore:
Timestamp:
08/21/2019 02:09:50 PM (7 years ago)
Author:
jdalbey
Message:

TrafficEventsAnimator? updated for revised highway model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/highwaymodel/TrafficEventsAnimator.java

    r457 r474  
    4545    private final LinkedList<TrafficEvent> eventQueue; 
    4646    /** 
    47      * Map of incidents to events 
    48      */ 
    49     private Map<String, List<TrafficEvent>> incidents; 
    50     /** 
    5147     * Highway history 
    5248     */ 
     
    6460 
    6561        // Initialize the highway model 
    66         incidents = new HashMap<String, List<TrafficEvent>>(); 
    6762        highways = new Highways( 
    68                 "config/vds_data/highways_fullmap.txt"); 
     63                "config/vds_data/postmile_coordinates.txt"); 
    6964        final String CONFIG_FILE_NAME = "traffic_model_config.properties"; 
    7065        String propertiesFile = "config" + System.getProperty("file.separator")  
    71                  + CONFIG_FILE_NAME; 
     66                 + "traffic_model_config" + System.getProperty("file.separator")  + CONFIG_FILE_NAME; 
    7267        Properties props = TrafficModelManager.loadProperties(propertiesFile); 
    7368        events_file = props.getProperty("Events_File"); 
     
    8681        eventQueue = TrafficModelManager.readBatchFile(fileScanner); 
    8782    } 
    88     /** Load the traffic events into a history buffer */ 
     83    /** Load the traffic events into a history buffer.  This */ 
    8984    public void load() 
    9085    { 
     
    10095            highways.applyColorToHighwayStretch(nextEvent.routeNumber, nextEvent.dir, 
    10196                    nextEvent.postmile, nextEvent.range, nextEvent.color); 
     97            // get the highwys as a string and add to the history list 
    10298            history.add(highways.toString()+"\n"+nextEvent.eventTime); 
    10399            // Remove this event from the queue, we're done with it. 
Note: See TracChangeset for help on using the changeset viewer.