Changeset 345 in tmcsimulator for trunk


Ignore:
Timestamp:
03/24/2019 09:48:29 AM (7 years ago)
Author:
jdalbey
Message:

minor changes to output messages to get unit tests to pass. All passing now.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/paramics_communicator.log

    r261 r345  
    33<log> 
    44<record> 
    5   <date>2017-11-06T14:55:23</date> 
    6   <millis>1510008923085</millis> 
     5  <date>2019-03-24T11:14:51</date> 
     6  <millis>1553451291453</millis> 
    77  <sequence>1</sequence> 
    88  <logger>tmcsim.parmicsLog</logger> 
  • trunk/paramics_status.xml

    r340 r345  
    1 <Paramics> 
    2    <Network_Status>LOADING</Network_Status> 
    3    <Network_ID>1</Network_ID> 
    4 </Paramics> 
  • trunk/src/atmsdriver/model/Highways.java

    r343 r345  
    181181 
    182182        // postmiles increase from s to n and w to e 
    183         // if the direction is south or west 
     183        // handle increasing postmile directinons (north or east) 
    184184        if (direction.equals(Station.DIRECTION.NORTH) || direction.equals(Station.DIRECTION.EAST)) 
    185185        { 
     
    201201                } 
    202202            } 
    203         } // if the direction is north or east  
     203        }  
     204        // handle decreasing postmile directions (south or west)  
    204205        else 
    205206        { 
  • trunk/src/tmcsim/application.properties

    r343 r345  
    1 #Sat, 23 Mar 2019 19:09:36 -0700 
     1#Sun, 24 Mar 2019 11:13:40 -0700 
    22 
    3 Application.revision=342 
     3Application.revision=344 
    44 
    5 Application.buildnumber=108 
     5Application.buildnumber=110 
  • trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java

    r277 r345  
    124124            props = loadProperties(propertiesFile); 
    125125            jsonPath = props.getProperty(PROPERTIES.JSON_PATH.name); 
    126             logger.logp(Level.INFO, "Traffic Managr", "Constructor",  
    127                     "Highway network json output: " + jsonPath); 
     126            //logger.logp(Level.INFO, "Traffic Manager", "Constructor",  
     127            //        "Highway network json output: " + jsonPath); 
    128128            // Initialize the highway model 
    129129            incidents = new HashMap<String, List<TrafficEvent>>(); 
     
    422422                 // Write the highway network status to the Console 
    423423                 System.out.println(highways.toString()); 
    424                 // Output the highway model  
    425                 String geojson = highways.toJson(); 
    426                 //System.out.println(geojson); // diagnostic 
    427                 PrintWriter out; 
    428                 try 
    429                 { 
    430                     out = new PrintWriter("highways.json"); 
    431                     out.print(geojson); 
    432                     out.close(); 
    433                 } 
    434                 catch (FileNotFoundException ex) 
    435                 { 
    436                     Logger.getLogger(GoogleMapAnimator.class.getName()).log(Level.SEVERE, null, ex); 
    437                 } 
    438                 // Wait for Google Map to process the data we just sent 
    439                 try 
    440                 { 
    441                     Thread.sleep(5000); 
     424                // Pause the thread 
     425                try 
     426                { 
     427                    Thread.sleep(10000); 
    442428                } 
    443429                catch (InterruptedException ie) 
     
    478464                try 
    479465                { 
    480                     Thread.sleep(30000); 
     466                    Thread.sleep(10000); 
    481467                } 
    482468                catch (InterruptedException ie) 
  • trunk/src/tmcsim/utilities/BuildHighwayFile.java

    r338 r345  
    281281     * in loop file. 
    282282     */ 
    283     private void showLeftoverVDS() 
     283    public void showLeftoverVDS() 
    284284    { 
    285285        Set<String> vdsItems = vdsDict.keySet(); // get all the VDS ids 
     
    303303        app.createLanelookup(); 
    304304        app.createHighwayFile(); 
    305         app.showLeftoverVDS(); 
    306305        System.out.println("Build complete, output file: "+highwayFile); 
    307306    } 
  • trunk/test/tmcsim/cadsimulator/CADSimulatorConsoleTest.java

    r228 r345  
    7575        fullExpect = fullExpect.replaceAll("\n", ","); 
    7676//        System.out.println(fullExpect); 
    77 //        System.out.println(result.substring(result.length() - fullExpect.length(), result.length())); 
     77        System.out.println(result.substring(result.length() - fullExpect.length(), result.length())); 
    7878//        String diff = StringUtils.difference(fullExpect, result); 
    7979        boolean match = result.endsWith(fullExpect); 
     
    276276            +"Events_File = config/vds_data/atmsBatchEvents.txt\n" 
    277277            +"FEPSim_IP_addr = localhost\n" 
    278             +"Output_Destination = Console\n"; 
     278            +"Output_Destination = Console\n" 
     279            +"Json_Path = /tmp/highway_status.json\n"; 
    279280    static final String paramicsData = "ParamicsCommHost = 127.0.0.1\n" 
    280281            + "ParamicsCommPort       = 4450\n" 
     
    303304        cf.delete(); 
    304305        writedata("config.txt", configData); 
     306        File tf = new File ("tconfig.txt"); 
     307        tf.delete(); 
    305308        writedata("tconfig.txt", trafficMgrData); 
    306309        writedata("pconfig.txt", paramicsData); 
  • trunk/test/tmcsim/utilities/BuildHighwayFileTest.java

    r338 r345  
    2929    } 
    3030 
    31     public void testCreateVDSlookup() 
     31    /** Just a smoke test to see if it creates the output file */ 
     32    public void testCheckFileCreated() 
    3233    { 
    3334        System.out.println("createVDSlookup"); 
    34         BuildHighwayFile instance = new BuildHighwayFile(); 
    35         instance.createLanelookup(); 
     35        BuildHighwayFile app = new BuildHighwayFile(); 
     36        app.createLDSdict(); 
     37        app.createVDSdict(); 
     38        app.createLanelookup(); 
     39        app.createHighwayFile(); 
     40        app.showLeftoverVDS(); 
     41 
    3642        String filename = BuildHighwayFile.dirpath +BuildHighwayFile.loopFileName; 
    3743        File f = new File(filename); 
  • trunk/webapps/highway_status.json

    r340 r345  
    23582358       }, 
    23592359   "properties":  
    2360        {"street": "MACARTHU1", "color": "red", "perpx": "-0.710326", "perpy": "0.703873"} 
     2360       {"street": "MACARTHU1", "color": "lime", "perpx": "-0.710326", "perpy": "0.703873"} 
    23612361},   
    23622362{ 
     
    23692369       }, 
    23702370   "properties":  
    2371        {"street": "MACARTHU1", "color": "red", "perpx": "0.740557", "perpy": "-0.671994"} 
     2371       {"street": "MACARTHU1", "color": "lime", "perpx": "0.740557", "perpy": "-0.671994"} 
    23722372},   
    23732373{ 
     
    23802380       }, 
    23812381   "properties":  
    2382        {"street": "MACARTHU2", "color": "yellow", "perpx": "-0.710326", "perpy": "0.703873"} 
     2382       {"street": "MACARTHU2", "color": "lime", "perpx": "-0.710326", "perpy": "0.703873"} 
    23832383},   
    23842384{ 
     
    23912391       }, 
    23922392   "properties":  
    2393        {"street": "MACARTHU2", "color": "yellow", "perpx": "0", "perpy": "0"} 
     2393       {"street": "MACARTHU2", "color": "lime", "perpx": "0", "perpy": "0"} 
    23942394},   
    23952395{ 
Note: See TracChangeset for help on using the changeset viewer.