Index: /trunk/src/tmcsim/application.properties
===================================================================
--- /trunk/src/tmcsim/application.properties	(revision 101)
+++ /trunk/src/tmcsim/application.properties	(revision 103)
@@ -1,5 +1,5 @@
-#Wed, 11 Oct 2017 17:25:07 -0700
+#Thu, 12 Oct 2017 01:19:36 -0700
 
-Application.revision=97
+Application.revision=101
 
-Application.buildnumber=50
+Application.buildnumber=51
Index: /trunk/src/atmsdriver/FEPLineLoader.java
===================================================================
--- /trunk/src/atmsdriver/FEPLineLoader.java	(revision 103)
+++ /trunk/src/atmsdriver/FEPLineLoader.java	(revision 103)
@@ -0,0 +1,273 @@
+package atmsdriver;
+
+import atmsdriver.model.FEPLine;
+import atmsdriver.model.Station;
+import atmsdriver.model.LoopDetector;
+import atmsdriver.model.Station.DIRECTION;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Scanner;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/** The FEPLineLoader loads all static data for the FEPLines, using the station
+ *  and loop lookup files.
+ * 
+ *  THIS CLASS WILL BE REMOVED AND THE LOADING OF FEPLINES WILL BE THE RESPONSIBILITY
+ *  OF THE HIGHWAYS.JAVA CLASS FOR PROPER OOP. JUST USING FOR NOW BECAUSE IT WORKS.
+ * 
+ *  The public method getFEPLines() method can be used to get all the FEPLines 
+ *  within the network. All other methods are private and are used to construct
+ *  the FEPLines.
+ *
+ * @author John A. Torres
+ * @version 09/10/2017
+ */
+public class FEPLineLoader {
+    // Two network config files
+    private final File LDSFile;
+    private final File loopFile;
+    
+    // The list of FEPLines
+    private List<FEPLine> lines;
+    
+    /**
+     * Constructor
+     * @param LDSFile contains FEPLine and Station static data
+     * @param loopFile contains individual LoopDetector static data
+     */
+    public FEPLineLoader(File LDSFile, File loopFile)
+    {
+        this.LDSFile = LDSFile;
+        this.loopFile = loopFile;
+        this.lines = new ArrayList<>();
+        constructFEPLines();
+    }
+    
+    /**
+     * Returns the list of FEPLines in the configured network
+    */
+    public List<FEPLine> getFEPLines()
+    {
+        return lines;
+    }
+    
+    // returns a list of the line numbers found in LDSFile
+    private ArrayList<Integer> getLineNums(Scanner sc)
+    {
+        ArrayList<Integer> lineNums = new ArrayList<>();
+        
+        sc.nextLine(); // skip first line
+        
+        while(sc.hasNext())
+        {
+            sc.nextInt(); // skip to line no
+            Integer lineNum = sc.nextInt(); // get the line number
+            
+            /* If the line is new, and has not been added, add it to lineNums */
+            if(!lineNums.contains(lineNum))
+            {
+                lineNums.add(lineNum);
+            }
+       
+            sc.nextLine(); // skip to next line
+        }
+        
+        sc.close();
+        
+        return lineNums;
+    }
+    
+    // returns a list of station numbers for a given line
+    private ArrayList<Integer> getStationNums(Integer lineNum, Scanner sc)
+    {
+        ArrayList<Integer> stnNums = new ArrayList<>();
+        
+        sc.nextLine(); // skip first line
+        
+        while(sc.hasNext())
+        {
+            Integer stnNum = sc.nextInt();
+            Integer theLine = sc.nextInt();
+            if(theLine.equals(lineNum))
+            {
+                stnNums.add(stnNum);
+            }
+            
+            sc.nextLine();
+        }
+        
+        sc.close();
+        
+        return stnNums;
+    }
+    
+    // returns a list of loop detectors for a given station
+    private ArrayList<LoopDetector> getLoops(Integer stnNum, Scanner sc)
+    {
+        ArrayList<LoopDetector> loops = new ArrayList<>();
+        
+        sc.nextLine(); // skip first line
+        
+        while(sc.hasNext())
+        {
+            sc.next(); // skip FWY
+            sc.next(); // skip dir
+            sc.next(); // skip postmile
+            Integer ldsID = sc.nextInt(); // lds id
+            sc.next(); // skip vdsID
+            Integer loopID = sc.nextInt(); // loop id
+            sc.next(); // skip LOC
+            Integer laneNum = sc.nextInt(); // lane number
+            String loopLoc = sc.next();
+            if(stnNum.equals(ldsID))
+            {
+                LoopDetector loop = new LoopDetector(loopID, loopLoc, laneNum);
+                loops.add(loop);
+            }
+            sc.nextLine();
+        }
+        
+        sc.close();
+        
+        return loops;
+    }
+    
+    // method called to actually build the network from config files
+    private void constructFEPLines()
+    {
+        try {
+            System.out.println("Building network...");
+            
+            // Get FEPLine IDs
+            ArrayList<Integer> lineNums = getLineNums(new Scanner(LDSFile));
+            
+            // Create each FEPLine in the network
+            for(Integer lineNum : lineNums)
+            {
+                // Get Station IDs for the current FEPLine
+                ArrayList<Integer> stnNums = getStationNums(lineNum,
+                        new Scanner(LDSFile));
+                
+                // Create each Station for the current FEPLine
+                ArrayList<Station> stns = new ArrayList<>();
+                for(Integer stnNum : stnNums)
+                {
+                    // Get Loops for the current Station
+                    ArrayList<LoopDetector> loops =
+                            getLoops(stnNum, new Scanner(loopFile));
+                    
+                    // Create the Station and add to list for curr FEPLine
+                    Station stn =
+                            createStation(stnNum, new Scanner(LDSFile), loops);
+                    stns.add(stn);
+                }
+                
+                // Now that stations are created, create the actual FEPLine and
+                // and to FEPLines list
+                FEPLine line = createLine(lineNum, new Scanner(LDSFile), stns);
+                lines.add(line);
+            }
+        } catch (FileNotFoundException ex) {
+            Logger.getLogger(FEPLineLoader.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+    
+    // Creates  line
+    private FEPLine createLine(int lineNum, Scanner scLine, ArrayList<Station> stns)
+    {
+        FEPLine line = null;
+        
+        scLine.nextLine();
+        
+        while(scLine.hasNext())
+        {
+            scLine.nextInt(); // skip ldsID
+            int currLineNum = scLine.nextInt(); // linenum
+            if(currLineNum == lineNum)
+            {
+                scLine.nextInt(); // skip drop
+                int sch = scLine.nextInt(); // schedule
+                int lineinfo = scLine.nextInt(); // lineinfo
+                int sysKey = scLine.nextInt(); // sysKey
+                int schSeq = scLine.nextInt(); // schSeq
+                int globSeq = scLine.nextInt(); // globSeq  
+                int count = scLine.nextInt(); // count
+                
+                line = new FEPLine(lineNum, stns, count, sch, lineinfo, sysKey, globSeq, schSeq);
+                
+                break;
+            }
+            
+            scLine.nextLine();
+        }
+        
+        scLine.close();
+        
+        return line;
+    }
+    
+    // Returns the loction given the whole line from the lookup file
+    private String getLocation(String line)
+    {
+        Scanner sc = new Scanner(line);
+        sc.nextInt(); // skip lds num
+        sc.nextInt(); // skip line num
+        int drop = sc.nextInt(); // drop num
+        sc.nextInt(); // skip schedule
+        sc.nextInt(); // skip lineinfo
+        sc.nextInt(); // skp systemkey
+        sc.nextInt(); // skip sch_seq
+        sc.nextInt(); // skip glob_seq
+        sc.nextInt(); // skip count
+        sc.nextInt(); // fwy
+        DIRECTION dir = DIRECTION.toDirection(sc.next()); // direction
+        sc.nextDouble();
+        
+        /** GRABS FROM CURRENT TO END OF LINE */
+        sc.useDelimiter("\\z"); 
+        String loc = sc.next().trim();
+        sc.close();
+        return loc;
+    }
+    
+    // creates a Station
+    private Station createStation(int stnNum, Scanner sc, ArrayList<LoopDetector> detectors)
+    {
+        Station LDS = null;
+        
+        sc.nextLine();
+        
+        while(sc.hasNext())
+        {        
+            String strLine = sc.nextLine();
+            Scanner scLine = new Scanner(strLine);
+            int ldsID = scLine.nextInt(); // get curr lds id
+            if(ldsID == stnNum) // if we are on correct stn
+            {
+                int lineNum = scLine.nextInt(); // skip line num
+                int drop = scLine.nextInt(); // drop num
+                scLine.nextInt(); // skip schedule
+                scLine.nextInt(); // skip lineinfo
+                scLine.nextInt(); // skp systemkey
+                scLine.nextInt(); // skip sch_seq
+                scLine.nextInt(); // skip glob_seq
+                scLine.nextInt(); // skip count
+                int fwy = scLine.nextInt(); // fwy
+                DIRECTION dir = DIRECTION.toDirection(scLine.next()); // direction
+                double postmile = scLine.nextDouble();
+                String ldsName = getLocation(strLine); /************* DOESNT GRAB WHOLE???? */////
+                LDS = new Station(lineNum, ldsID, drop, ldsName, detectors, fwy, dir, postmile);
+                
+                break;
+            }
+            scLine.close();
+        }
+        
+        sc.close();
+        
+        return LDS;
+    }
+}
Index: /trunk/src/atmsdriver/ConsoleDriver.java
===================================================================
--- /trunk/src/atmsdriver/ConsoleDriver.java	(revision 97)
+++ /trunk/src/atmsdriver/ConsoleDriver.java	(revision 103)
@@ -1,34 +1,385 @@
 package atmsdriver;
 
+import atmsdriver.model.Highways;
+import atmsdriver.model.Station.DIRECTION;
+import atmsdriver.model.Highway;
+import atmsdriver.model.Station;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Scanner;
+
 /**
- *  A console application to drive the ATMS Server.
- * @author jdalbey
+ * A console application to drive the ATMS Server.
+ *
+ * @author jdalbey, John A. Torres
+ * @version 10/11/2017
  */
-public class ConsoleDriver
-{
-//
-//Given
-// <Highway Number> <Dir> <Postmile> <Range> <DotColor> 
-//
-//IF default direction of Highway Number = Dir THEN
-//    Set StartPost = Postmile
-//    Set EndPost = Postmile + Range
-//ELSE
-//    Set StartPost = Postmile - Range
-//    Set EndPost = Postmile
-//END IF
-//
-//FOR each Station in Highway Number LOOP
-//
-//    IF Station.Postmile within range of StartPost:EndPost THEN
-//        IF default direction of Highway Number = Dir THEN
-//            Set ML color to DotColor
-//        ELSE
-//            Set OPP color to DotColor
-//        END IF
-//    END IF
-//
-//END LOOP
-//
-//    
+public final class ConsoleDriver {
+    // highways model
+    private final Highways highways;
+    
+    // lists used for user input validation
+    private final List<Integer> routeNumInputList;
+    private final List<String> dotColorInputList;
+
+    /**
+     * Constructor. Sets the highways model and generates the input validation
+     * lists, and then runs the console driver application.
+     * @param highways 
+     */
+    public ConsoleDriver(Highways highways) {
+        // set highways model
+        this.highways = highways;
+        
+        // set input validation lists
+        routeNumInputList = generateRouteNumInputList();
+        dotColorInputList = new ArrayList<>(Arrays.asList("R", "Y", "G"));
+        
+        // run the console driver
+        runConsole();
+    }
+    
+    /**
+     * Generates the route number list, used for user input validation.
+     * @return list of route numbers.
+     */
+    private ArrayList<Integer> generateRouteNumInputList()
+    {
+        ArrayList<Integer> routeNums = new ArrayList<>();
+        // add the route number for each highway to the list
+        for(Highway hwy : highways.highways)
+        {
+            routeNums.add(hwy.routeNumber);
+        }
+        return routeNums;
+    }
+
+    /**
+     * Runs the console driver application.
+     */
+    public void runConsole() {
+        Scanner sc = new Scanner(System.in);
+        // Run continuously
+        while (true) {
+            // Get necessary values for colorization of highways
+            Integer routeNumber = getRouteNumber(sc);
+            DIRECTION direction = getDirection(sc, routeNumber);
+            Double postmile = getPostmile(sc, routeNumber, direction);
+            Integer range = getRange(sc, postmile);
+            DOTCOLOR dotcolor = getDotColor(sc);
+            
+            // apply colorization to highways
+            applyColorToHighwayStretch(routeNumber, direction, postmile, range, dotcolor);
+        }
+    }
+    
+    /**
+     * Applies specified color to the specified highway stretch. Route number and
+     * direction specify the highway. Postmile and range specify the stretch of
+     * specified highway. Dot color is the color to be applied to the stretch.
+     * 
+     * @param routeNumber highway route number
+     * @param direction highway direction
+     * @param postmile origin postmile value
+     * @param range range from origin postmile
+     * @param dotColor the color to be applied to specified highway stretch
+     */
+    private void applyColorToHighwayStretch(Integer routeNumber, DIRECTION direction, 
+            Double postmile, Integer range, 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 = highways.getHighwayByRouteNumber(routeNumber);
+        
+        // start value for highway section, and end value for highway section
+        // by postmile
+        Double startPost;
+        Double endPost;
+        
+        // postmiles increase from s to n and w to e
+        
+        // if the direction is south or west
+        if(direction.equals(DIRECTION.SOUTH) || direction.equals(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);
+                }
+            }
+        }
+        // if the direction is north or east 
+        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("");
+    }
+    
+    /**
+     * Gets the highway route number from user and validates the input.
+     * 
+     * @param sc stdIn scanner
+     * @return highway route number
+     */
+    private Integer getRouteNumber(Scanner sc) {
+        Integer routeNum = null;
+        Boolean verified = false;
+        
+        // validation loop
+        while(!verified)
+        {
+            // Prints out available route numbers to user to select from
+            System.out.print("Available route numbers: [");
+            for(Integer rtNum : routeNumInputList)
+            {
+                System.out.print(rtNum.toString() + ", ");
+            }
+            System.out.print("]");
+            System.out.println("");
+            
+            // Prompt user to input a route number
+            System.out.println("Enter a route number: ");
+            routeNum = sc.nextInt();
+            System.out.println("");
+            
+            // validate the user's input
+            if(routeNumInputList.contains(routeNum))
+            {
+                verified = true;
+            }
+            else
+            {
+                System.out.println("Invalid route number, please re-enter: ");
+            }
+        }
+        
+        return routeNum;
+    }
+    
+    /**
+     * Gets the highway direction from the user and validates the input.
+     * 
+     * @param sc stdIn scanner
+     * @return highway direction
+     */
+    private DIRECTION getDirection(Scanner sc, Integer routeNum) {
+        DIRECTION direction;
+        String directionInput = null;
+        Boolean verified = false;
+        
+        // validation loop
+        while(!verified)
+        {
+            // Get available directions for route
+            ArrayList<DIRECTION> availDirs = new ArrayList<>();
+            for(Station stn : highways.getHighwayByRouteNumber(routeNum).stations)
+            {
+                if(!availDirs.contains(stn.direction))
+                {
+                    availDirs.add(stn.direction);
+                }
+            }
+            
+            // prompt user for input
+            System.out.print("Available directions for highway " + routeNum + ": [");
+            for(DIRECTION dir : availDirs)
+            {
+                System.out.print(dir.getLetter() + ", ");
+            }
+            System.out.print("]");
+            System.out.println("");
+            System.out.println("Enter a direction:");
+            directionInput = sc.next();
+            System.out.println("");
+            
+            // validate the user's input
+            if(availDirs.contains(DIRECTION.toDirection(directionInput)))
+            {
+                verified = true;
+            }
+            else
+            {
+                System.out.println("Invalid direction, please re-enter: ");
+            }
+        }
+        
+        return DIRECTION.toDirection(directionInput);
+    }
+    
+    /**
+     * Gets the starting/origin postmile value for the highway section from the 
+     * user and validates the input.
+     * 
+     * @param sc stdIn scanner
+     * @param routeNumber highway route number
+     * @param dir highway direction
+     * @return highway section start/origin postmile value
+     */
+    private Double getPostmile(Scanner sc, Integer routeNumber, DIRECTION dir) {
+        Double postmile = null;
+        Boolean verified = false;
+        
+        // validation loop
+        while(!verified)
+        {
+            // Get highway, and grab the floor and ceiling for postmile values
+            // from the highway stations to present to the user
+            Highway hwy = highways.getHighwayByRouteNumber(routeNumber);
+            Double floorPostmile = hwy.stations.get(0).postmile;
+            Double ceilPostmile = hwy.stations
+                    .get(hwy.stations.size() - 1).postmile;
+            
+            // present user with range of postmiles for given highway
+            System.out.println("Route " + hwy.routeNumber + " " + dir 
+                    + " postmile range: [" + floorPostmile + ", " 
+                    + ceilPostmile + "]");
+            
+            // prompt user for postmile value
+            System.out.println("Enter a postmile value (Integer/Double): ");
+            postmile = sc.nextDouble();
+            System.out.println("");
+            
+            // validate user's input, ensures that the postmile is within given
+            // postmile range (floorPostmile, ceilPostmile)
+            if(postmile >= floorPostmile && postmile <= ceilPostmile)
+            {
+                verified = true;
+            }
+            else
+            {
+                System.out.println("Postmile must be within postmile range: [" + floorPostmile + ", " 
+                    + ceilPostmile + "] please re-enter: ");
+            }
+        }
+        
+        return postmile;
+    }
+    
+    /**
+     * Gets the range to extend the highway stretch from the start/origin postmile
+     * value from the user and validates the input.
+     * 
+     * @param sc stdIn scanner
+     * @param postmile origin/start postmile value for highway stretch
+     * @return range value
+     */
+    private Integer getRange(Scanner sc, Double postmile) {
+        Integer range = null;
+        Boolean verified = false;
+        
+        // validation loop
+        while(!verified)
+        {
+            // prompt user for range value
+            System.out.println("Enter a range value (Integer):");
+            range = sc.nextInt();
+            System.out.println("");
+            
+            // range must be greater than or equal to 0
+            if(range >= 0)
+            {
+                verified = true;
+            }
+            else
+            {
+                System.out.println("Range must be >= 0");
+            }
+        }
+        
+        return range;
+    }
+
+    /**
+     * Gets the dot color from the user, to be applied to specified highway
+     * stretch and validates the user's input.
+     * 
+     * @param sc stdIn scanner
+     * @return dot color to be applied to highway stretch
+     */
+    private DOTCOLOR getDotColor(Scanner sc) {
+        DOTCOLOR dotColor;
+        String dotColorInput = null;
+        Boolean verified = false;
+        
+        // validationloop
+        while(!verified)
+        {
+            // prompt user for color
+            System.out.println("Enter a dot color (G/Y/R):");
+            dotColorInput = sc.next();
+            System.out.println("");
+            // validate user's input
+            if(dotColorInputList.contains(dotColorInput))
+            {
+                verified = true;
+            }
+            else
+            {
+                System.out.println("Invalid dot color, please re-enter: ");
+            }
+        }
+        
+        return DOTCOLOR.toDotColor(dotColorInput);
+    }
+    
+    /**
+     * Enum for highway status dot colors.
+     *
+     * @author John A. Torres
+     * @version 10/11/2017
+     */
+    public static enum DOTCOLOR {
+
+        RED,
+        YELLOW,
+        GREEN;
+        
+        // All the first letters of the values, in order.
+        private static String allLetters = "RYG";
+        
+        /**
+         * Return the first letter of this enum.
+         *
+         * @return String first letter of this enum.
+         */
+        public String getLetter() {
+            return this.toString().substring(0, 1);
+        }
+
+        /**
+         * Returns a dot color given its first character.
+         *
+         * @param letter the first character of a dot color
+         * @return dot color 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/atmsdriver/ATMSDriver.java
===================================================================
--- /trunk/src/atmsdriver/ATMSDriver.java	(revision 88)
+++ /trunk/src/atmsdriver/ATMSDriver.java	(revision 103)
@@ -2,8 +2,5 @@
 
 import atmsdriver.model.Highways;
-import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.PrintWriter;
 import java.util.Properties;
 import java.util.logging.Level;
@@ -25,6 +22,4 @@
      */
     private static Logger ATMSDriverLogger = Logger.getLogger("atmsdriver");
-
-    private static final String CONFIG_FILE_NAME = "atms_driver_config.properties";
 
     /**
@@ -95,9 +90,9 @@
 
     public ATMSDriver(String propertiesFile) {
-
+        // verify properties file
         if (!verifyProperties(propertiesFile)) {
             System.exit(0);
         }
-
+        // create the highways model
         highways = new Highways(
                 ATMSDriverProperties.getProperty(
@@ -110,8 +105,14 @@
                 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.
@@ -133,6 +134,12 @@
         try {
             if (System.getProperty("ATMSDRIVER_PROPERTIES") != null) {
-                new Thread(new ATMSDriver(System.getProperty(
-                        "ATMSDRIVER_PROPERTIES"))).start();
+                // 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
+                ConsoleDriver driver = new ConsoleDriver(atmsDriver.highways);
+                
             } else {
                 throw new Exception("ATMSDRIVER_PROPERTIES system property not defined.");
Index: /trunk/src/atmsdriver/model/Highway.java
===================================================================
--- /trunk/src/atmsdriver/model/Highway.java	(revision 93)
+++ /trunk/src/atmsdriver/model/Highway.java	(revision 103)
@@ -10,8 +10,8 @@
  * @author jdalbey
  */
-final class Highway
+final public class Highway
 {
     /** The identifying number for this highway, e.g., 101 */
-    public final Integer highwayNumber;
+    public final Integer routeNumber;
     /** The ordered list of stations (lane detector stations) on this highway */
     public final ArrayList<Station> stations;
@@ -22,7 +22,7 @@
      * @param stations ordered list of stations on this highway
      */
-    public Highway(Integer highwayNum, ArrayList<Station> stations)
+    public Highway(Integer routeNumber, ArrayList<Station> stations)
     {
-        this.highwayNumber = highwayNum;
+        this.routeNumber = routeNumber;
         this.stations = stations;
     }
Index: /trunk/src/atmsdriver/model/Station.java
===================================================================
--- /trunk/src/atmsdriver/model/Station.java	(revision 94)
+++ /trunk/src/atmsdriver/model/Station.java	(revision 103)
@@ -1,4 +1,6 @@
 package atmsdriver.model;
 
+import atmsdriver.ConsoleDriver;
+import atmsdriver.ConsoleDriver.DOTCOLOR;
 import java.util.List;
 import org.w3c.dom.Document;
@@ -21,12 +23,12 @@
 
     /* Static Station meta data */
-    final private int lineNum;
-    final private int ldsID; // double check
-    final private int drop;
-    final private String location;
-    final private List<LoopDetector> loops;
-    final private int highwayNum;
-    final private double postmile;
-    final private DIRECTION direction;
+    final public int lineNum;
+    final public int ldsID; // 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 */
@@ -46,18 +48,8 @@
         this.postmile = postmile;
         this.direction = direction;
-        this.highwayNum = hwy;
+        this.routeNumber = hwy;
 
         this.MLTotVol = 0;
         this.OppTotVol = 0;
-    }
-
-    public int getHighwayNumber()
-    {
-        return this.highwayNum;
-    }
-
-    public DIRECTION getDirection()
-    {
-        return this.direction;
     }
 
@@ -76,5 +68,5 @@
         build.append(Integer.toString(this.drop));
         build.append(" ");
-        build.append(Integer.toString(this.highwayNum));
+        build.append(Integer.toString(this.routeNumber));
         build.append(" ");
         build.append(this.direction.getLetter());
@@ -91,9 +83,4 @@
         }
         return build.toString();
-    }
-
-    public double getPostmile()
-    {
-        return postmile;
     }
 
@@ -117,5 +104,5 @@
 
         // get difference of values
-        double otherStationPostmile = ((Station) otherStation).getPostmile();
+        double otherStationPostmile = ((Station) otherStation).postmile;
         double val = this.postmile - otherStationPostmile;
 
@@ -134,4 +121,49 @@
     }
 
+    public void updateByDirection(DIRECTION direction, DOTCOLOR dotColor) {
+        if(direction.equals(this.direction))
+        {
+            updateML(dotColor);
+        }
+        else
+        {
+            updateOPP(dotColor);
+        }
+    }
+    
+    private void updateML(DOTCOLOR dotcolor)
+    {
+        outputUpdateMessage(dotcolor, "ML");
+        
+        for(LoopDetector loop : loops)
+        {
+            if(loop.loopLocation.startsWith("ML"))
+            {
+                // UPDATE LOOP WITH VALUES
+            }
+        }
+    }
+    
+    private void updateOPP(DOTCOLOR dotcolor)
+    {
+        outputUpdateMessage(dotcolor, "OPP");
+        for(LoopDetector loop : loops)
+        {
+            if(loop.loopLocation.startsWith("OP"))
+            {
+                // UPDATE LOOP WITH VALUES
+            }
+        }
+    }
+    
+    private void outputUpdateMessage(DOTCOLOR dotcolor, String OPP_ML)
+    {
+        System.out.printf("Updating route %-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());
+    }
+    
     private static enum XML_TAGS
     {
@@ -189,5 +221,5 @@
 
         Element freewayElement = theDoc.createElement(XML_TAGS.FREEWAY.tag);
-        freewayElement.appendChild(theDoc.createTextNode(String.valueOf(this.highwayNum)));
+        freewayElement.appendChild(theDoc.createTextNode(String.valueOf(this.routeNumber)));
         stationElement.appendChild(freewayElement);
 
Index: /trunk/src/atmsdriver/model/FEPLine.java
===================================================================
--- /trunk/src/atmsdriver/model/FEPLine.java	(revision 88)
+++ /trunk/src/atmsdriver/model/FEPLine.java	(revision 103)
@@ -4,6 +4,4 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
-
-
 
 /** An FEPLine is a simulated line of communication from the FEP to 
@@ -18,11 +16,14 @@
 public class FEPLine {
     /* Static FEPLine meta data */
-    final private int lineNum;
-    final private List<Station> stations;
+    final public int lineNum;
+    final public List<Station> stations;
     final private int count;
-    // NOT SURE IF NEXT IS FINAL
+    
     final private int schedule;
     final private int lineInfo;
     final private long systemKey;
+    
+    // THESE WILL NEED TO BE UPDATED MAYBE, NOT SURE, NOT A PRIORITY. SEE METHOD
+    // UPDATESEQUENCES()
     private long globalSeq;
     private long scheduleSeq;
@@ -40,14 +41,4 @@
         this.globalSeq = globalSeq;
         this.scheduleSeq = scheduleSeq;
-    }
-    
-    public int getLineNumber()
-    {
-        return this.lineNum;
-    }
-    
-    public List<Station> getStations()
-    {
-        return this.stations;
     }
     
Index: /trunk/src/atmsdriver/model/Highways.java
===================================================================
--- /trunk/src/atmsdriver/model/Highways.java	(revision 101)
+++ /trunk/src/atmsdriver/model/Highways.java	(revision 103)
@@ -1,8 +1,6 @@
 package atmsdriver.model;
 
-import atmsdriver.NetworkLoader;
-import atmsdriver.model.Station.DIRECTION;
+import atmsdriver.FEPLineLoader;
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.FileWriter;
 import java.io.IOException;
@@ -13,12 +11,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
 import java.util.Map;
 import java.util.Observable;
 import java.util.Observer;
-import java.util.Scanner;
 import java.util.Set;
 import java.util.logging.Level;
@@ -34,17 +28,29 @@
 import org.w3c.dom.Element;
 
-/**
+/** The Highways class aggregates all Highway instances within a geographic
+ *  region, and all of the FEPLines within an electronic detector 
+ *  network, in the same geographic region. An instance of Highways.java 
+ *  comprises the underlying model for the ATMSDriver application.
+ * 
+ *  Highways uses method writeToFEP() to communicate with the FEP Simulator. 
+ *  It creates a socket client which sends the FEP Simulator a highways status
+ *  message over the socket. This message is in the XML format required by the 
+ *  FEP Simulator, which is provided by the resident toXML() method.
+ * 
+ *  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
  */
-public class Highways implements Observer {
+public class Highways {
 
     final private ArrayList<FEPLine> lines;
     final private String FEPHostName;
     final private int FEPPortNum;
-    final private ArrayList<Highway> highways;
-    private Map<Integer, List<Station>> HiwayMap = new HashMap<Integer, List<Station>>();
     
-    // NEED FINISH final private ArrayList<Highway> highways;
+    final public ArrayList<Highway> highways;
+    
     public Highways(String ldsFileName, String loopsFileName,
             String highwayMetaFileName, String FEPHostName, int FEPPortNum) {
@@ -54,5 +60,5 @@
          */
 
-        NetworkLoader ldr = new NetworkLoader(new File(ldsFileName), new File(loopsFileName));
+        FEPLineLoader ldr = new FEPLineLoader(new File(ldsFileName), new File(loopsFileName));
         this.lines = (ArrayList<FEPLine>) ldr.getFEPLines();
         this.FEPHostName = FEPHostName;
@@ -61,10 +67,4 @@
         //writeHighwaysMeta("hard.txt");
     }
-
-    public ArrayList<Highway> getHighways()
-    {
-        return this.highways;
-    }
-    
     
     private ArrayList<Highway> loadHighways() {
@@ -72,46 +72,41 @@
         // The list of highways to return
         ArrayList<Highway> highways = new ArrayList<Highway>();
-        Hashtable<Hashtable<Integer, DIRECTION>, ArrayList<Station>>
-                highwayTable = new Hashtable<>();
+        
+        Map<Integer, ArrayList<Station>>
+                highwayMap = new HashMap<>();
         
         for (FEPLine line : lines)
         {
-            ArrayList<Station> lineStations = (ArrayList<Station>) line.getStations();
+            ArrayList<Station> lineStations = (ArrayList<Station>) line.stations;
             for(Station station : lineStations)
             {
-                Integer hwyNum = station.getHighwayNumber();
-                DIRECTION dir = station.getDirection();
-                Hashtable<Integer, DIRECTION> check = new Hashtable<>();
-                check.put(hwyNum, dir);
-                if(highwayTable.get(check) == null)
+                Integer hwyNum = station.routeNumber;
+
+                if(!highwayMap.containsKey(hwyNum))
                 {
                     ArrayList<Station> stnList = new ArrayList<>();
                     stnList.add(station);
-                    Hashtable<Hashtable<Integer, DIRECTION>, ArrayList<Station>>
-                            newEntry = new Hashtable();
-                    newEntry.put(check, stnList);
-                    highwayTable.putAll(newEntry);
+                    highwayMap.put(hwyNum, stnList);
                 }
                 else
                 {
-                    highwayTable.get(check).add(station);
+                    highwayMap.get(hwyNum).add(station);
                 }
             }
         }
         
-        Set<Hashtable<Integer, DIRECTION>> hwyKeys = highwayTable.keySet();
-        for(Hashtable<Integer, DIRECTION> hwyKey : hwyKeys)
+        Set<Integer> hwyKeys = highwayMap.keySet();
+        for(Integer hwyKey : hwyKeys)
         {
-            Enumeration<Integer> hwyNumEnum = hwyKey.keys();
-            Integer hwyNum = hwyNumEnum.nextElement();
-            ArrayList<Station> hwyStations = highwayTable.get(hwyKey);
-            DIRECTION hwyDir = hwyKey.get(hwyNum);
-            Collections.sort(highwayTable.get(hwyKey));
-            System.out.println("Adding highway: " + hwyNum + " " + hwyDir.toString().charAt(0));
-            highways.add(new Highway(hwyNum, 
+            ArrayList<Station> hwyStations = highwayMap.get(hwyKey);
+            Collections.sort(hwyStations);
+            System.out.println("Loaded highway " + hwyKey + "...");
+            highways.add(new Highway(hwyKey, 
                     hwyStations));
         }
+        System.out.println("");
         return highways;
     }
+    
     /*
      private ArrayList<FEPLine> loadLines(String highwayMetaFileName) {
@@ -215,6 +210,4 @@
 
     public void writeToFEP() {
-                    System.out.println(this.toXML().toCharArray().length);
-
         try {
             Socket sock = new Socket(FEPHostName, FEPPortNum);
@@ -293,7 +286,15 @@
     }
 
-    @Override
-    public void update(Observable o, Object arg) {
-        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    public Highway getHighwayByRouteNumber(Integer routeNum) {
+        Highway returnHwy = null;
+        for(Highway hwy : highways)
+        {
+            if(hwy.routeNumber.equals(routeNum))
+            {
+                returnHwy = hwy;
+                break;
+            }
+        }
+        return returnHwy;
     }
 
Index: /trunk/src/atmsdriver/model/LoopDetector.java
===================================================================
--- /trunk/src/atmsdriver/model/LoopDetector.java	(revision 87)
+++ /trunk/src/atmsdriver/model/LoopDetector.java	(revision 103)
@@ -17,7 +17,7 @@
 {
     /* static data */
-    final private int loopID;
-    final private String loopLocation;
-    final private int laneNum;
+    final public int loopID;
+    final public String loopLocation;
+    final public int laneNum;
     
     /* dynamic data */
Index: unk/src/atmsdriver/NetworkLoader.java
===================================================================
--- /trunk/src/atmsdriver/NetworkLoader.java	(revision 90)
+++ 	(revision )
@@ -1,277 +1,0 @@
-package atmsdriver;
-
-import atmsdriver.model.FEPLine;
-import atmsdriver.model.Station;
-import atmsdriver.model.LoopDetector;
-import atmsdriver.model.Station.DIRECTION;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Scanner;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/** The NetworkReader loads all static data for the traffic network through
- *  network lookup files. 
- * 
- *  The public method getFEPLines() method can be used to get all the FEPLines 
-  within a network. All other methods are private and are used to construct
-  the FEPLines.
- 
-  The "LDSFile" contains Station and FEPLine information.
-  ex.
-   < Insert file here >
- *  The "loopFile" contains individual LoopDetector information.
- *  ex.
- *   < Insert file here > 
- *
- * @author John A. Torres
- * @version 09/10/2017
- */
-public class NetworkLoader {
-    // Two network config files
-    private final File LDSFile;
-    private final File loopFile;
-    
-    // The list of FEPLines
-    private List<FEPLine> lines;
-    
-    /**
-     * Constructor
-     * @param LDSFile contains FEPLine and Station static data
-     * @param loopFile contains individual LoopDetector static data
-     */
-    public NetworkLoader(File LDSFile, File loopFile)
-    {
-        this.LDSFile = LDSFile;
-        this.loopFile = loopFile;
-        this.lines = new ArrayList<>();
-        constructFEPLines();
-    }
-    
-    /**
-     * Returns the list of FEPLines in the configured network
-    */
-    public List<FEPLine> getFEPLines()
-    {
-        return lines;
-    }
-    
-    // returns a list of the line numbers found in LDSFile
-    private ArrayList<Integer> getLineNums(Scanner sc)
-    {
-        ArrayList<Integer> lineNums = new ArrayList<>();
-        
-        sc.nextLine(); // skip first line
-        
-        while(sc.hasNext())
-        {
-            sc.nextInt(); // skip to line no
-            Integer lineNum = sc.nextInt(); // get the line number
-            
-            /* If the line is new, and has not been added, add it to lineNums */
-            if(!lineNums.contains(lineNum))
-            {
-                lineNums.add(lineNum);
-            }
-       
-            sc.nextLine(); // skip to next line
-        }
-        
-        sc.close();
-        
-        return lineNums;
-    }
-    
-    // returns a list of station numbers for a given line
-    private ArrayList<Integer> getStationNums(Integer lineNum, Scanner sc)
-    {
-        ArrayList<Integer> stnNums = new ArrayList<>();
-        
-        sc.nextLine(); // skip first line
-        
-        while(sc.hasNext())
-        {
-            Integer stnNum = sc.nextInt();
-            Integer theLine = sc.nextInt();
-            if(theLine.equals(lineNum))
-            {
-                stnNums.add(stnNum);
-            }
-            
-            sc.nextLine();
-        }
-        
-        sc.close();
-        
-        return stnNums;
-    }
-    
-    // returns a list of loop detectors for a given station
-    private ArrayList<LoopDetector> getLoops(Integer stnNum, Scanner sc)
-    {
-        ArrayList<LoopDetector> loops = new ArrayList<>();
-        
-        sc.nextLine(); // skip first line
-        
-        while(sc.hasNext())
-        {
-            sc.next(); // skip FWY
-            sc.next(); // skip dir
-            sc.next(); // skip postmile
-            Integer ldsID = sc.nextInt(); // lds id
-            sc.next(); // skip vdsID
-            Integer loopID = sc.nextInt(); // loop id
-            sc.next(); // skip LOC
-            Integer laneNum = sc.nextInt(); // lane number
-            String loopLoc = sc.next();
-            if(stnNum.equals(ldsID))
-            {
-                LoopDetector loop = new LoopDetector(loopID, loopLoc, laneNum);
-                loops.add(loop);
-            }
-            sc.nextLine();
-        }
-        
-        sc.close();
-        
-        return loops;
-    }
-    
-    // method called to actually build the network from config files
-    private void constructFEPLines()
-    {
-        try {
-            System.out.println("Building network...");
-            
-            // Get FEPLine IDs
-            ArrayList<Integer> lineNums = getLineNums(new Scanner(LDSFile));
-            
-            // Create each FEPLine in the network
-            for(Integer lineNum : lineNums)
-            {
-                // Get Station IDs for the current FEPLine
-                ArrayList<Integer> stnNums = getStationNums(lineNum,
-                        new Scanner(LDSFile));
-                
-                // Create each Station for the current FEPLine
-                ArrayList<Station> stns = new ArrayList<>();
-                for(Integer stnNum : stnNums)
-                {
-                    // Get Loops for the current Station
-                    ArrayList<LoopDetector> loops =
-                            getLoops(stnNum, new Scanner(loopFile));
-                    
-                    // Create the Station and add to list for curr FEPLine
-                    Station stn =
-                            createStation(stnNum, new Scanner(LDSFile), loops);
-                    stns.add(stn);
-                }
-                
-                // Now that stations are created, create the actual FEPLine and
-                // and to FEPLines list
-                FEPLine line = createLine(lineNum, new Scanner(LDSFile), stns);
-                lines.add(line);
-            }
-        } catch (FileNotFoundException ex) {
-            Logger.getLogger(NetworkLoader.class.getName()).log(Level.SEVERE, null, ex);
-        }
-    }
-    
-    // Creates  line
-    private FEPLine createLine(int lineNum, Scanner scLine, ArrayList<Station> stns)
-    {
-        FEPLine line = null;
-        
-        scLine.nextLine();
-        
-        while(scLine.hasNext())
-        {
-            scLine.nextInt(); // skip ldsID
-            int currLineNum = scLine.nextInt(); // linenum
-            if(currLineNum == lineNum)
-            {
-                scLine.nextInt(); // skip drop
-                int sch = scLine.nextInt(); // schedule
-                int lineinfo = scLine.nextInt(); // lineinfo
-                int sysKey = scLine.nextInt(); // sysKey
-                int schSeq = scLine.nextInt(); // schSeq
-                int globSeq = scLine.nextInt(); // globSeq  
-                int count = scLine.nextInt(); // count
-                
-                line = new FEPLine(lineNum, stns, count, sch, lineinfo, sysKey, globSeq, schSeq);
-                
-                break;
-            }
-            
-            scLine.nextLine();
-        }
-        
-        scLine.close();
-        
-        return line;
-    }
-    
-    // Returns the loction given the whole line from the lookup file
-    private String getLocation(String line)
-    {
-        Scanner sc = new Scanner(line);
-        sc.nextInt(); // skip lds num
-        sc.nextInt(); // skip line num
-        int drop = sc.nextInt(); // drop num
-        sc.nextInt(); // skip schedule
-        sc.nextInt(); // skip lineinfo
-        sc.nextInt(); // skp systemkey
-        sc.nextInt(); // skip sch_seq
-        sc.nextInt(); // skip glob_seq
-        sc.nextInt(); // skip count
-        sc.nextInt(); // fwy
-        DIRECTION dir = DIRECTION.toDirection(sc.next()); // direction
-        sc.nextDouble();
-        
-        /** GRABS FROM CURRENT TO END OF LINE */
-        sc.useDelimiter("\\z"); 
-        String loc = sc.next().trim();
-        sc.close();
-        return loc;
-    }
-    
-    // creates a Station
-    private Station createStation(int stnNum, Scanner sc, ArrayList<LoopDetector> detectors)
-    {
-        Station LDS = null;
-        
-        sc.nextLine();
-        
-        while(sc.hasNext())
-        {        
-            String strLine = sc.nextLine();
-            Scanner scLine = new Scanner(strLine);
-            int ldsID = scLine.nextInt(); // get curr lds id
-            if(ldsID == stnNum) // if we are on correct stn
-            {
-                int lineNum = scLine.nextInt(); // skip line num
-                int drop = scLine.nextInt(); // drop num
-                scLine.nextInt(); // skip schedule
-                scLine.nextInt(); // skip lineinfo
-                scLine.nextInt(); // skp systemkey
-                scLine.nextInt(); // skip sch_seq
-                scLine.nextInt(); // skip glob_seq
-                scLine.nextInt(); // skip count
-                int fwy = scLine.nextInt(); // fwy
-                DIRECTION dir = DIRECTION.toDirection(scLine.next()); // direction
-                double postmile = scLine.nextDouble();
-                String ldsName = getLocation(strLine); /************* DOESNT GRAB WHOLE???? */////
-                LDS = new Station(lineNum, ldsID, drop, ldsName, detectors, fwy, dir, postmile);
-                
-                break;
-            }
-            scLine.close();
-        }
-        
-        sc.close();
-        
-        return LDS;
-    }
-}
Index: /trunk/test/atmsdriver/model/StationTest.java
===================================================================
--- /trunk/test/atmsdriver/model/StationTest.java	(revision 91)
+++ /trunk/test/atmsdriver/model/StationTest.java	(revision 103)
@@ -33,5 +33,5 @@
     public void testGetHighwayNumber() {
         System.out.println("getHighwayNumber");
-        assertEquals(4, alpha.getHighwayNumber());
+        assertEquals(4, alpha.routeNumber);
     }
 
@@ -41,5 +41,5 @@
     public void testGetDirection() {
         System.out.println("getDirection");
-        assertEquals(DIRECTION.NORTH, alpha.getDirection());
+        assertEquals(DIRECTION.NORTH, alpha.direction);
     }
 
@@ -59,5 +59,5 @@
     public void testGetPostmile() {
         System.out.println("getPostmile");
-        assertEquals(1.0, alpha.getPostmile(),0.1);
+        assertEquals(1.0, alpha.postmile,0.1);
     }
 
Index: /trunk/test/atmsdriver/model/LoadHighwaysTest.java
===================================================================
--- /trunk/test/atmsdriver/model/LoadHighwaysTest.java	(revision 96)
+++ /trunk/test/atmsdriver/model/LoadHighwaysTest.java	(revision 103)
@@ -1,7 +1,4 @@
 package atmsdriver.model;
 
-import atmsdriver.ATMSDriver;
-import atmsdriver.model.Station.DIRECTION;
-import java.io.File;
 import java.io.FileWriter;
 import java.io.PrintWriter;
@@ -70,10 +67,10 @@
         
         // Test for correct number of highways
-        ArrayList<Highway> result = highways.getHighways();
-        assertEquals(3, result.size());
+        ArrayList<Highway> result = highways.highways;
+        assertEquals(2, result.size());
         
         // Test 55 N was loaded
-        Highway fiftyfiveN = result.get(2);
-        assertEquals(new Integer(55), fiftyfiveN.highwayNumber);
+        Highway fiftyfiveN = result.get(0);
+        assertEquals(new Integer(55), fiftyfiveN.routeNumber);
         
         // Test 55 N stations are sorted by postmile
@@ -82,12 +79,18 @@
         for(Station station : stations)
         {
-            stationsPostmiles.add(station.getPostmile());
+            stationsPostmiles.add(station.postmile);
         }
+        
+        // Create expected station postmile list (sorted)
         ArrayList<Double> expectedStationsPostmiles = new ArrayList<>();
         expectedStationsPostmiles.add(new Double(4.58));
+        expectedStationsPostmiles.add(new Double(4.7));
+        expectedStationsPostmiles.add(new Double(5.06));
         expectedStationsPostmiles.add(new Double(5.51));
         expectedStationsPostmiles.add(new Double(9.41));
         expectedStationsPostmiles.add(new Double(10));
-        for(int i = 0; i < 4; i++)
+        expectedStationsPostmiles.add(new Double(10.4));
+        expectedStationsPostmiles.add(new Double(10.5));
+        for(int i = 0; i < 8; i++)
         {
             assertEquals(expectedStationsPostmiles.get(i), 
@@ -96,6 +99,6 @@
         
         // Test 55 S was loaded
-        Highway fiftyfiveS = result.get(0);
-        assertEquals(new Integer(55), fiftyfiveS.highwayNumber);
+        Highway fiftyfiveS = result.get(1);
+        assertEquals(new Integer(5), fiftyfiveS.routeNumber);
         
         // Test 55 S stations are sorted by postmile
@@ -104,26 +107,5 @@
         for(Station station : stations)
         {
-            stationsPostmiles.add(station.getPostmile());
-        }
-        expectedStationsPostmiles.clear();
-        expectedStationsPostmiles.add(new Double(4.7));
-        expectedStationsPostmiles.add(new Double(5.06));
-        expectedStationsPostmiles.add(new Double(10.4));
-        expectedStationsPostmiles.add(new Double(10.5));
-        for(int i = 0; i < 4; i++)
-        {
-            assertEquals(expectedStationsPostmiles.get(i), 
-                    stationsPostmiles.get(i));
-        }
-        
-        Highway fiveS = result.get(1);
-        assertEquals(new Integer(5), fiveS.highwayNumber);
-        
-        // Test 5 S stations are sorted by postmile
-        stations = fiveS.stations;
-        stationsPostmiles.clear();
-        for(Station station : stations)
-        {
-            stationsPostmiles.add(station.getPostmile());
+            stationsPostmiles.add(station.postmile);
         }
         expectedStationsPostmiles.clear();
@@ -131,5 +113,5 @@
         expectedStationsPostmiles.add(new Double(32.25));
         expectedStationsPostmiles.add(new Double(33));
-        for(int i = 0; i < 2; i++)
+        for(int i = 0; i < 3; i++)
         {
             assertEquals(expectedStationsPostmiles.get(i), 
Index: /trunk/IDE_metadata/NetBeans/TMCSim/nbproject/configs/ATMSDriverLocal.properties
===================================================================
--- /trunk/IDE_metadata/NetBeans/TMCSim/nbproject/configs/ATMSDriverLocal.properties	(revision 101)
+++ /trunk/IDE_metadata/NetBeans/TMCSim/nbproject/configs/ATMSDriverLocal.properties	(revision 103)
@@ -1,1 +1,2 @@
+main.class=atmsdriver.ATMSDriver
 run.jvmargs=-DATMSDRIVER_PROPERTIES=config/atms_driver_config_local.properties
Index: anches/FEPSimulator/build/Debug/GNU-MacOSX/FEPSim.o.d
===================================================================
--- /branches/FEPSimulator/build/Debug/GNU-MacOSX/FEPSim.o.d	(revision 100)
+++ 	(revision )
@@ -1,17 +1,0 @@
-build/Debug/GNU-MacOSX/FEPSim.o: FEPSim.cpp FEPSim.h fep.h \
- NetworkReader.h network.h tinyxml/tinyxml.h tinyxml/tinystr.h \
- DataPacker.h
-
-FEPSim.h:
-
-fep.h:
-
-NetworkReader.h:
-
-network.h:
-
-tinyxml/tinyxml.h:
-
-tinyxml/tinystr.h:
-
-DataPacker.h:
Index: anches/FEPSimulator/build/Debug/GNU-MacOSX/NetworkReader.o.d
===================================================================
--- /branches/FEPSimulator/build/Debug/GNU-MacOSX/NetworkReader.o.d	(revision 100)
+++ 	(revision )
@@ -1,12 +1,0 @@
-build/Debug/GNU-MacOSX/NetworkReader.o: NetworkReader.cpp NetworkReader.h \
- network.h tinyxml/tinyxml.h tinyxml/tinystr.h DataPacker.h
-
-NetworkReader.h:
-
-network.h:
-
-tinyxml/tinyxml.h:
-
-tinyxml/tinystr.h:
-
-DataPacker.h:
Index: anches/FEPSimulator/build/Debug/GNU-MacOSX/DataPacker.o.d
===================================================================
--- /branches/FEPSimulator/build/Debug/GNU-MacOSX/DataPacker.o.d	(revision 100)
+++ 	(revision )
@@ -1,6 +1,0 @@
-build/Debug/GNU-MacOSX/DataPacker.o: DataPacker.cpp DataPacker.h \
- network.h
-
-DataPacker.h:
-
-network.h:
