Index: /trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java
===================================================================
--- /trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java	(revision 343)
+++ /trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java	(revision 422)
@@ -1,8 +1,8 @@
 package atmsdriver.trafficeventseditor;
 
-import atmsdriver.model.Highway;
-import atmsdriver.model.LoopDetector;
-import atmsdriver.model.LoopDetector.DOTCOLOR;
-import atmsdriver.model.Station;
+import tmcsim.highwaymodel.Highway;
+import tmcsim.highwaymodel.LoopDetector;
+import tmcsim.highwaymodel.LoopDetector.DOTCOLOR;
+import tmcsim.highwaymodel.Station;
 import timeselector.*;
 import java.io.File;
Index: /trunk/src/atmsdriver/trafficeventseditor/TimeFrames.java
===================================================================
--- /trunk/src/atmsdriver/trafficeventseditor/TimeFrames.java	(revision 240)
+++ /trunk/src/atmsdriver/trafficeventseditor/TimeFrames.java	(revision 422)
@@ -1,14 +1,10 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
 package atmsdriver.trafficeventseditor;
 
-import atmsdriver.model.Highway;
-import atmsdriver.model.Highways;
-import atmsdriver.model.LoopDetector;
-import atmsdriver.model.LoopDetector.DOTCOLOR;
-import atmsdriver.model.Station;
+import tmcsim.highwaymodel.Highway;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.LoopDetector;
+import tmcsim.highwaymodel.LoopDetector.DOTCOLOR;
+import tmcsim.highwaymodel.Station;
 import java.util.ArrayList;
 import java.util.List;
@@ -35,6 +31,5 @@
     {
         frames = new ArrayList<>();
-        highways = new Highways("./config/vds_data/highways_fullmap.txt", 
-                "192.168.251.46", 8080);
+        highways = new Highways("./config/vds_data/postmile_coordinates.txt");
     }
     
@@ -194,12 +189,5 @@
     void writeToFEP()
     {
-        try
-        {
-            highways.writeToFEP();
-        } 
-        catch (SimulationException ex)
-        {
-            System.out.println("writeToFEP() failed");
-        }
+            highways.toJson();
     }
 
Index: /trunk/src/atmsdriver/trafficeventseditor/TrafficLaneEvent.java
===================================================================
--- /trunk/src/atmsdriver/trafficeventseditor/TrafficLaneEvent.java	(revision 238)
+++ /trunk/src/atmsdriver/trafficeventseditor/TrafficLaneEvent.java	(revision 422)
@@ -1,7 +1,7 @@
 package atmsdriver.trafficeventseditor;
 
-import atmsdriver.model.LoopDetector;
-import atmsdriver.model.LoopDetector.DOTCOLOR;
-import atmsdriver.model.Station;
+import tmcsim.highwaymodel.LoopDetector;
+import tmcsim.highwaymodel.LoopDetector.DOTCOLOR;
+import tmcsim.highwaymodel.Station;
 
 /**
Index: /trunk/src/atmsdriver/ConsoleTrafficDriver.java
===================================================================
--- /trunk/src/atmsdriver/ConsoleTrafficDriver.java	(revision 255)
+++ /trunk/src/atmsdriver/ConsoleTrafficDriver.java	(revision 422)
@@ -1,9 +1,9 @@
 package atmsdriver;
 
-import atmsdriver.model.Highways;
-import atmsdriver.model.Station.DIRECTION;
-import atmsdriver.model.Highway;
-import atmsdriver.model.Station;
-import atmsdriver.model.LoopDetector.DOTCOLOR;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.Station.DIRECTION;
+import tmcsim.highwaymodel.Highway;
+import tmcsim.highwaymodel.Station;
+import tmcsim.highwaymodel.LoopDetector.DOTCOLOR;
 import java.io.FileInputStream;
 import java.util.ArrayList;
@@ -49,9 +49,5 @@
                 // Create the Highway Model
                 Highways highways = new Highways(
-                    "config/vds_data/highways_fullmap.txt",
-                    ConsoleDriverProperties.getProperty(
-                        "FEPWriterHost"),
-                    Integer.parseInt(ConsoleDriverProperties.getProperty(
-                        "FEPWriterPort")));
+                    "config/vds_data/highways_fullmap.txt");
 
                 // Construct the console driver using the highways model
@@ -139,9 +135,5 @@
             {
                 // Send highway model to FEP for transmit to ATMS
-                try {
-                    highways.writeToFEP();
-                } catch (SimulationException ex) {
-                    System.out.println("Skipping writeToFEP...");
-                }
+                highways.toJson();
                 System.out.println("Add another entry or Quit? (A/Q)");
                 choice = sc.next().toUpperCase().trim().charAt(0);
Index: /trunk/src/atmsdriver/TrafficEventsAnimator.java
===================================================================
--- /trunk/src/atmsdriver/TrafficEventsAnimator.java	(revision 246)
+++ /trunk/src/atmsdriver/TrafficEventsAnimator.java	(revision 422)
@@ -1,6 +1,6 @@
 package atmsdriver;
 
-import atmsdriver.model.Highways;
-import atmsdriver.model.TrafficEvent;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.TrafficEvent;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -66,7 +66,5 @@
         incidents = new HashMap<String, List<TrafficEvent>>();
         highways = new Highways(
-                "config/vds_data/highways_fullmap.txt",
-                // following aren't used by this application
-                "localhost", 8080);
+                "config/vds_data/highways_fullmap.txt");
         final String CONFIG_FILE_NAME = "traffic_model_config.properties";
         String propertiesFile = "config" + System.getProperty("file.separator") 
Index: /trunk/src/atmsdriver/GoogleMapAnimator.java
===================================================================
--- /trunk/src/atmsdriver/GoogleMapAnimator.java	(revision 340)
+++ /trunk/src/atmsdriver/GoogleMapAnimator.java	(revision 422)
@@ -1,6 +1,6 @@
 package atmsdriver;
 
-import atmsdriver.model.Highways;
-import atmsdriver.model.TrafficEvent;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.TrafficEvent;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -67,7 +67,5 @@
         incidents = new HashMap<String, List<TrafficEvent>>();
         highways = new Highways(
-                "config/vds_data/highways_fullmap.txt",
-                // following aren't used by this application
-                "localhost", 8080);
+                "config/vds_data/highways_fullmap.txt");
         final String CONFIG_FILE_NAME = "traffic_model_config.properties";
         String propertiesFile = "config" + System.getProperty("file.separator") 
Index: unk/src/archive/ExchangeInfo.java
===================================================================
--- /trunk/src/archive/ExchangeInfo.java	(revision 340)
+++ 	(revision )
@@ -1,20 +1,0 @@
-package archive;
-
-/**
- *
- * @author John A Torres
- */
-public class ExchangeInfo {
-	/** The network ID **/
-	public int networkId;
-
-	/** The XML message **/
-	public String xmlMessage;
-	
-	/** Constructor **/
-	public ExchangeInfo(int networkId, String xmlMessage)
-	{
-		this.networkId = networkId;
-		this.xmlMessage = xmlMessage;
-	}
-}
Index: unk/src/archive/ATMSDriver.java
===================================================================
--- /trunk/src/archive/ATMSDriver.java	(revision 340)
+++ 	(revision )
@@ -1,173 +1,0 @@
-package archive;
-
-import atmsdriver.ConsoleTrafficDriver;
-import atmsdriver.model.Highways;
-import java.io.FileInputStream;
-import java.util.Properties;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import tmcsim.common.SimulationException;
-
-/** "Super Old"
- * ATMS Driver reads the current simulation traffic conditions from the
- * EXCHANGE.XML file and constructs the Highway Network status info in the
- * format required by the FEP. It then sends this XML data over a socket to the
- * FEP Simulator.
- *
- * @author John A. Torres
- * @version 09/10/2017
- */
-public class ATMSDriver implements Runnable
-{
-
-    /**
-     * ATMSDriver Error logger.
-     */
-    private static Logger ATMSDriverLogger = Logger.getLogger("atmsdriver");
-
-    /**
-     * Properties object for the CADClient class.
-     */
-    private Properties ATMSDriverProperties;
-
-    /**
-     * Enumeration containing properties name values. See ATMSDriver class
-     * description for more information.
-     *
-     * @author John Torres
-     * @see ATMSDriver
-     */
-    private static enum PROPERTIES
-    {
-        HIGHWAYS_MAP_FILE_NAME("HighwaysMapFileName"),
-        EXCHANGE_FILE_NAME("ExchangeFileName"),
-        FEP_WRITER_HOST("FEPWriterHost"),
-        FEP_WRITER_PORT("FEPWriterPort");
-
-        public String name;
-
-        private PROPERTIES(String n)
-        {
-            name = n;
-        }
-    }
-
-    /**
-     * Highways in traffic network
-     */
-    final private Highways highways;
-
-    /**
-     * Sleep Time (30 seconds). *
-     */
-    private static final int SLEEP_TIME = 30000;
-
-    /**
-     * Exchange Reader
-     */
-    private ExchangeReader exchangeReader;
-
-    @Override
-    public void run()
-    {
-        // Check for packets and update the simulator
-        while (true)
-        {
-            // Flush the input file
-            ExchangeInfo exInfo = exchangeReader.parse(ATMSDriverProperties
-                    .getProperty(PROPERTIES.EXCHANGE_FILE_NAME.name));
-
-            try
-            {
-                highways.writeToFEP();
-            } catch (SimulationException ex)
-            {
-                System.out.println("Skipping writeToFEP...");
-            }
-            // Update if exchangeInfo is recieved
-            if (exInfo != null)
-            {
-                // TODO: handle this condition
-                Logger.getLogger("ATMSDriver").log(Level.INFO, "exInfo is not null");
-            }
-
-            // Wait for FEP Sim to process the data we just sent
-            try
-            {
-                Thread.sleep(SLEEP_TIME);
-            } catch (InterruptedException ie)
-            {
-                ie.printStackTrace();
-            }
-        }
-    }
-
-    public ATMSDriver(String propertiesFile)
-    {
-        // verify properties file
-        if (!verifyProperties(propertiesFile))
-        {
-            System.exit(0);
-        }
-        // create the highways model
-        highways = new Highways(
-                ATMSDriverProperties.getProperty(
-                        PROPERTIES.HIGHWAYS_MAP_FILE_NAME.name),
-                ATMSDriverProperties.getProperty(PROPERTIES.FEP_WRITER_HOST.name),
-                Integer.parseInt(ATMSDriverProperties.getProperty(
-                                PROPERTIES.FEP_WRITER_PORT.name)));
-        // create the exchange reader
-        exchangeReader = new ExchangeReader();
-    }
-
-    /**
-     * Verifies that the properties file has all necessary properties.
-     *
-     * @param propertiesFile
-     * @return
-     */
-    private boolean verifyProperties(String propertiesFile)
-    {
-        // Load the properties file.
-        try
-        {
-            ATMSDriverProperties = new Properties();
-            ATMSDriverProperties.load(new FileInputStream(propertiesFile));
-        } catch (Exception e)
-        {
-            ATMSDriverLogger.logp(Level.SEVERE, "ATMSDriver",
-                    "Constructor", "Exception in reading properties file.", e);
-        }
-
-        return true;
-    }
-
-    /**
-     * Runs the ATMS Driver.
-     */
-    public static void main(String[] args)
-    {
-        try
-        {
-            if (System.getProperty("ATMSDRIVER_PROPERTIES") != null)
-            {
-                // Create and run the ATMSDriver thread
-                ATMSDriver atmsDriver = new ATMSDriver(System.getProperty("ATMSDRIVER_PROPERTIES"));
-                Thread ATMSDriverThread = new Thread(atmsDriver);
-                ATMSDriverThread.start();
-
-                // run the console driver, pass it the atmsDriver highways model
-                ConsoleTrafficDriver driver = new ConsoleTrafficDriver(atmsDriver.highways);
-
-            } else
-            {
-                throw new Exception("ATMSDRIVER_PROPERTIES system property not defined.");
-            }
-        } catch (Exception e)
-        {
-            ATMSDriverLogger.logp(Level.SEVERE, "ATMSDriver", "Main",
-                    "Error occured initializing application", e);
-            System.exit(-1);
-        }
-    }
-}
Index: unk/src/archive/ExchangeReader.java
===================================================================
--- /trunk/src/archive/ExchangeReader.java	(revision 340)
+++ 	(revision )
@@ -1,280 +1,0 @@
-package archive;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- *
- * @author John A Torres
- */
-public class ExchangeReader {
-	/** Error Log **/
-	private static Logger ATMSDriverLogger = Logger.getLogger("atmsdriver");
-	
-	/** A SAX Handler that is used to parse received Incident Status Node. **/
-	private IncidentStatusHandler ish = null;
-	
-	/** The current networkId **/
-	private int networkId = 1;
-	
-	/** The Paramics Simulation Info for the most recent incident read **/
-	private ExchangeInfo exInfo = null;
-	
-	/** Value (seconds since 1/1/1970) of input file's last modification time. */
-	private long lastModified = 0;
-	
-	/**
-	 * Constructor.
-	 */
-	public ExchangeReader() 
-	{		
-		ish = new IncidentStatusHandler();
-	}
-	
-	/**
-	 * This method parses the received XML node with the local CameraStatusHandler.
-	 * All updated camera information is sent to the ParamicsSimulationManager.
-	 * 
-	 * If a successful read of the file occurs, the file is written with an empty string
-	 * and the date of the last modification is stored.
-	 *
-	 * @param filename The file to check for message in.
-	 * @return A ParamicsSimulationInfo object containing the file's information
-	 * 		   A null pointer on:
-	 * 		     - The file does not exist
-	 * 		     - No new modification
-	 * 		     - An error opening file 		  
-	 *           - An empty file
-	 *           - An error parsing the file
-	 *           
-	 *         The caller is able to call this function to check if there are any new messages
-	 *         in the file.  If there are, a PSI object is returned.  If there aren't any new
-	 *         messages, a null pointer is returned.
-	 */
-	public ExchangeInfo parse(String filename) 
-	{	
-		ExchangeInfo exInfo = null;
-		
-		File f = new File(filename);
-		BufferedReader r = null;
-		
-		// File does not exist: No information
-		if (!(f.exists()))
-		{
-			return null;
-		}
-		
-		// File not modified: No new information
-		if (f.lastModified() <= lastModified)
-		{
-			return null;
-		}
-		
-		try 
-		{
-			// Try to open the file
-			r = new BufferedReader(new FileReader(f));
-			
-			// Read the file to the end
-			StringBuilder xml = new StringBuilder("");
-			String line = r.readLine();
-			while (line != null)
-			{
-				xml.append(line + "\n");
-				line = r.readLine();
-			}
-			
-			// If the file has contents in it, read them and returned a PSI describing the contents
-			if(xml.length() > 0) 
-			{
-				// Parse the file
-				SAXParserFactory.newInstance().newSAXParser().parse(new InputSource(new StringReader(xml.toString())), ish);
-                                exInfo = new ExchangeInfo(networkId, xml.toString());
-			}
-			else if (xml.length() == 0)
-			{
-				lastModified = modifyFile(f);
-				r.close();
-			}
-		}
-		catch (FileNotFoundException fnfe)
-		{
-			ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "parse", 
-					filename + " dissapeared before reading.", fnfe);
-			exInfo = null;
-		}
-		catch (IOException ioe)
-		{
-			ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "parse", 
-					"Error while reading file " + filename + ".", ioe);
-			exInfo = null;
-		}
-		catch (SAXException saxe)
-		{
-			ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "parse", 
-					"Error while parsing file " + filename + ".", saxe);
-			exInfo = null;
-		}
-		catch (ParserConfigurationException pce)
-		{
-			ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "parse", 
-					"Error while configuring parser.", pce);
-		}
-		
-		// If a incident was read
-		if (exInfo != null)
-		{
-			lastModified = modifyFile(f);
-			try
-			{
-				r.close();
-			}
-			catch (IOException e)
-			{
-				ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "parse", 
-						"Error while closing file" + filename + ".", e);
-			}			
-		}
-		
-		// Return no object if there was an error while reading, or the psi created from
-		// parsing the file if the operation was successful.
-		return exInfo;
-	}
-	
-	private long modifyFile(File f)
-	{
-		FileWriter w = null;
-		
-		// Write to the file to show that it was read.
-		try
-		{
-			w = new FileWriter(f);
-			w.write("");
-			w.close();
-		}
-		catch (IOException e)
-		{
-			ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "parse", 
-					"Error while writing to file " + f.getName() + " to show that file was read.", e);
-		}
-		
-		// Save the last modified time
-		return f.lastModified();
-	}
-
-    /**
-     * Internal SAX Handler used to parse the Incident Status Document read by
-     * the remote Status Reader.  The schema for this document is: <br/>
-     *
-	 * <CAD_DATA><br>
-	 *    <Basic><br>
-	 *       <Comm_Interval/><br/>
-	 *       <Network_ID/><br/>
-	 *       <Simulation/><br/>
-	 *       <Incident/><br/>
-	 *    </Basic>
-	 *
-	 *    <Simulation_Data>
-	 *       <Simulation_speed/><br/>
-	 *       <CAD_clock><br/>
-	 *          <hour/><br/>
-	 *          <minute/><br/>
-	 *          <second/><br/>
-	 *          <Location><br/>
-	 *       </CAD_clock><br/>
-	 *    </Simulation_Data>
-	 *    
-	 *    <CAD_Incidents>
-	 *       <Incident><br/>
-	 *          <Identifier/><br/>
-	 *          <Status/><br/>
-	 *          <Location><br/>
-	 *              <Route/><br/>
-	 *              <Direction/><br/>
-	 *              <Location_type/><br/>
-	 *              <Postmile/><br/>
-	 *          </Location><br/>
-	 *          <Incident_type/><br/>
-	 *          <Lanes><br/>
-	 *             <Lane_number/><br/>
-	 *             ...
-	 *          </Lanes><br/>
-	 *       </Incident><br/>
-	 *       ...
-	 *    </CAD_Incidents>   
-	 *    
-	 *    <Management>
-	 *       <Diversion>
-     *          <Diversion_path>
-     *             <Identifier/>
-     *             <Percentage/>
-     *          <Diversion_path>
-     *          ...
-     *       </Diversion>
-     *       ...
-	 *    </Management>
-	 *  
-	 * </CAD_DATA>
-     */	
-	protected class IncidentStatusHandler extends DefaultHandler 
-	{
-		private final String NETWORK_ID   = "Network_ID";
-		
-		/** A buffer for reading characters **/
-		private StringBuffer parsedValue  = new StringBuffer();
-
-		public void startDocument() 
-		{ 
-		}	
-		
-		/** Appends characters to the xmlMessage and parsedValue buffers **/
-		public void characters(char[] ch, int start, int length) 
-		{
-			parsedValue.append(new String(ch, start, length).trim());
-		}
-		
-	    public void startElement (String uri, String localName, String qName, Attributes attributes)
-			throws SAXException
-		{
-	    }
-		
-		public void endElement(String uri, String localName, String qName)  
-		{
-			if(qName.equals(NETWORK_ID)) { networkId = Integer.parseInt(parsedValue.toString()); }
-			
-			parsedValue.setLength(0);
-		}	
-		
-		public void error(SAXParseException e) 
-		{
-			ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "error", 
-					"Error in parsing received incident status.", e);
-		}
-		
-		public void fatalError(SAXParseException e) 
-		{
-			ATMSDriverLogger.logp(Level.SEVERE, "ParamicsIncidentReader", "fatalError", 
-					"Fatal error in parsing received incident status.", e);
-		}
-		
-		public void warning(SAXParseException e) 
-		{
-			ATMSDriverLogger.logp(Level.WARNING, "ParamicsIncidentReader", "warning", 
-					"Warning in parsing received incident status.", e);
-		}		
-	}
-}
Index: /trunk/src/tmcsim/application.properties
===================================================================
--- /trunk/src/tmcsim/application.properties	(revision 419)
+++ /trunk/src/tmcsim/application.properties	(revision 422)
@@ -1,5 +1,5 @@
-#Thu, 20 Jun 2019 14:43:41 -0700
+#Sun, 23 Jun 2019 11:49:46 -0700
 
-Application.revision=417
+Application.revision=419
 
 Application.buildnumber=140
Index: /trunk/src/tmcsim/highwaymodel/PostmileCoords.java
===================================================================
--- /trunk/src/tmcsim/highwaymodel/PostmileCoords.java	(revision 422)
+++ /trunk/src/tmcsim/highwaymodel/PostmileCoords.java	(revision 422)
@@ -0,0 +1,161 @@
+
+package tmcsim.highwaymodel;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Scanner;
+
+/**
+ * PostmileCoords is a collection of Postmiles (id and LatLong Coordinates).
+ * @author jdalbey
+ */
+public class PostmileCoords implements Iterable
+{
+    private List<Postmile> postmileList;
+    public PostmileCoords()
+    {
+        postmileList = new ArrayList<Postmile>();
+    }
+    /** Accessor to value at given index */
+    public Postmile get(int idx)
+    {
+        return postmileList.get(idx);
+    }
+    /** Return the size */
+    public int size()
+    {
+        return postmileList.size();
+    }
+    /** Find the postmile with the given name */
+    public Postmile find(String target)
+    {
+        int idx = 0;
+        while (idx < postmileList.size() && !postmileList.get(idx).nameEquals(target))
+        {
+            idx++;
+        }
+        if (idx < postmileList.size())
+        {
+            return postmileList.get(idx);
+        }
+        else
+        {
+            return null;
+        }
+    }
+    /** Load the postmile list from external file */
+    public void load(Scanner scan)
+    {
+        try
+        {
+        String out = scan.next();
+        //  split into an array 
+        String[] results = out.split("\\n");
+        for (String item : results)
+        {
+            String[] fields = item.split(",");
+            String[] nameparts = fields[0].split(" ");
+            String statepm = nameparts[2];
+            // some postmiles come with a prefix, which we ignore
+            if (Character.isLetter(statepm.charAt(0)))
+            {
+                statepm = statepm.substring(1);
+            }  
+            String revisedpm = nameparts[0] + " " + nameparts[1] + " " + statepm;
+            Postmile pm;
+            // If the file has 6 fields per line, include the perpx,y values
+            if (fields.length == 6)
+            {
+                pm = new Postmile(revisedpm,fields[1],fields[2],fields[3],fields[4],fields[5]);
+            }
+            else // otherwise assume the file has just 4 fields
+            {
+                pm = new Postmile(revisedpm,fields[1],fields[2],fields[3]);
+            }
+            postmileList.add(pm);
+        }
+        }
+        catch (Exception ex)  // probably badly formatted file
+        {
+            ex.printStackTrace();
+        }
+    }
+
+    @Override
+    public Iterator iterator()
+    {
+        return postmileList.iterator();
+    }
+    /**
+     *  Postmile is a postmile id and its LatLong Coordinates.
+     */
+    final static class Postmile  
+    {
+        String name;  // the postmile name (Route,Direction,State postmile, e.g., 5 N 6.2)
+        String latitude; // the latitude coordinate for this postmile
+        String longitude; // the longitude coordinate for this postmile
+        String street; // cross street name
+        /* These fields are used by the map to adjust position of dot when zoomed */
+        String perpx="0";  // perpendicular vector, x-component (default value)
+        String perpy="0";  // perpendicular vector, y-component (default value)
+        public Postmile(String name, String lat, String longitude, String street)
+        {
+            this.name = name.trim();
+            this.latitude = lat.trim();
+            this.longitude = longitude.trim();
+            this.street = street.trim();
+        }
+        // This constructor is used if the file contains data for perpendicular vectors
+        public Postmile(String name, String lat, String longitude, String street, String perpx, String perpy)
+        {
+            this.name = name.trim();
+            this.latitude = lat.trim();
+            this.longitude = longitude.trim();
+            this.street = street.trim();
+            this.perpx = perpx.trim();
+            this.perpy = perpy.trim();
+        }
+        public boolean nameEquals(String target)
+        {
+            // remove .0 for comparing strings
+            if (target.endsWith(".0"))
+            {
+                String truncTarget = target.substring(0,target.length()-2);
+                return this.name.equals(truncTarget);
+            }
+            return this.name.equals(target);
+        }
+        @Override public boolean equals(Object aThat) 
+        {
+            if (this == aThat) return true;
+            if (!(aThat instanceof Postmile)) return false;
+            Postmile that = (Postmile) aThat;
+            boolean r1 = this.name.equals(that.name);
+            boolean r2 = this.latitude.equals(that.latitude);
+            boolean r3 = this.longitude.equals(that.longitude);
+            boolean r4 = this.street.equals(that.street);
+            return r1 && r2 && r3 && r4;
+        }
+        @Override public String toString()
+        {
+            return name + ": " + latitude +","+ longitude +","+ street+","+ perpx +","+ perpy;
+        }
+        public String toJson()
+        {
+            String pattern =  "\n{\n   \"type\": \"Feature\",\n" +
+                    "   \"id\": \"%s\",\n" +
+                    "   \"geometry\":\n       {\n        \"type\": \"Point\",\n" +
+                    "        \"coordinates\": [%s,%s]\n" +
+                    "       },\n" +
+                    "   \"properties\": \n" +         
+                    "       {\"street\": \"%s\", " +
+                    "\"color\": \"desiredcolor\", " +
+                    "\"perpx\": \"%s\", " +
+                    "\"perpy\": \"%s\"" +
+                    "}\n},";
+
+            return String.format(pattern, name, longitude, latitude, street, perpx, perpy);
+        }
+    }
+}
Index: /trunk/src/tmcsim/highwaymodel/StationComparator.java
===================================================================
--- /trunk/src/tmcsim/highwaymodel/StationComparator.java	(revision 422)
+++ /trunk/src/tmcsim/highwaymodel/StationComparator.java	(revision 422)
@@ -0,0 +1,53 @@
+package tmcsim.highwaymodel;
+
+import java.util.Comparator;
+
+/**
+ * Compare two stations by route and postmile. 
+ * Used by Highways.toJson() so json is listed by route then postmile
+ * @author jdalbey
+ * @version 4/2/2019
+ */
+public final class StationComparator implements Comparator
+{
+
+    /**
+     * Compare two stations by route and postmile. 
+     */
+    @Override
+    public int compare(Object a, Object b)
+    {
+        // check for identity
+        if (a == b)
+        {
+            return 0;
+        }
+        // check that Object is of type Station, if not throw exception
+        if (!(a instanceof Station && b instanceof Station))
+        {
+            throw new ClassCastException("A Station object expected.");
+        }
+        Station statA = (Station) a;
+        Station statB = (Station) b;
+        // compare by direction field first
+        int i = statA.direction.compareTo(statB.direction);
+        if (i != 0) return i;
+        
+        // get difference of postmile values
+        double val = statA.postmile - statB.postmile;
+        
+        // set appropriate comparable return value
+        int retval = 0;
+        if (val > 0)
+        {
+            retval = 1;
+        }
+        else if (val < 0)
+        {
+            retval = -1;
+        }
+
+        return retval;
+    }
+
+}
Index: /trunk/src/tmcsim/highwaymodel/Highway.java
===================================================================
--- /trunk/src/tmcsim/highwaymodel/Highway.java	(revision 422)
+++ /trunk/src/tmcsim/highwaymodel/Highway.java	(revision 422)
@@ -0,0 +1,59 @@
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.Station.DIRECTION;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+/**
+ * Highway represents a freeway that has two directions of traffic. A highway is
+ * identified by its highway number.  A highway contains lane detector stations,
+ * called Stations, along its length.
+ *
+ * @author jdalbey
+ */
+final public class Highway implements Comparable<Highway>
+{
+    /** The identifying number for this highway, e.g., 101 */
+    public final Integer routeNumber;
+    /** The ordered list of stations (lane detector stations) on this highway */
+    public final List<Station> stations;
+    /** The directions for this highway, either N/S or E/W */
+    public final Set<DIRECTION> availDirs = new TreeSet<DIRECTION>();
+    
+    /** Construct a highway 
+     * 
+     * @param highwayNum integer identifier for this highway
+     * @param stations ordered list of stations on this highway
+     */
+    public Highway(Integer routeNumber, ArrayList<Station> stations)
+    {
+        this.routeNumber = routeNumber;
+        this.stations = stations;
+        // Get available directions for route
+        if (stations != null)
+        {
+            for(Station stn : stations)
+            {
+                availDirs.add(stn.direction);
+            }
+        }
+    }
+    
+    @Override
+    public String toString()
+    {
+        return Integer.toString(this.routeNumber);
+    }
+
+    @Override
+    public int compareTo(Highway other)
+    {
+        int otherRoute = ((Highway) other).routeNumber; 
+        //ascending order
+        return this.routeNumber - otherRoute;        
+    }
+}
Index: /trunk/src/tmcsim/highwaymodel/TrafficEvent.java
===================================================================
--- /trunk/src/tmcsim/highwaymodel/TrafficEvent.java	(revision 422)
+++ /trunk/src/tmcsim/highwaymodel/TrafficEvent.java	(revision 422)
@@ -0,0 +1,81 @@
+
+package tmcsim.highwaymodel;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Scanner;
+
+
+/**
+ * Traffic Event represents some occurrence in the traffic on 
+ * a highway network.  A traffic event occurs at a particular time
+ * and belongs to a unique simulation incident.  The event occurs on 
+ * a specified section of a given highway route.  Each event specifies
+ * the level of traffic congestion by a color.  Events are comparable
+ * by the time of their occurrence.
+ * @author jdalbey
+ */
+public final class TrafficEvent implements Comparable<TrafficEvent>
+{
+    public final String incident;
+    public final String eventTime;
+    public final Date eventDate;  // for convenience
+    public final int routeNumber;
+    public final LoopDetector.DOTCOLOR color;
+    public final Station.DIRECTION dir;
+    public final double postmile;
+    public final double range;
+    public final String rawString;
+    
+    private final static SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
+
+    /** Create an event from a string as in this example:
+     * 181 00:12:30 405 S 0.6 11.0 G
+     * @param eventString
+     * @return traffic event
+     * @throws Scanner exception if string improperly formatted
+     */
+    public TrafficEvent(String eventString) throws ParseException
+    {
+        this.rawString = eventString;
+        Scanner lineScan = new Scanner(eventString);
+        this.incident = lineScan.next();
+        this.eventTime = lineScan.next(); // time field
+        // may throw parseexception
+        this.eventDate = formatter.parse(eventTime);
+        this.routeNumber = lineScan.nextInt();
+        this.dir = Station.DIRECTION.toDirection(lineScan.next());
+        this.postmile = lineScan.nextDouble();
+        this.range = lineScan.nextDouble();
+        this.color = LoopDetector.DOTCOLOR.toDotColor(lineScan.next());    
+    }
+
+    @Override
+    public int compareTo(TrafficEvent o)
+    {
+        return eventDate.compareTo(o.eventDate);
+    }
+    
+    @Override
+    public String toString()
+    {
+        return rawString;
+    }
+    @Override 
+    public boolean equals(Object other)
+    {
+        Boolean result = false;
+        if (other == null) return false;
+        if ( other instanceof TrafficEvent  )
+        {
+          TrafficEvent that = (TrafficEvent) other;
+          result = that.incident.equals(this.incident)
+                  && that.eventTime.equals(this.eventTime)
+                  && ((int) that.postmile) == ((int) this.postmile)
+                  && that.dir == this.dir
+                  && that.color == this.color;
+        }
+        return result;    
+    }            
+}
Index: /trunk/src/tmcsim/highwaymodel/Station.java
===================================================================
--- /trunk/src/tmcsim/highwaymodel/Station.java	(revision 422)
+++ /trunk/src/tmcsim/highwaymodel/Station.java	(revision 422)
@@ -0,0 +1,403 @@
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.LoopDetector.DOTCOLOR;
+import java.util.ArrayList;
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * A Station (VDS or Vehicle Detector Station) represents a group of lane detectors
+ * across all lanes in ONE direction at a particular point on a highway. A station is identified
+ * by its highway number and postmile. A station has an associated direction
+ * used to establish which direction is Main and which is Opposite. The MLTotVol
+ * and OppTotVol for a station can be dynamically updated. A station has other
+ * attributes: lineNum, vdsID, drop, and location which are used by the FEP. A
+ * station can be compared to other stations by its postmile.
+ *
+ * @author John A. Torres, jdalbey
+ * @version 9/10/2017, 3/22/2019
+ */
+public final class Station implements Comparable
+{
+
+    /* Static Station meta data */
+    final public int lineID;
+    final public int vdsID; // double check
+    final public int drop;
+    final public String location;
+    final public List<LoopDetector> loops;
+    final public int routeNumber;
+    final public double postmile;
+    final public DIRECTION direction;
+
+    /* Dynamic Station data */
+    private int MLTotVol;
+    private int OppTotVol;
+
+    /* Constructor */
+    public Station(int lineID, int vdsID, int drop,
+            String location, List<LoopDetector> loops, int hwy,
+            DIRECTION direction, double postmile)
+    {
+        this.lineID = lineID;
+        this.vdsID = vdsID;
+        this.drop = drop;
+        this.loops = loops;
+        this.location = location;
+        this.postmile = postmile;
+        this.direction = direction;
+        this.routeNumber = hwy;
+
+        this.MLTotVol = getMLTotVol();
+        this.OppTotVol = getOPPTotVol();
+    }
+
+    /**
+     * Calculates the total ML Volume.
+     *
+     * @return total ML volume.
+     */
+    private int getMLTotVol()
+    {
+        int mlTotVol = 0;
+        for (LoopDetector loop : loops)
+        {
+            if (loop.loopLocation.startsWith("ML"))
+            {
+                mlTotVol += loop.vol;
+            }
+        }
+        return mlTotVol;
+    }
+
+    /**
+     * Calculates the total OPP Volume
+     *
+     * @return total OPP volume.
+     */
+    private int getOPPTotVol()
+    {
+        int oppTotVol = 0;
+        for (LoopDetector loop : loops)
+        {
+            if (loop.loopLocation.startsWith("OS"))
+            {
+                oppTotVol += loop.vol;
+            }
+        }
+        return oppTotVol;
+    }
+
+    /**
+     * Returns a string of highways data. If MetaDataOnly is true, you get a
+     * full dump of the highways meta data, which does not include dynamic loop
+     * values, and does include the string location names. If MetaDataOnly is
+     * false, dynamic loop values are included, and unnecessary information like
+     * string location values are included.
+     *
+     * The FEPSimulator takes in the toCondensedFormat() output, with a
+     * MetaDataOnly value of false, over the socket.
+     *
+     * The MetaDataOnly flag should be used to get a full dump of the highways
+     * information. This was used to get the highways_fullmap.txt output.
+     *
+     * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim
+     * @return String, highways data in condensed format
+     */
+    public String toCondensedFormat(boolean MetaDataOnly)
+    {
+        StringBuilder build = new StringBuilder();
+        build.append(Integer.toString(this.vdsID));
+        build.append(" ");
+        build.append(Integer.toString(this.drop));
+        build.append(" ");
+        build.append(Integer.toString(this.routeNumber));
+        build.append(" ");
+        build.append(this.direction.getLetter());
+        build.append(" ");
+        build.append(Double.toString(this.postmile));
+        build.append(" ");
+        build.append(Integer.toString(loops.size()));
+        build.append(" ");
+        if (MetaDataOnly)
+        {
+            build.append(this.location);
+        }
+        build.append("\n");
+        for (LoopDetector loop : loops)
+        {
+            build.append(loop.toCondensedFormat(MetaDataOnly));
+        }
+        return build.toString();
+    }
+
+    /**
+     * Compare this Station to another by postmile. Note: This might be better
+     * as a Comparator since it checks only one field.
+     */
+    @Override
+    public int compareTo(Object otherStation)
+    {
+        // check for identity
+        if (this == otherStation)
+        {
+            return 0;
+        }
+        // check that Object is of type Station, if not throw exception
+        if (!(otherStation instanceof Station))
+        {
+            throw new ClassCastException("A Station object expected.");
+        }
+
+        // get difference of values
+        double otherStationPostmile = ((Station) otherStation).postmile;
+        double val = this.postmile - otherStationPostmile;
+
+        // set appropriate comparable return value
+        int retval = 0;
+        if (val > 0)
+        {
+            retval = 1;
+        }
+        else if (val < 0)
+        {
+            retval = -1;
+        }
+
+        return retval;
+    }
+
+    /**
+     * See if this station matches the specified attributes.
+     * @param dir
+     * @param postmile
+     * @return true if this station's attributes match the given ones.
+     */
+    public boolean matches(DIRECTION dir, double postmile)
+    {
+        double val = this.postmile - postmile;
+        return (Math.abs(val) < 0.01) && this.direction.equals(dir);
+    }
+    /**
+     * Determine which lane fields to update based on given direction and update
+     * all the loop detectors with the given color.
+     *
+     * @param direction desired highway direction
+     * @param dotColor desired dot color
+     */
+    public void updateByDirection(DIRECTION direction, DOTCOLOR dotColor)
+    {
+        // Is this station going in the desired direction?
+        if (direction.equals(this.direction))
+        {
+            outputUpdateMessage(dotColor, direction.toString());
+
+            // Set the values for all lanes at this station
+            for (LoopDetector loop : loops)
+            {
+                // Set loop detector attributes given the desired color
+                loop.setAttributes(dotColor);
+            }
+
+            this.MLTotVol = getMLTotVol();
+            this.OppTotVol = getOPPTotVol();
+        }
+    }
+    /**
+     * Compute the color for the lanes in a given direction.
+     * @return DOTCOLOR of this station's traffic flow
+     */
+    public DOTCOLOR getColor()
+    {
+        /* For now just use the color of the first lane. 
+         * TODO: Average the color in ALL the lanes  */
+
+        String laneDir = "";
+        
+        // FOR FUTURE USE we will need to examine all detectors for this station
+        // and perform an average
+        // for (LoopDetector loop : loops)
+        {
+            // for now, Return color according to loop volume of first lane
+            if (loops.get(0).vol == 1)
+            {
+                return DOTCOLOR.RED;
+            }
+            if (loops.get(0).vol == 3)
+            {
+                return DOTCOLOR.YELLOW;
+            }
+            if (loops.get(0).vol == 0)
+            {
+                return DOTCOLOR.GREEN;
+            }
+        }
+        
+        // Default case for invalid data
+        return DOTCOLOR.GREEN;
+    }
+
+    /**
+     * Output for updateByDirection. Logs the update to the console.
+     *
+     * @param dotcolor
+     * @param OPP_ML
+     */
+    private void outputUpdateMessage(DOTCOLOR dotcolor, String OPP_ML)
+    {
+        System.out.printf("Updating %-3.3s %-5.5s %-3.3s lanes\t %-12.12s "
+                + "at postmile %-6.6s to %-7.7s\n",
+                Integer.toString(this.routeNumber), this.direction.name(),
+                OPP_ML, this.location, Double.toString(this.postmile),
+                dotcolor.name());
+    }
+
+    /**
+     * XML tags used for toXML() method.
+     */
+    private static enum XML_TAGS
+    {
+
+        STATION("Station"),
+        LDS_ID("LDS_ID"),
+        LINE_NUM("Line_Num"),
+        DROP("Drop"),
+        LOOPS("Loops"),
+        LOCATION("Location"),
+        POST_MILE("Post_Mile"),
+        DIRECTION("Direction"),
+        FREEWAY("Freeway"),
+        ML_TOT_VOL("ML_Tot_Vol"),
+        OPP_TOT_VOL("Opp_Tot_Vol");
+
+        String tag;
+
+        private XML_TAGS(String n)
+        {
+            tag = n;
+        }
+    }
+
+    /**
+     * Returns the Station data in XMLFormat.
+     *
+     * @param currElem The current XML <Station> element
+     */
+    public void toXML(Element currElem)
+    {
+        Document theDoc = currElem.getOwnerDocument();
+
+        Element stationElement = theDoc.createElement(XML_TAGS.STATION.tag);
+        currElem.appendChild(stationElement);
+
+        Element ldsIDElement = theDoc.createElement(XML_TAGS.LDS_ID.tag);
+        ldsIDElement.appendChild(theDoc.createTextNode(String.valueOf(this.vdsID)));
+        stationElement.appendChild(ldsIDElement);
+
+        Element lineNumElement = theDoc.createElement(XML_TAGS.LINE_NUM.tag);
+        lineNumElement.appendChild(theDoc.createTextNode(String.valueOf(this.lineID)));
+        stationElement.appendChild(lineNumElement);
+
+        Element dropElement = theDoc.createElement(XML_TAGS.DROP.tag);
+        dropElement.appendChild(theDoc.createTextNode(String.valueOf(this.drop)));
+        stationElement.appendChild(dropElement);
+
+        Element locationElement = theDoc.createElement(XML_TAGS.LOCATION.tag);
+        locationElement.appendChild(theDoc.createTextNode(this.location));
+        stationElement.appendChild(locationElement);
+
+        Element postMileElement = theDoc.createElement(XML_TAGS.POST_MILE.tag);
+        postMileElement.appendChild(theDoc.createTextNode(String.valueOf(this.postmile)));
+        stationElement.appendChild(postMileElement);
+
+        Element directionElement = theDoc.createElement(XML_TAGS.DIRECTION.tag);
+        directionElement.appendChild(theDoc.createTextNode("" + this.direction.getLetter()));
+        stationElement.appendChild(directionElement);
+
+        Element freewayElement = theDoc.createElement(XML_TAGS.FREEWAY.tag);
+        freewayElement.appendChild(theDoc.createTextNode(String.valueOf(this.routeNumber)));
+        stationElement.appendChild(freewayElement);
+
+        Element mlElement = theDoc.createElement(XML_TAGS.ML_TOT_VOL.tag);
+        mlElement.appendChild(theDoc.createTextNode(String.valueOf(this.MLTotVol)));
+        stationElement.appendChild(mlElement);
+
+        Element oppElement = theDoc.createElement(XML_TAGS.OPP_TOT_VOL.tag);
+        oppElement.appendChild(theDoc.createTextNode(String.valueOf(this.OppTotVol)));
+        stationElement.appendChild(oppElement);
+
+        Element loopsElement = theDoc.createElement(XML_TAGS.LOOPS.tag);
+        stationElement.appendChild(loopsElement);
+
+        for (LoopDetector loop : loops)
+        {
+            loop.toXML(loopsElement);
+        }
+    }
+
+    /**
+     * Enum for freeway direction.
+     *
+     * @author John A. Torres
+     * @version 9/10/2017
+     */
+    public static enum DIRECTION
+    {
+        NORTH,
+        SOUTH,
+        EAST,
+        WEST;
+
+        // All the first letters of the values, in order.
+        private static String allLetters = "NSEW";
+
+        /**
+         * Return the first letter of this enum.
+         *
+         * @return String first letter of this enum.
+         */
+        public String getLetter()
+        {
+            return this.toString().substring(0, 1);
+        }
+        
+        public DIRECTION getOpposite()
+        {
+            switch (this)
+            {
+                case NORTH:
+                    return SOUTH;
+                case SOUTH:
+                    return NORTH;
+                case EAST:
+                    return WEST;
+                case WEST:
+                    return EAST;
+            }
+            return null;
+        }
+
+        /**
+         * Returns a direction given its first character.
+         *
+         * @param letter the first character of a direction
+         * @return direction corresponding to letter
+         * @pre letter must be one of allLetters
+         */
+        public static DIRECTION toDirection(String letter)
+        {
+            if(letter.indexOf(letter.charAt(0)) == -1)
+            {
+                return null;
+            }
+            return values()[allLetters.indexOf(letter.charAt(0))];
+        }
+    }
+    
+    @Override
+    public String toString()
+    {
+        return Integer.toString(this.vdsID)+this.getColor();
+    }
+}
Index: /trunk/src/tmcsim/highwaymodel/Highways.java
===================================================================
--- /trunk/src/tmcsim/highwaymodel/Highways.java	(revision 422)
+++ /trunk/src/tmcsim/highwaymodel/Highways.java	(revision 422)
@@ -0,0 +1,426 @@
+package tmcsim.highwaymodel;
+
+import atmsdriver.trafficeventseditor.TrafficLaneEvent;
+import tmcsim.highwaymodel.Station.DIRECTION;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Scanner;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Highways represents California state highways supervised by CalTrans. 
+ * The highways have sensors to detect traffic flow.  In the simulation
+ * the traffic flow is artificially created and Highways maintains the
+ * current levels of traffic flow throughout the network.
+ *
+ * Highways builds an internal representation of the highway network
+ * from VDS data (obtained from PeMS) The current state of the network
+ * is output to a json file for use by CPTMS. 
+ *
+ * @author John A. Torres, jdalbey
+ */
+final public class Highways
+{
+    final public List<Highway> highways;
+
+    public Highways(String highwaysMapFileName)
+    {
+       // build highways data structure
+        this.highways = buildHighwayNetwork(highwaysMapFileName);
+    }
+    
+    private ArrayList<Highway> buildHighwayNetwork(String highwaysMapFileName)
+    {
+        // NOTE: Could this method be streamlined? Is it necessary to have the
+        // second data structure?
+        System.out.println("Building highways...");
+        // The list of highways to return
+        ArrayList<Highway> highways = new ArrayList<Highway>();
+        
+        // map of hwy number to its list of stations
+        Map<Integer, ArrayList<Station>> highwayMap = new HashMap<>();
+        
+        // Open the postmile file and scan each line
+        File file = new File(highwaysMapFileName);
+        try 
+        {
+            Scanner scanner = new Scanner(file);
+            while (scanner.hasNext())
+            {
+                Station station = loadStation(scanner); 
+                Integer hwyNum = station.routeNumber;
+                // if the map does not contain an entry for the highway, create
+                // a new entry (key/value pair) for the highway and instantiate
+                // the empty list of stations
+                if (!highwayMap.containsKey(hwyNum))
+                {
+                    ArrayList<Station> stnList = new ArrayList<>();
+                    stnList.add(station);
+                    highwayMap.put(hwyNum, stnList);
+                } 
+                // if the map does have an entry for the highway, add the current
+                // station to its list of stations
+                else
+                {
+                    highwayMap.get(hwyNum).add(station);
+                }
+            }
+        }catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+        // get the set of highway numbers
+        Set<Integer> hwyKeys = highwayMap.keySet();
+        // get the highway number and associated stations and create a new hwy
+        // and add the hwy to this.highways
+        for (Integer hwyKey : hwyKeys)
+        {
+            ArrayList<Station> hwyStations = highwayMap.get(hwyKey);
+            Collections.sort(hwyStations);
+            System.out.println("Loaded highway " + hwyKey + " with " +
+                    hwyStations.size() + " stations.");
+            highways.add(new Highway(hwyKey,
+                    hwyStations));
+        }
+        System.out.println("");
+        return highways;
+    }
+
+    /** Search for a station with the given attributes 
+     * 
+     * @param routeNumber
+     * @param direction
+     * @param postmile
+     * @return the desired station, or null if not found.
+     */
+    public Station findStation(Integer routeNumber, Station.DIRECTION direction,
+            Double postmile)
+    {
+        // Get the highway by route number
+        Highway highway = getHighwayByRouteNumber(routeNumber);
+        if (highway == null)
+        {
+            Logger.getLogger(Highways.class.getName()).log(Level.SEVERE,  
+                    "Highway "+routeNumber+" not found in findStation()", "");
+            return null;
+        }
+        //Search the stations on this highway for a match
+        for (Station station : highway.stations)
+        {
+            if (station.matches(direction, postmile))
+            {
+                return station;
+            }
+        }
+        return null;
+    }
+    /**
+     * Applies specified color to the specified highway stretch. Route number
+     * and direction specify the highway. Postmile and range specify the stretch
+     * of specified highway. 
+     * The purpose of this method is to modify the highway state to represent 
+     * traffic conditions created by the Traffic Manager.  These conditions 
+     * originate in the traffic events file which specifies traffic congestion arising
+     * during the simulation.  NOTE: Since these events describe congestion,
+     * the direction that the color should be applied is the REVERSE of the
+     * regular flow of traffic.  
+     * So a request to apply red to 55 S from 8.5 for 2 miles means 
+     * the stretch 8.5 -> 10.5 because sobo traffic normally flows toward
+     * decreasing postmiles and we want to do the reverse.
+     * @param routeNumber highway route number
+     * @param direction highway direction (for normal traffic flow)
+     * @param postmile origin postmile value
+     * @param range range from origin postmile
+     * @param dotColor the color to be applied to specified highway stretch
+     */
+    public void applyColorToHighwayStretch(Integer routeNumber, Station.DIRECTION direction,
+            Double postmile, Double range, LoopDetector.DOTCOLOR dotColor)
+    {
+        System.out.println("Applying " + dotColor.name() + " dots to highway "
+                + routeNumber + " " + direction.name() + " at postmile "
+                + postmile + " with a range of " + range + " miles...");
+
+        // Get the highway by route number
+        Highway highway = getHighwayByRouteNumber(routeNumber);
+        // This check added to fix defect #118. Handles situation when the 
+        // events file specifies a highway that doesn't exist in the network.
+        if (highway == null)
+        {
+            Logger.getLogger(Highways.class.getName()).log(Level.SEVERE,  
+                    "Highway "+routeNumber+" not found trying to applyColor", "");
+            return;
+        }
+        // start value for highway section, and end value for highway section
+        // by postmile
+        Double startPost;
+        Double endPost;
+        double epsilon = 0.001;
+
+        // postmiles increase from s to n and w to e
+        // S or W directions backup in a positive postmile direction
+        if (direction.equals(Station.DIRECTION.SOUTH) || direction.equals(Station.DIRECTION.WEST))
+        {
+            // add range value to startPost to get
+            // the end postmile value of the highway section
+            startPost = postmile;
+            endPost = postmile + range;
+            // iterate through the stations, if within the specified highway
+            // stretch, update the station by direction and apply dot color
+            for (Station station : highway.stations)
+            {
+                if (station.postmile >= startPost && station.postmile <= endPost)
+                {
+                    station.updateByDirection(direction, dotColor);
+                }
+            }
+        } 
+        // N or E directions backup in a negative postmile direction
+        else
+        {
+            // subtract range value from startPost
+            // to get the end postmile value of the highway section
+            startPost = postmile;
+            endPost = postmile - range;
+
+            // iterate through the stations, if within the specified highway
+            // section, update the station by direction and apply dot color
+            for (Station station : highway.stations)
+            {
+                if (station.postmile <= startPost && station.postmile >= endPost)
+                {
+                    station.updateByDirection(direction, dotColor);
+                }
+            }
+        }
+        System.out.println("");
+    }
+    
+    
+    /**
+     * Loads a single Station from the postmile coordinates file
+     * @param sc scanner at the current station line
+     * @return Station
+     */
+    private Station loadStation(Scanner sc)
+    {
+        String line = sc.nextLine();
+        Scanner scline = new Scanner(line);
+        scline.useDelimiter(",");
+        
+        String route  = scline.next(); // FWY DIR POSTMILE
+        scline.next();  // skip lat
+        scline.next();  // skip long
+        String description = scline.next(); // the description of the location
+
+        Scanner rteScan = new Scanner(route);
+        int fwy = rteScan.nextInt();
+        DIRECTION dir = DIRECTION.toDirection(rteScan.next());
+        double postmile = rteScan.nextDouble();
+
+        ArrayList<LoopDetector> loops = new ArrayList<>();
+        // For now we'll use just a dummy loop detector
+        LoopDetector detector = new LoopDetector(1,"ML","ML_1");
+        loops.add(detector);
+
+        return new Station(11, 123, 99, description, loops, fwy, dir, postmile);
+    }
+     
+    /**
+     * Returns a highway by given highway number.
+     * 
+     * @param routeNum
+     * @return Highway with specified route number, or null if no highway with
+     *          the specified route num
+     */
+    public Highway getHighwayByRouteNumber(Integer routeNum)
+    {
+        Highway returnHwy = null;
+        // search through highways and check routeNums
+        for (Highway hwy : highways)
+        {
+            if (hwy.routeNumber.equals(routeNum))
+            {
+                returnHwy = hwy;
+                break;
+            }
+        }
+        return returnHwy;
+    }
+
+    /** Return a string representation of the Highways - for debugging */
+    public String toString()
+    {
+        StringBuilder result = new StringBuilder();
+        for (Highway hwy: highways)
+        {
+            // Consider each route direction
+            for (DIRECTION dir: hwy.availDirs)
+            {
+                String rowLabel = ""+String.format("%3s ",hwy.routeNumber)+dir.getLetter()+' ';
+                StringBuilder lineout = new StringBuilder();
+                // Examine every station on this highway and direction
+                for (Station station: hwy.stations)
+                {
+                    if (station.direction.equals(dir))
+                    {
+                    //lineout.append("" + dir.getLetter() + stat.postmile);
+                    lineout.append(station.getColor().symbol());
+                    //lineout.append("  ");
+                    }
+                    else 
+                    {
+                        lineout.append(".");
+                    }
+                }
+                // See if there were stations for this direction
+                String checkMe = lineout.toString().trim();
+                // if any stations were colored, output the line
+                if (checkMe.length() > 1)
+                {
+                    result.append(rowLabel);
+                    result.append(lineout + "\n");
+                }
+            }
+        }
+        result.append("\n");
+        return result.toString();
+    }
+    /** Return a json representation of the Highways, readable by Google Maps */
+    public String toJson()
+    {
+        // TODO: move loading this file to init method so it doesn't get 
+        // called every time.
+        PostmileCoords pmList = new PostmileCoords();
+        FileInputStream fis = null;
+        try
+        {
+            fis = new FileInputStream("config/vds_data/postmile_coordinates.txt");
+        }
+        catch (FileNotFoundException ex)
+        {
+            Logger.getLogger(Highways.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        Scanner s = new Scanner(fis).useDelimiter("\\A");
+        pmList.load(s);
+        
+        Collections.sort(highways);  // Sort the highways for easier inspection
+        String header = "{\n" +
+        "  \"type\": \"FeatureCollection\",\n" +
+        "  \"features\": [";
+        StringBuilder result = new StringBuilder();
+        result.append(header);
+        for (Highway hwy: highways)
+        {
+            // Examine every station on this highway
+            StringBuilder lineout = new StringBuilder();
+            Collections.sort(hwy.stations, new StationComparator());
+            for (Station stat: hwy.stations)
+            {
+                String pmID = "" + hwy.routeNumber + " " 
+                        + stat.direction.getLetter() + " " 
+                        + stat.postmile;
+                PostmileCoords.Postmile currentPM = pmList.find(pmID);
+                if (currentPM == null)
+                { 
+                Logger.getLogger(Highways.class.getName()).log(Level.INFO, 
+                        "Postmile Coords lookup couldn't find Station: "+pmID,
+                        " ");
+                }
+                if (currentPM != null)
+                {    
+                    //lineout.append("" + dir.getLetter() + stat.postmile);
+                    //lineout.append(stat.getColorByDirection(dir));
+                    String outString = currentPM.toJson();
+                    // replace the color code with the color name
+                    String colorName=stat.getColor().htmlColor();
+                    outString = outString.replace("desiredcolor",colorName);
+                    lineout.append(outString);
+                    lineout.append("  ");
+                }
+            }
+            //result.append(rowLabel);
+            result.append(lineout + "\n");
+
+        }
+        // remove last trailing comma
+        result.replace(result.lastIndexOf(","), result.lastIndexOf(",") + 1, " "  );
+
+        result.append("  ]\n" +  "}");
+        return result.toString();
+    }
+    
+    /**
+     * Generates the route number list, used for user input validation.
+     * @return list of route numbers.
+     */
+    public List<Integer> getAllRouteNums()
+    {
+        ArrayList<Integer> routeNums = new ArrayList<>();
+        // add the route number for each highway to the list
+        for(Highway hwy : highways)
+        {
+            routeNums.add(hwy.routeNumber);
+        }
+        return routeNums;
+    }
+    
+    /**
+     * XML tags used in writeToXML()
+     */
+    private static enum XML_TAGS
+    {
+
+        NETWORK("Network");
+
+        String tag;
+
+        private XML_TAGS(String n)
+        {
+            tag = n;
+        }
+    }
+    
+    /** Reset all the traffic levels to free flowing (green) */
+    public void reset()            
+    {
+        for(Highway hwy: highways)
+        {
+            for(Station stn : hwy.stations)
+            {
+                for(LoopDetector ld : stn.loops)
+                {
+                    ld.setAttributes(LoopDetector.DOTCOLOR.GREEN);
+                }
+            }
+        }
+    }
+    
+    public void applyTrafficLaneEvent(TrafficLaneEvent event)
+    {
+        Integer routeNum = event.routeNum;
+        Highway hwy = getHighwayByRouteNumber(routeNum);
+        for(Station stn: hwy.stations)
+        {
+            if(stn.equals(event.station))
+            {
+                for(LoopDetector ld : stn.loops)
+                {
+                    if(ld.equals(event.loopDetector))
+                    {
+                        ld.occ = event.color.occupancy();
+                        ld.vol = event.color.volume();
+                        break;
+                    }
+                }
+                break;
+            }
+        }
+    }
+}
Index: /trunk/src/tmcsim/highwaymodel/LoopDetector.java
===================================================================
--- /trunk/src/tmcsim/highwaymodel/LoopDetector.java	(revision 422)
+++ /trunk/src/tmcsim/highwaymodel/LoopDetector.java	(revision 422)
@@ -0,0 +1,228 @@
+package tmcsim.highwaymodel;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/** 
+ *  A LoopDetector represents a single detector for a single lane in a network.
+ * 
+ *  A LoopDetector contains static meta data, and three dynamic attributes: vol,
+ *  occ, and spd.
+ *
+ * Lane Type 	A string indicating the type of lane. Possible values (and their meaning) are:
+ *
+ *    CD (Coll/Dist)
+ *    CH (Conventional Highway)
+ *    FF (Fwy-Fwy connector)
+ *    FR (Off Ramp)
+ *    HV (HOV)
+ *    ML (Mainline)
+ *    OR (On Ramp)
+ * @author John A. Torres
+ * @version 09/10/2017
+ */
+public class LoopDetector 
+{
+    /* static data */
+    final public int loopID;
+    final public String loopLocation;
+    final public String loopLocationID;
+    
+    /* dynamic data */
+    public int vol;
+    public float occ;
+    
+    /**
+     * Constructs a LoopDetector from loopID, loopLocation, and laneNum
+     * with initially free flowing traffic.
+     * 
+     * @param loopID
+     * @param loopLocation
+     * @param laneNum 
+     */
+    public LoopDetector(int loopID, String loopLocationID, String loopLocation)
+    {
+        /* Set static data */
+        this.loopID = loopID;
+        this.loopLocation = loopLocation;
+        this.loopLocationID = loopLocationID;
+        /* Init dynamic data */
+        this.vol = 0;
+        this.occ = 0;
+    }
+    
+    /** 
+     * Setter for loop detector dynamic attributes.  Reserved for future use
+     * with "live" highway data.
+     * @param vol volume
+     * @param occ occupancy
+     * @param spd speed not used
+     */
+    public void setAttributes(int vol, float occ)
+    {
+        this.vol = vol;
+        this.occ = occ;
+    }
+    /** Set the attributes of this detector given a color.
+     * @param DOTCOLOR of the attributes to assign. 
+     */
+    public void setAttributes(DOTCOLOR color)
+    {
+        this.vol = color.volume();
+        this.occ = color.occupancy();
+    }
+    /**
+     * XML tags used for toXML() method.
+     */
+    private static enum XML_TAGS
+    {
+        LOOP_ID("Loop_ID"),
+        LOOP_LOCATION("Loop_Location"),
+        VOL("Vol"),
+        OCC("Occ"),
+        LOOP("Loop");
+        
+        String tag;
+        
+        private XML_TAGS(String n)
+        {
+            tag = n;
+        }
+    }
+    
+    /** Returns a string of highways data. If MetaDataOnly is true, you get a full
+     *  dump of the highways meta data, which does not include dynamic loop values,
+     *  and does include the string location names. If MetaDataOnly is false,
+     *  dynamic loop values are included, and unnecessary information like string
+     *  location values are included.
+     * 
+     *  The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly
+     *  value of false, over the socket.
+     * 
+     *  The MetaDataOnly flag should be used to get a full dump of the highways
+     *  information. This was used to get the highways_fullmap.txt output.
+     * 
+     * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim
+     * @return String, highways data in condensed format
+     */
+    public String toCondensedFormat(boolean MetaDataOnly)
+    {
+        StringBuilder build = new StringBuilder();
+        build.append(Integer.toString(this.loopID));
+        build.append(" ");
+        if(!MetaDataOnly)
+        {
+            build.append(" ");
+            build.append(this.occ);
+            build.append(" ");
+            build.append(this.vol);
+            build.append(" ");
+        }
+        else
+        {
+            build.append(this.loopLocationID);
+            build.append(" ");
+        }
+        build.append(this.loopLocation);
+        build.append("\n");
+        return build.toString();
+    }
+
+    /**
+     * Returns the LoopDetector data in XMLFormat
+     * 
+     * @param currElem The current XML <LoopDetector> element
+     */
+    public void toXML(Element currElem)
+    {
+        Document theDoc = currElem.getOwnerDocument();
+        
+        Element loopElement = theDoc.createElement(XML_TAGS.LOOP.tag);
+        currElem.appendChild(loopElement);
+        
+        Element loopIDElement = theDoc.createElement(XML_TAGS.LOOP_ID.tag);
+        loopIDElement.appendChild(theDoc.createTextNode(String.valueOf(this.loopID)));
+        loopElement.appendChild(loopIDElement);
+        
+        Element loopLocElement = theDoc.createElement(XML_TAGS.LOOP_LOCATION.tag);
+        loopLocElement.appendChild(theDoc.createTextNode(this.loopLocation));
+        loopElement.appendChild(loopLocElement);
+        
+        Element volElement = theDoc.createElement(XML_TAGS.VOL.tag);
+        volElement.appendChild(theDoc.createTextNode(String.valueOf(this.vol)));
+        loopElement.appendChild(volElement);
+        
+        Element occElement = theDoc.createElement(XML_TAGS.OCC.tag);
+        occElement.appendChild(theDoc.createTextNode(String.valueOf(this.occ)));
+        loopElement.appendChild(occElement);
+    }
+    
+    /**
+     * Enum for highway status dot colors. Each color has associated volume
+     * and occupancy constants, single character symbol, and hml color name.
+     *
+     * @author John A. Torres, jdalbey
+     * @version 10/11/2017
+     */
+    public static enum DOTCOLOR {
+
+        RED(1, 0.06f,'@',"red"),    // "Stopped" is less than 25mph
+        YELLOW(3,0.059f,'+',"yellow"), // speed = 26
+        GREEN(0,0,'-',"lime");       // freeflowing
+        
+        // All the first letters of the values, in order.
+        public static String allLetters = "RYG";
+        
+        private int vol;  /* volume */
+        private float occ;  /* occupancy */      
+        private char symbol; /* symbolic representation of this color */
+        private String htmlColor; /* html color name */
+        
+        
+        private DOTCOLOR(int v, float o, char symbol, String htmlColor)
+        {
+            vol = v;
+            occ = o;
+            this.symbol = symbol;
+            this.htmlColor = htmlColor;
+        }
+        /**
+         * Return the first letter of this enum.
+         *
+         * @return String first letter of this enum.
+         */
+        public String getLetter() {
+            return this.toString().substring(0, 1);
+        }
+
+        public int volume()
+        {
+            return vol;
+        }
+        public float occupancy()
+        {
+            return occ;
+        }
+        public char symbol()
+        {
+            return symbol;
+        }
+        public String htmlColor()
+        {
+            return htmlColor;
+        }
+        /**
+         * Returns a DOTCOLOR given its first character.
+         *
+         * @param letter the first character of a DOTCOLOR
+         * @return DOTCOLOR corresponding to letter
+         * @pre letter must be one of allLetters
+         */
+        public static DOTCOLOR toDotColor(String letter) {
+            return values()[allLetters.indexOf(letter.charAt(0))];
+        }
+    }  
+    
+}
Index: /trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java
===================================================================
--- /trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java	(revision 407)
+++ /trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java	(revision 422)
@@ -2,7 +2,7 @@
 
 import atmsdriver.GoogleMapAnimator;
-import atmsdriver.model.Highways;
-import atmsdriver.model.LoopDetector;
-import atmsdriver.model.TrafficEvent;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.LoopDetector;
+import tmcsim.highwaymodel.TrafficEvent;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -129,7 +129,5 @@
             incidents = new HashMap<String, List<TrafficEvent>>();
             highways = new Highways(
-                    props.getProperty(PROPERTIES.HIGHWAYS_MAP_FILE.name),
-                    props.getProperty(PROPERTIES.FEPSIM_IP_ADDR.name),
-                    8080); 
+                    props.getProperty(PROPERTIES.HIGHWAYS_MAP_FILE.name)); 
             this.theCoordinator = theCoordinator;
         }
@@ -211,15 +209,4 @@
         timer.start();
 
-        if (props.getProperty(PROPERTIES.OUTPUT_DEST.name).equals("FEP"))
-        {
-            // Start the FEP thread (to update ATMS every 30 sec). (See class def below)
-            Thread wtfep = new WriteToFEPThread();
-            wtfep.start();
-        }
-        else
-        {
-            Thread wtConsole = new WriteToConsoleThread();
-            wtConsole.start();
-        }
         // Always write to json for google map display
         Thread wtJson = new WriteToJsonThread();
@@ -411,28 +398,4 @@
     }
 
-    class WriteToConsoleThread extends Thread
-    {
-
-        public void run()
-        {
-            System.out.println("WriteToConsole Thread starting.");
-            // Run indefinitely
-            while (true)
-            {
-                 // Write the highway network status to the Console
-                 System.out.println(highways.toString());
-                // Pause the thread
-                try
-                {
-                    Thread.sleep(10000);
-                }
-                catch (InterruptedException ie)
-                {
-                    ie.printStackTrace();
-                }
-            }
-
-        }
-    }
     /** Writes the highway model to a GeoJson file for reading
      *  by Google Maps.
@@ -475,43 +438,4 @@
     }
     
-    class WriteToFEPThread extends Thread
-    {
-
-        public void run()
-        {
-            System.out.println("WriteToFEP Thread starting.");
-            // Run indefinitely
-            boolean running = true;
-            while (running)
-            {
-                try
-                {
-                    // Write the highway network status to the FEP Simulator
-                    highways.writeToFEP();
-                }
-                catch (SimulationException ex)
-                {
-                    // Ask user if they want to proceed without FEP Sim connection
-//                    int reply = JOptionPane.showConfirmDialog(null, "Failed to connect to FEP Sim, proceed anyway?", "Network Failure", JOptionPane.YES_NO_OPTION);
-//                    if (reply == JOptionPane.NO_OPTION)
-//                    {
-//                        System.exit(0);
-//                    }
-                    System.out.println("Skipping writeToFEP...");
-                    running = false;
-                }
-
-                // Wait for FEP Sim to process the data we just sent
-                try
-                {
-                    Thread.sleep(FEPSIM_INTERVAL);
-                }
-                catch (InterruptedException ie)
-                {
-                    ie.printStackTrace();
-                }
-            }
-
-        }
-    }
+    
 }
Index: /trunk/src/tmcsim/cadsimulator/viewer/TrafficModelViewPanel.java
===================================================================
--- /trunk/src/tmcsim/cadsimulator/viewer/TrafficModelViewPanel.java	(revision 277)
+++ /trunk/src/tmcsim/cadsimulator/viewer/TrafficModelViewPanel.java	(revision 422)
@@ -1,5 +1,5 @@
 package tmcsim.cadsimulator.viewer;
 
-import atmsdriver.model.TrafficEvent;
+import tmcsim.highwaymodel.TrafficEvent;
 import java.util.LinkedList;
 import java.util.List;
Index: /trunk/src/tmcsim/utilities/BuildHighwayFile.java
===================================================================
--- /trunk/src/tmcsim/utilities/BuildHighwayFile.java	(revision 345)
+++ /trunk/src/tmcsim/utilities/BuildHighwayFile.java	(revision 422)
@@ -15,4 +15,5 @@
 
 /**
+ * OBSOLETE since deprecating ATMS functionality. No longer used.
  * This utility program is used to create the highway map file used as part
  * of the configuration files needed by the simulator.
Index: /trunk/test/tmcsim/highwaymodel/PostmileCoordsTest.java
===================================================================
--- /trunk/test/tmcsim/highwaymodel/PostmileCoordsTest.java	(revision 422)
+++ /trunk/test/tmcsim/highwaymodel/PostmileCoordsTest.java	(revision 422)
@@ -0,0 +1,110 @@
+
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.PostmileCoords;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Iterator;
+import java.util.Scanner;
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class PostmileCoordsTest extends TestCase
+{
+    private PostmileCoords pmc;
+    
+    public PostmileCoordsTest(String testName)
+    {
+        super(testName);
+    }
+    
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+    
+    @Override
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public void testLoad() throws FileNotFoundException
+    {
+
+        System.out.println("load");
+        String line1 = "5 N 4.02, 33.33, -117.117,Dyer Rd\n5 S 3.56, 33.33, -117.117,Dyer Rd";
+        Scanner scan = new Scanner(line1).useDelimiter("\\A"); 
+        pmc = new PostmileCoords();
+        pmc.load(scan);
+        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33", 
+                "-117.117","Dyer Rd");
+        assertEquals(pm,pmc.get(0));
+        assert(pmc.size() == 2);
+    }
+    public void testLoadwithPrefix() throws FileNotFoundException
+    {
+        System.out.println("load");
+        String line1 = "5 N R4.02, 33.33, -117.117,Dyer Rd\n5 S 3.56, 33.33, -117.117,Dyer Rd";
+        Scanner scan = new Scanner(line1).useDelimiter("\\A"); 
+        pmc = new PostmileCoords();
+        pmc.load(scan);
+        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33", 
+                "-117.117","Dyer Rd","0","0");
+        assertEquals(pm,pmc.get(0));
+        assert(pmc.size() == 2);
+    }
+    public void testLoadNoPerps() throws FileNotFoundException
+    {
+
+        System.out.println("load");
+        String line1 = "5 N 4.02, 33.33, -117.117,Dyer Rd,\n5 S 3.56, 33.33, -117.117,Dyer Rd,";
+        Scanner scan = new Scanner(line1).useDelimiter("\\A"); 
+        pmc = new PostmileCoords();
+        pmc.load(scan);
+        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33", 
+                "-117.117","Dyer Rd","0","0");
+        assertEquals(pm,pmc.get(0));
+        assert(pmc.size() == 2);
+    }
+    public void testLoadPerps() throws FileNotFoundException
+    {
+
+        System.out.println("load");
+        String line1 = "5 N 4.02, 33.33, -117.117,Dyer Rd,.1,.1\n5 S 3.56, 33.33, -117.117,Dyer Rd,.2,.2";
+        Scanner scan = new Scanner(line1).useDelimiter("\\A"); 
+        pmc = new PostmileCoords();
+        pmc.load(scan);
+        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33", 
+                "-117.117","Dyer Rd",".1",".1");
+        assertEquals(pm,pmc.get(0));
+        assert(pmc.size() == 2);
+    }
+    public void testIterator() throws FileNotFoundException
+    {
+        System.out.println("iterator");
+        testLoad();
+        int count = 0;
+        for (Object pm: pmc)
+        {
+            count++;
+        }
+        assert(count == 2);
+    }
+    public void testFind() throws FileNotFoundException
+    {
+        System.out.println("find");
+        testLoad();
+        PostmileCoords.Postmile result = pmc.find("5 N 4.02");
+        assertNotNull(result);
+        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33", "-117.117","Dyer Rd", "0.547592", "0.836745");
+        assertEquals(pm,result);
+        PostmileCoords.Postmile result2 = pmc.find("X");
+        assertNull(result2);
+        System.out.println(pm.toJson());
+    }
+}
Index: /trunk/test/tmcsim/highwaymodel/HighwayTest.java
===================================================================
--- /trunk/test/tmcsim/highwaymodel/HighwayTest.java	(revision 422)
+++ /trunk/test/tmcsim/highwaymodel/HighwayTest.java	(revision 422)
@@ -0,0 +1,57 @@
+
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.LoopDetector;
+import tmcsim.highwaymodel.Station;
+import tmcsim.highwaymodel.Highway;
+import tmcsim.highwaymodel.Station.DIRECTION;
+import java.util.ArrayList;
+import java.util.Set;
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class HighwayTest extends TestCase
+{
+    Station alpha;   
+    Station beta;
+    public HighwayTest(String testName)
+    {
+        super(testName);
+    }
+    
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        alpha = new Station(1,2,3,"A",new ArrayList<LoopDetector>(), 4, Station.DIRECTION.NORTH, 1.0);        
+        beta = new Station(1,2,3,"B",new ArrayList<LoopDetector>(), 4, Station.DIRECTION.SOUTH, 1.0);        
+    }
+    
+    @Override
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    public void testToString()
+    {
+        System.out.println("toString");
+        Highway instance = new Highway(5,null);
+        String expResult = "5";
+        String result = instance.toString();
+        assertEquals(expResult, result);
+    }
+    public void testDirections()
+    {
+        ArrayList<Station> stations = new ArrayList<Station>();
+        stations.add(alpha);
+        stations.add(beta);
+        Highway h1 = new Highway(5,stations);
+        Set<DIRECTION> dirs = h1.availDirs;
+        assertTrue(dirs.contains(DIRECTION.NORTH));
+        assertTrue(dirs.contains(DIRECTION.SOUTH));
+    }
+}
Index: /trunk/test/tmcsim/highwaymodel/TrafficEventTest.java
===================================================================
--- /trunk/test/tmcsim/highwaymodel/TrafficEventTest.java	(revision 422)
+++ /trunk/test/tmcsim/highwaymodel/TrafficEventTest.java	(revision 422)
@@ -0,0 +1,71 @@
+
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.TrafficEvent;
+import java.text.ParseException;
+import java.util.PriorityQueue;
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class TrafficEventTest extends TestCase
+{
+    
+    public TrafficEventTest(String testName)
+    {
+        super(testName);
+    }
+    
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+    }
+    
+    @Override
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    /**
+     * Test of compareTo method, of class TrafficEvent.
+     */
+    public void testCompareTo() throws ParseException
+    {
+        System.out.println("compareTo");
+        TrafficEvent alpha = new TrafficEvent("181 00:01:30 405 S 0.6 11.0 G");
+        TrafficEvent beta  = new TrafficEvent("181 00:12:30 405 S 0.6 11.0 G");
+        TrafficEvent charly  = new TrafficEvent("181 00:22:00 5 S 0.6 11.0 G");
+        assertEquals(-1, alpha.compareTo(beta));
+        assertEquals(1, charly.compareTo(beta));
+        assertEquals(0, beta.compareTo(beta));
+    }
+    public void testCompare2() throws ParseException
+    {
+        System.out.println("compareTo");
+        TrafficEvent alpha = new TrafficEvent(" 187   00:00:07  55      S         6.88     0.2      Y");
+        TrafficEvent beta  = new TrafficEvent(" 187   00:01:37  55      S         6.88     0.2      R");
+        TrafficEvent charly  = new TrafficEvent("191   02:49:02  73      S         27.20    0.8      G");
+        assertEquals(-1, alpha.compareTo(beta));
+        assertEquals(1, charly.compareTo(beta));
+        assertEquals(0, beta.compareTo(beta));
+    }
+    public void testQueue() throws ParseException
+    {
+        System.out.println("compareTo");
+        TrafficEvent alpha = new TrafficEvent(" 187   00:00:07  55      S         6.88     0.2      Y");
+        TrafficEvent beta  = new TrafficEvent(" 187   00:01:37  55      S         6.88     0.2      R");
+        TrafficEvent charly  = new TrafficEvent("191   02:49:02  73      S         27.20    0.8      G");
+        PriorityQueue<TrafficEvent> q = new PriorityQueue<TrafficEvent>();
+        q.add(charly);
+        q.add(beta);
+        q.add(alpha);
+        assertEquals(alpha, q.poll());
+        assertEquals(beta, q.poll());
+        assertEquals(charly, q.poll());
+    }
+    
+}
Index: /trunk/test/tmcsim/highwaymodel/StationTest.java
===================================================================
--- /trunk/test/tmcsim/highwaymodel/StationTest.java	(revision 422)
+++ /trunk/test/tmcsim/highwaymodel/StationTest.java	(revision 422)
@@ -0,0 +1,102 @@
+
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.LoopDetector;
+import tmcsim.highwaymodel.Station;
+import tmcsim.highwaymodel.Station.DIRECTION;
+import java.util.ArrayList;
+import junit.framework.TestCase;
+import org.w3c.dom.Element;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class StationTest extends TestCase {
+    Station alpha;
+    public StationTest(String testName) {
+        super(testName);
+    }
+    
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        alpha = new Station(1,2,3,"A",new ArrayList<LoopDetector>(), 4, DIRECTION.NORTH, 1.0);
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    /**
+     * Test of getHighwayNumber method, of class Station.
+     */
+    public void testGetHighwayNumber() {
+        System.out.println("getHighwayNumber");
+        assertEquals(4, alpha.routeNumber);
+    }
+
+    /**
+     * Test of getDirection method, of class Station.
+     */
+    public void testGetDirection() {
+        System.out.println("getDirection");
+        assertEquals(DIRECTION.NORTH, alpha.direction);
+    }
+
+    /**
+     * Test of getStationMeta method, of class Station.
+     */
+    public void testGetStationMeta() {
+        System.out.println("getStationMeta");
+        String expResult = "2 3 4 N 1.0 0 A\n";
+        String result = alpha.toCondensedFormat(true);
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test of getPostmile method, of class Station.
+     */
+    public void testGetPostmile() {
+        System.out.println("getPostmile");
+        assertEquals(1.0, alpha.postmile,0.1);
+    }
+
+    /**
+     * Test of compareTo method, of class Station.
+     */
+    public void testCompareTo() {
+        System.out.println("compareTo");
+        Station beta = new Station(1,2,3,"B",new ArrayList<LoopDetector>(), 4, DIRECTION.NORTH, 2.0);
+        int expResult = 0;
+        assertEquals(-1, alpha.compareTo(beta));
+        assertEquals(1, beta.compareTo(alpha));
+        assertEquals(0, beta.compareTo(beta));
+    }
+
+    public void testMatches()
+    {
+        Station alpha = new Station(1,2,3,"A",new ArrayList<LoopDetector>(), 4, DIRECTION.NORTH, 2.0);
+        assertTrue(alpha.matches(DIRECTION.NORTH, 2.0));
+        assertFalse(alpha.matches(DIRECTION.NORTH,2.1));
+    }
+    /**
+     * Test get Color and LoopDetector accessors
+     */
+    public void testGetColor()
+    {
+        LoopDetector lane = new LoopDetector(999,"locid","loc");
+        ArrayList<LoopDetector> lanes = new ArrayList<LoopDetector>();
+        lanes.add(lane);
+        Station alpha = new Station(1,2,3,"A",lanes, 4, DIRECTION.NORTH, 2.0);
+        assertEquals('-',alpha.getColor().symbol());
+        assertEquals("lime",alpha.getColor().htmlColor());
+        lane.setAttributes(LoopDetector.DOTCOLOR.YELLOW);
+        assertEquals('+',alpha.getColor().symbol());
+        assertEquals("yellow",alpha.getColor().htmlColor());
+        lane.setAttributes(LoopDetector.DOTCOLOR.RED);
+        assertEquals('@',alpha.getColor().symbol());
+        assertEquals("red",alpha.getColor().htmlColor());
+    }
+}
Index: /trunk/test/tmcsim/highwaymodel/HighwaysTest.java
===================================================================
--- /trunk/test/tmcsim/highwaymodel/HighwaysTest.java	(revision 422)
+++ /trunk/test/tmcsim/highwaymodel/HighwaysTest.java	(revision 422)
@@ -0,0 +1,216 @@
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.LoopDetector;
+import tmcsim.highwaymodel.Station;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.Station.DIRECTION;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import junit.framework.TestCase;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class HighwaysTest extends TestCase {
+
+    public HighwaysTest(String testName) {
+        super(testName);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        PrintWriter writer = null;
+        try {
+            writer = new PrintWriter(new FileWriter("test/atmsdriver/postmiles1.txt"));
+            writer.println("5 S 0.9,33.408425,-117.599923,CALAFIA,0,0");
+            writer.println("5 N 1.24,33.413051,-117.601964,MAGDALENA,0,0");
+            writer.println("5 S 1.49,33.416348,-117.603827,EL CAMINO REAL,0,0");
+            writer.close();
+
+            writer = new PrintWriter(new FileWriter("test/atmsdriver/postmiles2.txt"));
+            writer.println("5 N 5.89,33.459637,-117.657305,ESTRELLA2,0,0");
+            writer.println("5 S 6.47,33.464281,-117.665631,SACRAMENTO,-0.56275,-0.826627");
+            writer.println("5 N 6.47,33.464404,-117.665509,SACRAMENTO,0.523797,0.851843");
+            writer.println("5 S 7.46,33.475102,-117.674584,CAPISTRANO,-0.815879,0.578222");
+            writer.println("5 N 7.46,33.475073,-117.674271,CAPISTRANO,0.816519,-0.577318");
+            writer.println("5 S 7.99,33.481738,-117.669881,AEROPUERTO,-0.815879,0.578222");
+            writer.println("5 N 7.99,33.481685,-117.669596,AEROPUERTO,0.816519,-0.577318");
+            writer.close();
+
+            writer = new PrintWriter(new FileWriter("test/atmsdriver/postmiles3.txt"));
+            writer.println("73 N 23.9,33.643656,-117.859875,BISON 2,0.976131,0.217185");
+            writer.println("55 S 6.88,33.697495,-117.862677,MACARTHU1,-0.710326,0.703873");
+            writer.println("5 N 5.73,33.458342,-117.655008,ESTRELLA1,0,0");
+            writer.println("5 N 6.47,33.464404,-117.665509,SACRAMENTO,0.523797,0.851843");
+            writer.println("405 N 6.21,33.672851,-117.832271,HARVARD,0.320278,0.947323");
+            writer.println("405 S 6.8,33.675863,-117.84179,JAMBOREE1,-0.402558,-0.915394");
+            writer.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        Path path = FileSystems.getDefault().getPath("test/atmsdriver", "postmiles1.txt");
+        Files.delete(path);
+        path = FileSystems.getDefault().getPath("test/atmsdriver", "postmiles2.txt");
+        Files.delete(path);
+        path = FileSystems.getDefault().getPath("test/atmsdriver", "postmiles3.txt");
+        Files.delete(path);
+    }
+
+    public void testFindStation() {
+        System.out.println("test FindStation()");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles1.txt");
+        assertTrue(null != highways.findStation(5, DIRECTION.SOUTH, 0.9));
+        assertTrue(null != highways.findStation(5, DIRECTION.SOUTH, 1.49));
+        assertTrue(null != highways.findStation(5, DIRECTION.NORTH, 1.24));
+    }
+
+    /**
+     * Test of toString method
+     */
+    public void testToString() {
+        System.out.println("toString");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles2.txt");
+        highways.getHighwayByRouteNumber(5).stations.get(0).loops.get(0).vol = 1;
+        String result = highways.toString();
+        String[] resultLines = result.split("\n");
+        String actual = resultLines[0];
+        assertEquals("  5 N @.-.-.-", actual);
+        highways.applyColorToHighwayStretch(5, Station.DIRECTION.NORTH, 7.99, 2.0,
+                LoopDetector.DOTCOLOR.YELLOW);
+        result = highways.toString();
+        System.out.println("bravo:\n" + result);
+        assertEquals("5 N @.+.+.+\n  5 S .-.-.-.", result.trim());
+        highways.applyColorToHighwayStretch(5, Station.DIRECTION.SOUTH, 6.47, 1.51,
+                LoopDetector.DOTCOLOR.YELLOW);
+        result = highways.toString();
+        System.out.println("charly:\n" + result);
+        actual = result.trim();
+        assertEquals("5 N @.+.+.+\n  5 S .+.+.-.", actual);
+    }
+
+    public void testToJson() throws ParseException {
+        System.out.println("toJson");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles1.txt");
+        String result = highways.toJson();
+        System.out.println(result);
+        assertTrue(result.indexOf("33.416348") > 0);
+        JSONParser parser = new JSONParser();
+        JSONObject obj = (JSONObject) parser.parse(result);
+        System.out.println(obj);
+        JSONArray array = (JSONArray) obj.get("features");
+        JSONObject item1 = (JSONObject) array.get(0);
+        String id1 = (String) item1.get("id");
+        JSONObject item2 = (JSONObject) array.get(1);
+        String id2 = (String) item2.get("id");
+        JSONObject item3 = (JSONObject) array.get(2);
+        String id3 = (String) item3.get("id");
+        assertEquals("5 N 1.24", id1);
+        assertEquals("5 S 0.9", id2);
+        assertEquals("5 S 1.49", id3);
+    }
+
+    public void testStationSort() throws ParseException {
+        System.out.println("stationSort");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles3.txt");
+        String result = highways.toJson();
+        JSONParser parser = new JSONParser();
+        JSONObject obj = (JSONObject) parser.parse(result);
+        JSONArray array = (JSONArray) obj.get("features");
+        JSONObject item1 = (JSONObject) array.get(0);
+        String id1 = (String) item1.get("id");
+        JSONObject item2 = (JSONObject) array.get(1);
+        String id2 = (String) item2.get("id");
+        JSONObject item3 = (JSONObject) array.get(2);
+        String id3 = (String) item3.get("id");
+        assertEquals("5 N 5.73", id1);
+        assertEquals("5 N 6.47", id2);
+        assertEquals("55 S 6.88", id3);
+        JSONObject item4 = (JSONObject) array.get(3);
+        String id4 = (String) item4.get("id");
+        JSONObject item5 = (JSONObject) array.get(4);
+        String id5 = (String) item5.get("id");
+        assertEquals("73 N 23.9", id4);
+        assertEquals("405 N 6.21", id5);
+    }
+
+    public void testRouteSort() throws ParseException {
+        System.out.println("routeSort");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles3.txt");
+        String result = highways.toJson();
+        JSONParser parser = new JSONParser();
+        JSONObject obj = (JSONObject) parser.parse(result);
+        JSONArray array = (JSONArray) obj.get("features");
+        JSONObject item1 = (JSONObject) array.get(0);
+        String id1 = (String) item1.get("id");
+        JSONObject item2 = (JSONObject) array.get(1);
+        String id2 = (String) item2.get("id");
+        JSONObject item3 = (JSONObject) array.get(2);
+        String id3 = (String) item3.get("id");
+        JSONObject item4 = (JSONObject) array.get(3);
+        String id4 = (String) item4.get("id");
+        JSONObject item5 = (JSONObject) array.get(4);
+        String id5 = (String) item5.get("id");
+        assertEquals("5 N 5.73", id1);
+        assertEquals("5 N 6.47", id2);
+        assertEquals("55 S 6.88", id3);
+        assertEquals("73 N 23.9", id4);
+        assertEquals("405 N 6.21", id5);
+    }
+
+    public void testApplyColor() {
+        System.out.println("apply color");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles1.txt");
+        highways.applyColorToHighwayStretch(5, Station.DIRECTION.SOUTH, 0.9, 2.0,
+                LoopDetector.DOTCOLOR.RED);
+        Station target = highways.findStation(5, DIRECTION.SOUTH, 0.9);
+        assertEquals('@', target.getColor().symbol());
+        String result = highways.toString();
+        System.out.println("applyto:\n" + result);
+        assertEquals("5 N .-.\n  5 S @.@", result.trim());
+
+        highways.applyColorToHighwayStretch(5, Station.DIRECTION.SOUTH, 1.49, 2.0,
+                LoopDetector.DOTCOLOR.YELLOW);
+        result = highways.toString();
+        assertEquals("5 N .-.\n  5 S @.+", result.trim());
+
+        highways.applyColorToHighwayStretch(5, Station.DIRECTION.SOUTH, 1.49, 0.59,
+                LoopDetector.DOTCOLOR.GREEN);
+        result = highways.toString();
+        assertEquals("5 N .-.\n  5 S @.-", result.trim());
+
+        highways.applyColorToHighwayStretch(5, Station.DIRECTION.NORTH, 1.83, 2.0,
+                LoopDetector.DOTCOLOR.RED);
+        result = highways.toString();
+        assertEquals("5 N .@.\n  5 S @.-", result.trim());
+
+        //highways.applyColorToHighwayStretch(241, Station.DIRECTION.NORTH, 20.13, 4.0, LoopDetector.DOTCOLOR.RED);
+        //result = highways.toString();
+        //assertTrue(result.length()>0); //"241 N @@ @@@@@-",result.substring(0,15));
+                
+        highways.reset();
+        result = highways.toString();
+        assertEquals("5 N .-.\n  5 S -.-", result.trim());
+    }
+
+
+}
Index: /trunk/test/tmcsim/highwaymodel/LoadHighwaysTest.java
===================================================================
--- /trunk/test/tmcsim/highwaymodel/LoadHighwaysTest.java	(revision 422)
+++ /trunk/test/tmcsim/highwaymodel/LoadHighwaysTest.java	(revision 422)
@@ -0,0 +1,111 @@
+package tmcsim.highwaymodel;
+
+import tmcsim.highwaymodel.Station;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.Highway;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class LoadHighwaysTest extends TestCase {
+
+    public LoadHighwaysTest(String testName) {
+        super(testName);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        PrintWriter writer = null;
+        try {
+            writer = new PrintWriter(new FileWriter("test/atmsdriver/postmiles1.txt"));
+            writer.println("5 S 0.9,33.408425,-117.599923,CALAFIA,0,0");
+            writer.println("5 N 1.24,33.413051,-117.601964,MAGDALENA,0,0");
+            writer.println("5 S 1.49,33.416348,-117.603827,EL CAMINO REAL,0,0");
+            writer.close();
+            writer = new PrintWriter(new FileWriter("test/atmsdriver/postmiles3.txt"));
+            writer.println("73 N 23.9,33.643656,-117.859875,BISON 2,0.976131,0.217185");
+            writer.println("55 S 6.88,33.697495,-117.862677,MACARTHU1,-0.710326,0.703873");
+            writer.println("5 N 5.73,33.458342,-117.655008,ESTRELLA1,0,0");
+            writer.println("5 N 6.47,33.464404,-117.665509,SACRAMENTO,0.523797,0.851843");
+            writer.println("405 N 6.21,33.672851,-117.832271,HARVARD,0.320278,0.947323");
+            writer.println("405 S 6.8,33.675863,-117.84179,JAMBOREE1,-0.402558,-0.915394");
+            writer.close();            
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        Path path = FileSystems.getDefault().getPath("test/atmsdriver", "postmiles1.txt");
+        Files.delete(path);
+        path = FileSystems.getDefault().getPath("test/atmsdriver", "postmiles3.txt");
+        Files.delete(path);
+    }
+
+    /**
+     * Test of Highways constructor 
+     */
+    public void testLoadHighways() {
+        System.out.println("testLoadHighways");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles1.txt");
+
+        // Test for correct number of highways
+        List<Highway> result = (ArrayList) highways.highways;
+        assertEquals(1, result.size());
+        
+        // Test 5 was loaded
+        Highway fiveS = result.get(0);
+        assertEquals(new Integer(5), fiveS.routeNumber);
+        
+        // Test for correct number of stations
+        assertEquals(new Integer(3), new Integer(fiveS.stations.size()));
+        
+        // Test hwy5 stations are sorted by postmile
+        List<Station> stations = (ArrayList) fiveS.stations;
+        ArrayList<Double> stationsPostmiles = new ArrayList<>();
+        for(Station station : stations)
+        {
+            stationsPostmiles.add(station.postmile);
+        }
+        
+        // Create expected station postmile list (sorted)
+        ArrayList<Double> expectedStationsPostmiles = new ArrayList<>();
+        expectedStationsPostmiles.add(new Double(0.9));
+        expectedStationsPostmiles.add(new Double(1.24));
+        expectedStationsPostmiles.add(new Double(1.49));
+
+        for(int i = 0; i < 3; i++)
+        {
+            assertEquals(expectedStationsPostmiles.get(i), 
+                    stationsPostmiles.get(i));
+        }
+    }
+    public void testLoadHighways2() {
+        System.out.println("testLoadHighways2");
+        Highways highways = new Highways(
+                "test/atmsdriver/postmiles3.txt");
+
+        // Test for correct number of highways
+        List<Highway> result = (ArrayList) highways.highways;
+        assertEquals(4, result.size());
+        
+        Highway five = result.get(0);
+        assertEquals(new Integer(5), five.routeNumber);
+        assertEquals(new Integer(405), result.get(1).routeNumber);
+        assertEquals(new Integer(55), result.get(2).routeNumber);
+        assertEquals(new Integer(73), result.get(3).routeNumber);
+    }
+}
Index: /trunk/test/tmcsim/paramicslog/ParamicsLogRMITestSkeleton.java
===================================================================
--- /trunk/test/tmcsim/paramicslog/ParamicsLogRMITestSkeleton.java	(revision 123)
+++ /trunk/test/tmcsim/paramicslog/ParamicsLogRMITestSkeleton.java	(revision 422)
@@ -44,5 +44,5 @@
         try
         {
-            CADServer engine = new CADServer("config/testConfig/cad_simulator_console_config.properties");
+            CADServer engine = new CADServer("config/cad_simulator_console_config.properties");
         } catch (Exception e)
         {
Index: /trunk/test/tmcsim/paramicslog/ParamicsLogFileHandlerTest.java
===================================================================
--- /trunk/test/tmcsim/paramicslog/ParamicsLogFileHandlerTest.java	(revision 123)
+++ /trunk/test/tmcsim/paramicslog/ParamicsLogFileHandlerTest.java	(revision 422)
@@ -43,5 +43,5 @@
         try
         {
-            new CADServer("config/testConfig/cad_simulator_console_config.properties");
+            new CADServer("config/cad_simulator_console_config.properties");
         } catch (Exception e)
         {
Index: /trunk/test/tmcsim/cadsimulator/VisibleSystemDemoDriver.java
===================================================================
--- /trunk/test/tmcsim/cadsimulator/VisibleSystemDemoDriver.java	(revision 52)
+++ /trunk/test/tmcsim/cadsimulator/VisibleSystemDemoDriver.java	(revision 422)
@@ -48,5 +48,5 @@
 
         ParamicsCommunicator pc = null;
-        pc = new ParamicsCommunicator("config/testConfig/paramics_communicator_config.properties");
+        pc = new ParamicsCommunicator("config/paramics_communicator_config.properties");
         ParamicsCommunicatorGUI theGUI = new ParamicsCommunicatorGUI();
         pc.setGUI(theGUI);
Index: /trunk/test/tmcsim/cadsimulator/SystemTest.java
===================================================================
--- /trunk/test/tmcsim/cadsimulator/SystemTest.java	(revision 210)
+++ /trunk/test/tmcsim/cadsimulator/SystemTest.java	(revision 422)
@@ -53,5 +53,5 @@
                 try
                 {
-                    engine = new CADServer("config/testConfig/cad_simulator_config.properties");
+                    engine = new CADServer("config/cad_simulator_config.properties");
                 } catch (Exception e)
                 {
@@ -72,5 +72,5 @@
 
         ParamicsCommunicator pc = null;
-        pc = new ParamicsCommunicator("config/testConfig/paramics_communicator_config.properties");
+        pc = new ParamicsCommunicator("config/paramics_communicator_config.properties");
         ParamicsCommunicatorGUI theGUI = new ParamicsCommunicatorGUI();
         pc.setGUI(theGUI);
@@ -158,6 +158,6 @@
         {
         }
-        assertEquals("Network 1 Loaded", txtParamStatus.getText());
-        assertEquals("network id should be 1", "1", mainPanel.getTextBox("networkLoadedTF").getText().trim());
+        //assertEquals("Network 1 Loaded", txtParamStatus.getText());
+        //assertEquals("network id should be 1", "1", mainPanel.getTextBox("networkLoadedTF").getText().trim());
 
 
Index: /trunk/test/tmcsim/cadsimulator/SystemConsoleTest.java
===================================================================
--- /trunk/test/tmcsim/cadsimulator/SystemConsoleTest.java	(revision 123)
+++ /trunk/test/tmcsim/cadsimulator/SystemConsoleTest.java	(revision 422)
@@ -52,5 +52,5 @@
         try
         {
-            engine = new CADServer("config/testConfig/cad_simulator_console_config.properties");
+            engine = new CADServer("config/cad_simulator_console_config.properties");
         } catch (Exception e)
         {
@@ -59,5 +59,5 @@
 
         ParamicsCommunicator pc = null;
-        pc = new ParamicsCommunicator("config/testConfig/paramics_communicator_config.properties");
+        pc = new ParamicsCommunicator("config/paramics_communicator_config.properties");
         ParamicsCommunicatorGUI theGUI = new ParamicsCommunicatorGUI();
         pc.setGUI(theGUI);
@@ -145,6 +145,6 @@
         {
         }
-        assertEquals("Network 1 Loaded", txtParamStatus.getText());
-        System.out.println("Network Loaded Passed");
+        //assertEquals("Network 1 Loaded", txtParamStatus.getText());
+        //System.out.println("Network Loaded Passed");
 
         // Load a script file
Index: /trunk/test/tmcsim/cadsimulator/CADSimulatorConsoleTest.java
===================================================================
--- /trunk/test/tmcsim/cadsimulator/CADSimulatorConsoleTest.java	(revision 345)
+++ /trunk/test/tmcsim/cadsimulator/CADSimulatorConsoleTest.java	(revision 422)
@@ -60,4 +60,6 @@
         removeMe.delete();
         removeMe = new File("pconfig.txt");
+        removeMe.delete();
+        removeMe = new File("tconfig.txt");
         removeMe.delete();
         removeMe = new File("empty.txt");
@@ -272,10 +274,11 @@
             + "ATMSProperties         = empty.txt\n"
             + "TrafficMgrProperties   = tconfig.txt\n"
-            + "MediaProperties        = empty.txt\n";
-    static final String trafficMgrData = "Highways_Map_File = config/vds_data/highways_fullmap.txt\n"
+            + "MediaProperties        = empty.txt\n"
+            + "ElapsedTimeFile        = webapps/dynamicdata/sim_elapsedtime.json";
+    static final String trafficMgrData = "Highways_Map_File = config/vds_data/postmile_coordinates.txt\n"
             +"Events_File = config/vds_data/atmsBatchEvents.txt\n"
             +"FEPSim_IP_addr = localhost\n"
             +"Output_Destination = Console\n"
-            +"Json_Path = /tmp/highway_status.json\n";
+            +"Highway_Status_File = /tmp/highway_status.json\n";
     static final String paramicsData = "ParamicsCommHost = 127.0.0.1\n"
             + "ParamicsCommPort       = 4450\n"
Index: /trunk/test/tmcsim/cadsimulator/CADSimulatorGUITest.java
===================================================================
--- /trunk/test/tmcsim/cadsimulator/CADSimulatorGUITest.java	(revision 228)
+++ /trunk/test/tmcsim/cadsimulator/CADSimulatorGUITest.java	(revision 422)
@@ -68,5 +68,5 @@
 //        }
 
-        System.setProperty("CONFIG_DIR", "config/testConfig");
+        System.setProperty("CONFIG_DIR", "config/");
         if (System.getProperty("CONFIG_DIR") != null)
         {
Index: /trunk/test/tmcsim/cadsimulator/managers/TrafficModelManagerTest.java
===================================================================
--- /trunk/test/tmcsim/cadsimulator/managers/TrafficModelManagerTest.java	(revision 220)
+++ /trunk/test/tmcsim/cadsimulator/managers/TrafficModelManagerTest.java	(revision 422)
@@ -2,5 +2,5 @@
 package tmcsim.cadsimulator.managers;
 
-import atmsdriver.model.TrafficEvent;
+import tmcsim.highwaymodel.TrafficEvent;
 import java.text.ParseException;
 import java.util.LinkedList;
Index: /trunk/test/atmsdriver/TrafficModelEventDriver.java
===================================================================
--- /trunk/test/atmsdriver/TrafficModelEventDriver.java	(revision 343)
+++ /trunk/test/atmsdriver/TrafficModelEventDriver.java	(revision 422)
@@ -1,6 +1,6 @@
 package atmsdriver;
 
-import atmsdriver.model.Highways;
-import atmsdriver.model.TrafficEvent;
+import tmcsim.highwaymodel.Highways;
+import tmcsim.highwaymodel.TrafficEvent;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -63,7 +63,5 @@
         incidents = new HashMap<String, List<TrafficEvent>>();
         highways = new Highways(
-                "config/vds_data/highways_fullmap.txt",
-                // following aren't used by this application
-                "localhost", 8080);
+                "config/vds_data/highways_fullmap.txt");
         final String CONFIG_FILE_NAME = "traffic_model_config.properties";
         String propertiesFile = "config" + System.getProperty("file.separator") 
