Index: /trunk/IDE_metadata/NetBeans/TMCSim/nbproject/project.properties
===================================================================
--- /trunk/IDE_metadata/NetBeans/TMCSim/nbproject/project.properties	(revision 257)
+++ /trunk/IDE_metadata/NetBeans/TMCSim/nbproject/project.properties	(revision 343)
@@ -1,4 +1,5 @@
 #Fri Oct 06 15:14:08 PDT 2017
 excludes=
+file.reference.json-simple-1.1.jar=../../../lib/json-simple-1.1.jar
 file.reference.SimTimeSelector_r28.jar=../../../lib/SimTimeSelector_r28.jar
 file.reference.xercesImpl.jar=../../../lib/xercesImpl.jar
@@ -52,5 +53,6 @@
     ${build.classes.dir}:\
     ${libs.junit_4.classpath}:\
-    ${libs.hamcrest.classpath}
+    ${libs.hamcrest.classpath}:\
+    ${file.reference.json-simple-1.1.jar}
 build.generated.dir=${build.dir}/generated
 jar.compress=false
Index: /trunk/src/atmsdriver/model/Highway.java
===================================================================
--- /trunk/src/atmsdriver/model/Highway.java	(revision 237)
+++ /trunk/src/atmsdriver/model/Highway.java	(revision 343)
@@ -3,5 +3,9 @@
 import atmsdriver.model.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;
 
 /**
@@ -18,5 +22,7 @@
     /** 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 
      * 
@@ -28,21 +34,12 @@
         this.routeNumber = routeNumber;
         this.stations = stations;
-    }
-    
-    /**
-     * 
-     */
-    public List<DIRECTION> getDirections()
-    {
-                    // Get available directions for route
-            ArrayList<DIRECTION> availDirs = new ArrayList<>();
+        // Get available directions for route
+        if (stations != null)
+        {
             for(Station stn : stations)
             {
-                if(!availDirs.contains(stn.direction))
-                {
-                    availDirs.add(stn.direction);
-                }
+                availDirs.add(stn.direction);
             }
-            return availDirs;
+        }
     }
     
Index: /trunk/src/atmsdriver/model/Station.java
===================================================================
--- /trunk/src/atmsdriver/model/Station.java	(revision 285)
+++ /trunk/src/atmsdriver/model/Station.java	(revision 343)
@@ -8,21 +8,21 @@
 
 /**
- * A Station (LDS or Loop Detector Station) represents a group of lane detectors
- * across all lanes at a particular point on a highway. A station is identified
+ * 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, ldsID, drop, and location which are used by the FEP. A
+ * 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
- * @version 9/10/2017
+ * @author John A. Torres, jdalbey
+ * @version 9/10/2017, 3/22/2019
  */
-public class Station implements Comparable
+public final class Station implements Comparable
 {
 
     /* Static Station meta data */
     final public int lineID;
-    final public int ldsID; // double check
+    final public int vdsID; // double check
     final public int drop;
     final public String location;
@@ -37,10 +37,10 @@
 
     /* Constructor */
-    public Station(int lineID, int ldsID, int drop,
+    public Station(int lineID, int vdsID, int drop,
             String location, List<LoopDetector> loops, int hwy,
             DIRECTION direction, double postmile)
     {
         this.lineID = lineID;
-        this.ldsID = ldsID;
+        this.vdsID = vdsID;
         this.drop = drop;
         this.loops = loops;
@@ -109,5 +109,5 @@
     {
         StringBuilder build = new StringBuilder();
-        build.append(Integer.toString(this.ldsID));
+        build.append(Integer.toString(this.vdsID));
         build.append(" ");
         build.append(Integer.toString(this.drop));
@@ -170,4 +170,15 @@
 
     /**
+     * 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.
@@ -178,26 +189,24 @@
     public void updateByDirection(DIRECTION direction, DOTCOLOR dotColor)
     {
-        String laneDir = "OS";
+        // Is this station going in the desired direction?
         if (direction.equals(this.direction))
         {
-            laneDir = "ML";
-        }
-        outputUpdateMessage(dotColor, laneDir);
-
-        for (LoopDetector loop : loops)
-        {
-            // THIS DECISION ISN'T NEEDED after JD's BuildHighwayFile pgm
-            // creates a highway map based on VDS instead of Controller (LDS).
-//            if (loop.loopLocation.startsWith(laneDir))
-//            {
-                // UPDATE LOOP WITH VALUES
-                loop.updateLoop(dotColor.volume(), dotColor.occupancy());
-//            }
-        }
-
-        this.MLTotVol = getMLTotVol();
-        this.OppTotVol = getOPPTotVol();
-    }
-    
+            outputUpdateMessage(dotColor, direction.toString());
+
+            for (LoopDetector loop : loops)
+            {
+                // THIS DECISION ISN'T NEEDED after JD's BuildHighwayFile pgm
+                // creates a highway map based on VDS instead of Controller (LDS).
+    //            if (loop.loopLocation.startsWith(laneDir))
+    //            {
+                    // UPDATE LOOP WITH VALUES
+                    loop.updateLoop(dotColor.volume(), dotColor.occupancy());
+    //            }
+            }
+
+            this.MLTotVol = getMLTotVol();
+            this.OppTotVol = getOPPTotVol();
+        }
+    }
     /**
      * Return the color for the lanes in a given direction.
@@ -316,5 +325,5 @@
 
         Element ldsIDElement = theDoc.createElement(XML_TAGS.LDS_ID.tag);
-        ldsIDElement.appendChild(theDoc.createTextNode(String.valueOf(this.ldsID)));
+        ldsIDElement.appendChild(theDoc.createTextNode(String.valueOf(this.vdsID)));
         stationElement.appendChild(ldsIDElement);
 
@@ -422,5 +431,5 @@
     public String toString()
     {
-        return Integer.toString(this.ldsID);
+        return Integer.toString(this.vdsID)+this.getColor();
     }
 }
Index: /trunk/src/atmsdriver/model/Highways.java
===================================================================
--- /trunk/src/atmsdriver/model/Highways.java	(revision 306)
+++ /trunk/src/atmsdriver/model/Highways.java	(revision 343)
@@ -43,8 +43,4 @@
  * FEP Simulator.
  *
- * Currently, there is no driving logic within the highways class. It is only
- * done through an instance of the ConsoleDriver.java class. Eventually, it will
- * receive incident data (from exchange.xml or better yet, directly from the
- * TMCSimulator itself) and drive the highways using resident logic.
  *
  * @author John A. Torres
@@ -124,4 +120,32 @@
     }
 
+    /** 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
@@ -158,5 +182,5 @@
         // postmiles increase from s to n and w to e
         // if the direction is south or west
-        if (direction.equals(Station.DIRECTION.SOUTH) || direction.equals(Station.DIRECTION.WEST))
+        if (direction.equals(Station.DIRECTION.NORTH) || direction.equals(Station.DIRECTION.EAST))
         {
             // add range value to startPost to get
@@ -440,5 +464,5 @@
     /**
      * Returns the Highways model data in XML format.
-     * 
+     * Probably obsolete, since we aren't using exchange.xml any longer.
      * @return highways data in XML format
      */
@@ -507,5 +531,5 @@
         {
             // Consider each route direction
-            for (DIRECTION dir: DIRECTION.values())
+            for (DIRECTION dir: hwy.availDirs)
             {
                 String rowLabel = ""+String.format("%3s ",hwy.routeNumber)+dir.getLetter()+' ';
@@ -514,7 +538,14 @@
                 for (Station stat: hwy.stations)
                 {
+                    if (stat.direction.equals(dir))
+                    {
                     //lineout.append("" + dir.getLetter() + stat.postmile);
                     lineout.append(stat.getColor());
                     //lineout.append("  ");
+                    }
+                    else 
+                    {
+                        lineout.append(".");
+                    }
                 }
                 // See if there were stations for this direction
Index: /trunk/src/atmsdriver/model/LoopDetector.java
===================================================================
--- /trunk/src/atmsdriver/model/LoopDetector.java	(revision 242)
+++ /trunk/src/atmsdriver/model/LoopDetector.java	(revision 343)
@@ -94,4 +94,5 @@
         {
             build.append(this.loopLocationID);
+            build.append(" ");
         }
         build.append(this.loopLocation);
Index: /trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java
===================================================================
--- /trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java	(revision 257)
+++ /trunk/src/atmsdriver/trafficeventseditor/TrafficEventsEditor.java	(revision 343)
@@ -90,5 +90,5 @@
                 TrafficLaneEvent currEvent = currFrame.events.get(i);
                 data[i][0] = Integer.toString(currEvent.routeNum);
-                data[i][1] = Integer.toString(currEvent.station.ldsID);
+                data[i][1] = Integer.toString(currEvent.station.vdsID);
                 data[i][2] = Double.toString(currEvent.station.postmile);
                 data[i][3] = Integer.toString(currEvent.loopDetector.loopID);
@@ -285,5 +285,5 @@
             for(int i = 0; i < rows; i++)
             {
-                data[i][0] = Integer.toString(hwy.stations.get(i).ldsID);
+                data[i][0] = Integer.toString(hwy.stations.get(i).vdsID);
                 data[i][1] = hwy.stations.get(i).direction.getLetter();
                 data[i][2] = Double.toString(hwy.stations.get(i).postmile);
Index: /trunk/src/tmcsim/application.properties
===================================================================
--- /trunk/src/tmcsim/application.properties	(revision 340)
+++ /trunk/src/tmcsim/application.properties	(revision 343)
@@ -1,5 +1,5 @@
-#Sat, 23 Mar 2019 09:47:19 -0700
+#Sat, 23 Mar 2019 19:09:36 -0700
 
-Application.revision=339
+Application.revision=342
 
 Application.buildnumber=108
Index: /trunk/test/atmsdriver/TrafficModelEventDriver.java
===================================================================
--- /trunk/test/atmsdriver/TrafficModelEventDriver.java	(revision 204)
+++ /trunk/test/atmsdriver/TrafficModelEventDriver.java	(revision 343)
@@ -20,4 +20,6 @@
 
 /**
+ * OBSOLETE: An interactive version is now available:
+ *    atmsdriver.TrafficEventsAnimator.java
  * Read and process all Traffic Events in a file and show
  * resulting highway network. 
Index: /trunk/test/atmsdriver/model/HighwayTest.java
===================================================================
--- /trunk/test/atmsdriver/model/HighwayTest.java	(revision 343)
+++ /trunk/test/atmsdriver/model/HighwayTest.java	(revision 343)
@@ -0,0 +1,54 @@
+
+package atmsdriver.model;
+
+import atmsdriver.model.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/atmsdriver/model/StationTest.java
===================================================================
--- /trunk/test/atmsdriver/model/StationTest.java	(revision 186)
+++ /trunk/test/atmsdriver/model/StationTest.java	(revision 343)
@@ -74,4 +74,10 @@
     }
 
+    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));
+    }
     /**
      * TODO: Test of toXML method, of class Station.
Index: /trunk/test/atmsdriver/model/HighwaysTest.java
===================================================================
--- /trunk/test/atmsdriver/model/HighwaysTest.java	(revision 340)
+++ /trunk/test/atmsdriver/model/HighwaysTest.java	(revision 343)
@@ -2,4 +2,6 @@
 
 import archive.ATMSDriver;
+import atmsdriver.model.LoopDetector.DOTCOLOR;
+import atmsdriver.model.Station.DIRECTION;
 import java.io.File;
 import java.io.FileWriter;
@@ -9,4 +11,8 @@
 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;
 
 /**
@@ -28,38 +34,20 @@
             writer.println("2");
             writer.println("32 0 2");
-            writer.println("1210831 1 5 S 0.9 8 CALAFIA");
+            writer.println("1210831 1 5 S 0.9 4 CALAFIA");
             writer.println("1210832 ML ML_1");
             writer.println("1210833 ML ML_2");
             writer.println("1210834 ML ML_3");
             writer.println("1210835 ML ML_4");
-            writer.println("1210836 PA PASSAGE");
-            writer.println("1210837 DM DEMAND");
-            writer.println("1210838 QU QUEUE");
-            writer.println("1210839 FR RAMP_OFF");
-            writer.println("1210845 2 5 S 1.49 9 EL CAMINO REAL");
+            writer.println("1210845 2 5 S 1.49 4 EL CAMINO REAL");
             writer.println("1210846 ML ML_1");
             writer.println("1210847 ML ML_2");
             writer.println("1210848 ML ML_3");
             writer.println("1210849 ML ML_4");
-            writer.println("1210850 OR RAMP_ON");
-            writer.println("1210851 PA PASSAGE");
-            writer.println("1210853 DM DEMAND");
-            writer.println("1210854 QU QUEUE");
-            writer.println("1210855 FR RAMP_OFF");
             writer.println("74 0 1");
-            writer.println("1204203 2 5 N 1.26 13 MAGDALENA");
-            writer.println("1204205 OR RAMP_ON");
-            writer.println("1204206 QU QUEUE");
-            writer.println("1204207 DM DEMAND");
-            writer.println("1204208 PA PASSAGE");
-            writer.println("1204210 FR RAMP_OFF");
+            writer.println("1204203 2 5 N 1.26 4 MAGDALENA");
             writer.println("1204212 ML ML_1");
             writer.println("1204213 ML ML_2");
             writer.println("1204214 ML ML_3");
             writer.println("1204215 ML ML_4");
-            writer.println("1204217 OS OS_1");
-            writer.println("1204218 OS OS_2");
-            writer.println("1204219 OS OS_3");
-            writer.println("1204220 OS OS_4");
             writer.close();
         } catch (Exception e) {
@@ -75,4 +63,15 @@
     }
 
+    public void testFindStation()
+    {
+        System.out.println("test FindStation()");
+        Highways highways = new Highways(
+                "test/atmsdriver/model/ldssample.txt",
+                "localhost", 8080);
+        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.26));
+        assertTrue(null == highways.findStation(5, DIRECTION.SOUTH, 1.1));
+    }
     /**
      * Test of toString method
@@ -86,16 +85,23 @@
         String result = highways.toString();
         System.out.println(result);
-        assertTrue(result.startsWith(expToString1));
-        highways.applyColorToHighwayStretch(241, Station.DIRECTION.NORTH, 20.13, 4.0, LoopDetector.DOTCOLOR.RED);
-        result = highways.toString();
-        assertEquals("241 N @@ @@@@@-",result.substring(0,15));
-    }
-    String expToString1 = 
-    "241 N -- ------ -- ------- -------------------------------------  \n" +
-"241 S   - --- --  --------- ------------------------------------  \n" +
-"  5 N  - - ------ ---  --- -- --- ----  - -- - -  -- - - -    -- -- - ---- -- -- --- - - -- -  ----- ----- --- -  - -- --  - - ---- - - - ------- \n" +
-"  5 S @--";
-
-    public void testToJson() {
+        String[] resultLines = result.split("\n");
+        String actual = resultLines[3].substring(0,9);
+        assertEquals("  5 S @.-",actual);
+        highways.applyColorToHighwayStretch(241, Station.DIRECTION.NORTH, 18.08, 1.0, 
+                LoopDetector.DOTCOLOR.RED);
+        result = highways.toString();
+        System.out.println("bravo:\n"+result);
+        assertEquals("241 N -@.@@.-",result.substring(0,13));
+        highways.applyColorToHighwayStretch(241, Station.DIRECTION.SOUTH, 20.13, 2.0, 
+                LoopDetector.DOTCOLOR.YELLOW);
+        result = highways.toString();
+        System.out.println("charly:\n"+result);
+        resultLines = result.split("\n");
+        actual = resultLines[1].substring(0,16);
+        assertEquals("241 S ..+..+.++.",actual);
+    }
+
+
+    public void testToJson() throws ParseException {
         System.out.println("toJson");
         Highways highways = new Highways(
@@ -105,4 +111,17 @@
         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");
+        assertEquals("5 S 0.9", id1);
+        JSONObject item2 = (JSONObject)array.get(1);
+        String id2 = (String) item2.get("id");
+        assertEquals("5 N 1.26", id2);
+        JSONObject item3 = (JSONObject)array.get(2);
+        String id3 = (String) item3.get("id");
+        assertEquals("5 S 1.49", id3);
     }
    
@@ -113,10 +132,30 @@
             "test/atmsdriver/model/ldssample.txt",
             "localhost", 8080);
-        highways.applyColorToHighwayStretch(5, Station.DIRECTION.SOUTH, 0.9, 2.0, LoopDetector.DOTCOLOR.RED);
+        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());
         String result = highways.toString();
-        assertEquals("5 N @@@", result.trim().substring(0,7));
-        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));
+        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, 0.1, 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));
 
     }            
@@ -131,4 +170,5 @@
         String actualCondensedFormatMeta = highways.toCondensedFormat(true);
         String actualCondensedFormatFEP = highways.toCondensedFormat(false);
+        System.out.println(actualCondensedFormatMeta);
         
         assertEquals(expectedCondensedFormatFEP, actualCondensedFormatFEP);
@@ -138,321 +178,39 @@
             "2\n" +
             "32 0 2\n" +
-            "1210831 1 5 S 0.9 8 CALAFIA\n" +
-            "1210832 ML_1\n" +
-            "1210833 ML_2\n" +
-            "1210834 ML_3\n" +
-            "1210835 ML_4\n" +
-            "1210836 PASSAGE\n" +
-            "1210837 DEMAND\n" +
-            "1210838 QUEUE\n" +
-            "1210839 RAMP_OFF\n" +
-            "1210845 2 5 S 1.49 9 EL CAMINO REAL\n" +
-            "1210846 ML_1\n" +
-            "1210847 ML_2\n" +
-            "1210848 ML_3\n" +
-            "1210849 ML_4\n" +
-            "1210850 RAMP_ON\n" +
-            "1210851 PASSAGE\n" +
-            "1210853 DEMAND\n" +
-            "1210854 QUEUE\n" +
-            "1210855 RAMP_OFF\n" +
+            "1210831 1 5 S 0.9 4 CALAFIA\n" +
+            "1210832 ML ML_1\n" +
+            "1210833 ML ML_2\n" +
+            "1210834 ML ML_3\n" +
+            "1210835 ML ML_4\n" +
+            "1210845 2 5 S 1.49 4 EL CAMINO REAL\n" +
+            "1210846 ML ML_1\n" +
+            "1210847 ML ML_2\n" +
+            "1210848 ML ML_3\n" +
+            "1210849 ML ML_4\n" +
             "74 0 1\n" +
-            "1204203 2 5 N 1.26 13 MAGDALENA\n" +
-            "1204205 RAMP_ON\n" +
-            "1204206 QUEUE\n" +
-            "1204207 DEMAND\n" +
-            "1204208 PASSAGE\n" +
-            "1204210 RAMP_OFF\n" +
-            "1204212 ML_1\n" +
-            "1204213 ML_2\n" +
-            "1204214 ML_3\n" +
-            "1204215 ML_4\n" +
-            "1204217 OS_1\n" +
-            "1204218 OS_2\n" +
-            "1204219 OS_3\n" +
-            "1204220 OS_4\n";
+            "1204203 2 5 N 1.26 4 MAGDALENA\n" +
+            "1204212 ML ML_1\n" +
+            "1204213 ML ML_2\n" +
+            "1204214 ML ML_3\n" +
+            "1204215 ML ML_4\n";
     String expectedCondensedFormatFEP = 
             "2\n" +
             "32 0 2\n" +
-            "1210831 1 5 S 0.9 8 \n" +
+            "1210831 1 5 S 0.9 4 \n" +
             "1210832  0.0 0 ML_1\n" +
             "1210833  0.0 0 ML_2\n" +
             "1210834  0.0 0 ML_3\n" +
             "1210835  0.0 0 ML_4\n" +
-            "1210836  0.0 0 PASSAGE\n" +
-            "1210837  0.0 0 DEMAND\n" +
-            "1210838  0.0 0 QUEUE\n" +
-            "1210839  0.0 0 RAMP_OFF\n" +
-            "1210845 2 5 S 1.49 9 \n" +
+            "1210845 2 5 S 1.49 4 \n" +
             "1210846  0.0 0 ML_1\n" +
             "1210847  0.0 0 ML_2\n" +
             "1210848  0.0 0 ML_3\n" +
             "1210849  0.0 0 ML_4\n" +
-            "1210850  0.0 0 RAMP_ON\n" +
-            "1210851  0.0 0 PASSAGE\n" +
-            "1210853  0.0 0 DEMAND\n" +
-            "1210854  0.0 0 QUEUE\n" +
-            "1210855  0.0 0 RAMP_OFF\n" +
             "74 0 1\n" +
-            "1204203 2 5 N 1.26 13 \n" +
-            "1204205  0.0 0 RAMP_ON\n" +
-            "1204206  0.0 0 QUEUE\n" +
-            "1204207  0.0 0 DEMAND\n" +
-            "1204208  0.0 0 PASSAGE\n" +
-            "1204210  0.0 0 RAMP_OFF\n" +
+            "1204203 2 5 N 1.26 4 \n" +
             "1204212  0.0 0 ML_1\n" +
             "1204213  0.0 0 ML_2\n" +
             "1204214  0.0 0 ML_3\n" +
-            "1204215  0.0 0 ML_4\n" +
-            "1204217  0.0 0 OS_1\n" +
-            "1204218  0.0 0 OS_2\n" +
-            "1204219  0.0 0 OS_3\n" +
-            "1204220  0.0 0 OS_4\n";
+            "1204215  0.0 0 ML_4\n";
     
-    /**
-     * Test of toXML method
-     */
-    public void testToXML() {
-        System.out.println("toXML");
-        Highways highways = new Highways(
-                "test/atmsdriver/model/ldssample.txt",
-                "localhost", 8080);
-        String result = highways.toXML();
-        assertEquals(expXMLResult, result);
-    }
-String expXMLResult =
-"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" +
-"<Network>\n" +
-"  <Line>\n" +
-"    <Line_Num>32</Line_Num>\n" +
-"    <Count>0</Count>\n" +
-"    <Stations>\n" +
-"      <Station>\n" +
-"        <LDS_ID>1210831</LDS_ID>\n" +
-"        <Line_Num>32</Line_Num>\n" +
-"        <Drop>1</Drop>\n" +
-"        <Location>CALAFIA</Location>\n" +
-"        <Post_Mile>0.9</Post_Mile>\n" +
-"        <Direction>S</Direction>\n" +
-"        <Freeway>5</Freeway>\n" +
-"        <ML_Tot_Vol>0</ML_Tot_Vol>\n" +
-"        <Opp_Tot_Vol>0</Opp_Tot_Vol>\n" +
-"        <Loops>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210832</Loop_ID>\n" +
-"            <Loop_Location>ML_1</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210833</Loop_ID>\n" +
-"            <Loop_Location>ML_2</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210834</Loop_ID>\n" +
-"            <Loop_Location>ML_3</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210835</Loop_ID>\n" +
-"            <Loop_Location>ML_4</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210836</Loop_ID>\n" +
-"            <Loop_Location>PASSAGE</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210837</Loop_ID>\n" +
-"            <Loop_Location>DEMAND</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210838</Loop_ID>\n" +
-"            <Loop_Location>QUEUE</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210839</Loop_ID>\n" +
-"            <Loop_Location>RAMP_OFF</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"        </Loops>\n" +
-"      </Station>\n" +
-"      <Station>\n" +
-"        <LDS_ID>1210845</LDS_ID>\n" +
-"        <Line_Num>32</Line_Num>\n" +
-"        <Drop>2</Drop>\n" +
-"        <Location>EL CAMINO REAL</Location>\n" +
-"        <Post_Mile>1.49</Post_Mile>\n" +
-"        <Direction>S</Direction>\n" +
-"        <Freeway>5</Freeway>\n" +
-"        <ML_Tot_Vol>0</ML_Tot_Vol>\n" +
-"        <Opp_Tot_Vol>0</Opp_Tot_Vol>\n" +
-"        <Loops>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210846</Loop_ID>\n" +
-"            <Loop_Location>ML_1</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210847</Loop_ID>\n" +
-"            <Loop_Location>ML_2</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210848</Loop_ID>\n" +
-"            <Loop_Location>ML_3</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210849</Loop_ID>\n" +
-"            <Loop_Location>ML_4</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210850</Loop_ID>\n" +
-"            <Loop_Location>RAMP_ON</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210851</Loop_ID>\n" +
-"            <Loop_Location>PASSAGE</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210853</Loop_ID>\n" +
-"            <Loop_Location>DEMAND</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210854</Loop_ID>\n" +
-"            <Loop_Location>QUEUE</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1210855</Loop_ID>\n" +
-"            <Loop_Location>RAMP_OFF</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"        </Loops>\n" +
-"      </Station>\n" +
-"    </Stations>\n" +
-"  </Line>\n" +
-"  <Line>\n" +
-"    <Line_Num>74</Line_Num>\n" +
-"    <Count>0</Count>\n" +
-"    <Stations>\n" +
-"      <Station>\n" +
-"        <LDS_ID>1204203</LDS_ID>\n" +
-"        <Line_Num>74</Line_Num>\n" +
-"        <Drop>2</Drop>\n" +
-"        <Location>MAGDALENA</Location>\n" +
-"        <Post_Mile>1.26</Post_Mile>\n" +
-"        <Direction>N</Direction>\n" +
-"        <Freeway>5</Freeway>\n" +
-"        <ML_Tot_Vol>0</ML_Tot_Vol>\n" +
-"        <Opp_Tot_Vol>0</Opp_Tot_Vol>\n" +
-"        <Loops>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204205</Loop_ID>\n" +
-"            <Loop_Location>RAMP_ON</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204206</Loop_ID>\n" +
-"            <Loop_Location>QUEUE</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204207</Loop_ID>\n" +
-"            <Loop_Location>DEMAND</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204208</Loop_ID>\n" +
-"            <Loop_Location>PASSAGE</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204210</Loop_ID>\n" +
-"            <Loop_Location>RAMP_OFF</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204212</Loop_ID>\n" +
-"            <Loop_Location>ML_1</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204213</Loop_ID>\n" +
-"            <Loop_Location>ML_2</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204214</Loop_ID>\n" +
-"            <Loop_Location>ML_3</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204215</Loop_ID>\n" +
-"            <Loop_Location>ML_4</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204217</Loop_ID>\n" +
-"            <Loop_Location>OS_1</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204218</Loop_ID>\n" +
-"            <Loop_Location>OS_2</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204219</Loop_ID>\n" +
-"            <Loop_Location>OS_3</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"          <Loop>\n" +
-"            <Loop_ID>1204220</Loop_ID>\n" +
-"            <Loop_Location>OS_4</Loop_Location>\n" +
-"            <Vol>0</Vol>\n" +
-"            <Occ>0.0</Occ>\n" +
-"          </Loop>\n" +
-"        </Loops>\n" +
-"      </Station>\n" +
-"    </Stations>\n" +
-"  </Line>\n" +
-"</Network>\n";
 }
Index: /trunk/test/atmsdriver/model/LoadHighwaysTest.java
===================================================================
--- /trunk/test/atmsdriver/model/LoadHighwaysTest.java	(revision 212)
+++ /trunk/test/atmsdriver/model/LoadHighwaysTest.java	(revision 343)
@@ -29,38 +29,20 @@
             writer.println("2");
             writer.println("32 0 2");
-            writer.println("1210831 1 5 S 0.9 8 CALAFIA");
-            writer.println("1210832 ML_1");
-            writer.println("1210833 ML_2");
-            writer.println("1210834 ML_3");
-            writer.println("1210835 ML_4");
-            writer.println("1210836 PASSAGE");
-            writer.println("1210837 DEMAND");
-            writer.println("1210838 QUEUE");
-            writer.println("1210839 RAMP_OFF");
-            writer.println("1210845 2 5 S 1.49 9 EL CAMINO REAL");
-            writer.println("1210846 ML_1");
-            writer.println("1210847 ML_2");
-            writer.println("1210848 ML_3");
-            writer.println("1210849 ML_4");
-            writer.println("1210850 RAMP_ON");
-            writer.println("1210851 PASSAGE");
-            writer.println("1210853 DEMAND");
-            writer.println("1210854 QUEUE");
-            writer.println("1210855 RAMP_OFF");
+            writer.println("1210831 1 5 S 0.9 4 CALAFIA");
+            writer.println("1210832 ML ML_1");
+            writer.println("1210833 ML ML_2");
+            writer.println("1210834 ML ML_3");
+            writer.println("1210835 ML ML_4");
+            writer.println("1210845 2 5 S 1.49 4 EL CAMINO REAL");
+            writer.println("1210846 ML ML_1");
+            writer.println("1210847 ML ML_2");
+            writer.println("1210848 ML ML_3");
+            writer.println("1210849 ML ML_4");
             writer.println("74 0 1");
-            writer.println("1204203 2 5 N 1.26 13 MAGDALENA");
-            writer.println("1204205 RAMP_ON");
-            writer.println("1204206 QUEUE");
-            writer.println("1204207 DEMAND");
-            writer.println("1204208 PASSAGE");
-            writer.println("1204210 RAMP_OFF");
-            writer.println("1204212 ML_1");
-            writer.println("1204213 ML_2");
-            writer.println("1204214 ML_3");
-            writer.println("1204215 ML_4");
-            writer.println("1204217 OS_1");
-            writer.println("1204218 OS_2");
-            writer.println("1204219 OS_3");
-            writer.println("1204220 OS_4");
+            writer.println("1204203 2 5 N 1.26 4 MAGDALENA");
+            writer.println("1204212 ML ML_1");
+            writer.println("1204213 ML ML_2");
+            writer.println("1204214 ML ML_3");
+            writer.println("1204215 ML ML_4");
             writer.close();
         } catch (Exception e) {
@@ -77,5 +59,5 @@
 
     /**
-     * Test of toXML method, of class Network.
+     * Test of Highways constructor 
      */
     public void testLoadHighways() {
@@ -117,5 +99,5 @@
         
         // Test for correct number of loops
-        assertEquals(new Integer(30), new Integer(fiveS.stations.get(0).loops.size()
+        assertEquals(new Integer(12), new Integer(fiveS.stations.get(0).loops.size()
             + fiveS.stations.get(1).loops.size() + fiveS.stations.get(2).loops.size()));
     }
