Changeset 87 in tmcsimulator for trunk/src/atmsdriver/model/LoopDetector.java


Ignore:
Timestamp:
10/10/2017 01:09:50 AM (9 years ago)
Author:
jtorres
Message:

merged branches/trunk into regular tmcsim/trunk. Changed Network.java to Highways.java. Highways.java: added writeToFEP(), updateSequences(), loadHighways(), and writeHighwaysMeta(). writeToFEP() is a socket client that communicates with FEPSimulator socket server. updateSequences() updates global and schedule sequences per the existing UCI plugin code and may not be necessary. loadHighways() loads the ArrayList? of Highways used in highways class, in sorted order. Stations are now implementing comparable to sort by postmile. writeHighwaysMeta() is an attempt at writing the highways meta data in condensed form, because loading time in NetworkLoader? is super long. We will eventually get rid of NetworkLoader? and do it within the Highways class for good OOP practice. There are new properties in atms_driver_properties.properties in config to support all these changes. Highway.java: new class, represents a highway which is a sorted ArrayList? of stations. This is a good checkpoint, for persistent green dots and all is working within the triangle. There is much commented out code in Highways.java which does not quite work. This commented code is an attempt at writing the condensed form highway meta data to improve loading times as described above.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/atmsdriver/model/LoopDetector.java

    r79 r87  
    5757    } 
    5858     
     59    /** 
     60     * Returns the loop metadata in condensed form. 
     61     * This is just a quick script function to make a proper highway 
     62     * metadata configuration file, so that we can read the network 
     63     * faster. 
     64     *  
     65     * @return loop metadata 
     66     */ 
     67    public String getLoopMeta() 
     68    { 
     69        StringBuilder build = new StringBuilder(); 
     70        build.append(Integer.toString(this.loopID)); 
     71        build.append(" "); 
     72        build.append(Integer.toString(this.laneNum)); 
     73        build.append(" "); 
     74        build.append(this.loopLocation); 
     75        build.append("\n"); 
     76        return build.toString(); 
     77    } 
     78     
    5979    /**  
    6080     * Updates loop detector dynamic attributes. 
Note: See TracChangeset for help on using the changeset viewer.