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();
     }
 }
