Ignore:
Timestamp:
11/06/2017 03:27:20 PM (8 years ago)
Author:
jdalbey
Message:

System Tests updated to work with new integrated Traffic Mgr. All system tests now passing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java

    r220 r228  
    8585     * Highways in traffic network 
    8686     */ 
    87     final private Highways highways; 
     87    private Highways highways; 
    8888 
    8989    /** 
     
    100100     */ 
    101101    private String currentClock = ""; 
    102      
    103     
     102       
    104103    /** 
    105104     * Constructor. Loads the Properties file and initializes the 
     
    113112            throws SimulationException  
    114113    { 
    115         props = loadProperties(propertiesFile); 
    116         // Initialize the highway model 
    117         incidents = new HashMap<String, List<TrafficEvent>>(); 
    118         highways = new Highways( 
    119                 props.getProperty(PROPERTIES.HIGHWAYS_MAP_FILE.name), 
    120                 props.getProperty(PROPERTIES.FEPSIM_IP_ADDR.name), 
    121                 8080);  
    122         this.theCoordinator = theCoordinator; 
     114        try  
     115        { 
     116            props = loadProperties(propertiesFile); 
     117            // Initialize the highway model 
     118            incidents = new HashMap<String, List<TrafficEvent>>(); 
     119            highways = new Highways( 
     120                    props.getProperty(PROPERTIES.HIGHWAYS_MAP_FILE.name), 
     121                    props.getProperty(PROPERTIES.FEPSIM_IP_ADDR.name), 
     122                    8080);  
     123            this.theCoordinator = theCoordinator; 
     124        } 
     125        catch (Exception e)  
     126        { 
     127            logger.logp(Level.SEVERE, "Traffic Manager", "Constructor", 
     128                    "Exception in parsing properties file.", e); 
     129        } 
    123130    } 
    124131    /** 
     
    129136    { 
    130137        loadEvents(); 
    131          
     138 
    132139        // Create a timer that fetches the simulation time every second. 
    133140        Timer timer = new Timer(ONE_SECOND, new ActionListener() 
     
    201208            wtConsole.start(); 
    202209        } 
    203          
    204210    } 
    205211    /** Accessor to event queue 
     
    421427            System.out.println("WriteToFEP Thread starting."); 
    422428            // Run indefinitely 
    423             while (true) 
     429            boolean running = true; 
     430            while (running) 
    424431            { 
    425432                try 
     
    431438                { 
    432439                    // Ask user if they want to proceed without FEP Sim connection 
    433                     int reply = JOptionPane.showConfirmDialog(null, "Failed to connect to FEP Sim, proceed anyway?", "Network Failure", JOptionPane.YES_NO_OPTION); 
    434                     if (reply == JOptionPane.NO_OPTION) 
    435                     { 
    436                         System.exit(0); 
    437                     } 
     440//                    int reply = JOptionPane.showConfirmDialog(null, "Failed to connect to FEP Sim, proceed anyway?", "Network Failure", JOptionPane.YES_NO_OPTION); 
     441//                    if (reply == JOptionPane.NO_OPTION) 
     442//                    { 
     443//                        System.exit(0); 
     444//                    } 
    438445                    System.out.println("Skipping writeToFEP..."); 
     446                    running = false; 
    439447                } 
    440448 
Note: See TracChangeset for help on using the changeset viewer.