Index: trunk/src/atmsdriver/model/Highways.java
===================================================================
--- trunk/src/atmsdriver/model/Highways.java	(revision 345)
+++ trunk/src/atmsdriver/model/Highways.java	(revision 353)
@@ -151,9 +151,16 @@
      * 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.
-     *
+     * of specified highway. 
+     * The purpose of this method is to modify the highway state to represent 
+     * traffic conditions created by the Traffic Manager.  These conditions 
+     * originate in the traffic events file which specifies traffic congestion arising
+     * during the simulation.  NOTE: Since these events describe congestion,
+     * the direction that the color should be applied is the REVERSE of the
+     * regular flow of traffic.  
+     * So a request to apply red to 55 S from 8.5 for 2 miles means 
+     * the stretch 8.5 -> 10.5 because sobo traffic normally flows toward
+     * decreasing postmiles and we want to do the reverse.
      * @param routeNumber highway route number
-     * @param direction highway direction
+     * @param direction highway direction (for normal traffic flow)
      * @param postmile origin postmile value
      * @param range range from origin postmile
@@ -179,8 +186,9 @@
         Double startPost;
         Double endPost;
+        double epsilon = 0.001;
 
         // postmiles increase from s to n and w to e
-        // handle increasing postmile directinons (north or east)
-        if (direction.equals(Station.DIRECTION.NORTH) || direction.equals(Station.DIRECTION.EAST))
+        // S or W directions backup in a positive postmile direction
+        if (direction.equals(Station.DIRECTION.SOUTH) || direction.equals(Station.DIRECTION.WEST))
         {
             // add range value to startPost to get
@@ -191,5 +199,5 @@
             //   specifies a highway that doesn't exist in the network.
             //   Also the case where a desired postmile to color isn't in
-            //   the network.
+            //   the network.  Ticket 118
             // iterate through the stations, if within the specified highway
             // stretch, update the station by direction and apply dot color
@@ -202,5 +210,5 @@
             }
         } 
-        // handle decreasing postmile directions (south or west) 
+        // N or E directions backup in a negative postmile direction
         else
         {
@@ -581,4 +589,5 @@
         pmList.load(s);
         
+        Collections.sort(highways);  // Sort the highways for easier inspection
         String header = "{\n" +
         "  \"type\": \"FeatureCollection\",\n" +
@@ -590,4 +599,5 @@
             // Examine every station on this highway
             StringBuilder lineout = new StringBuilder();
+            Collections.sort(hwy.stations, new StationComparator());
             for (Station stat: hwy.stations)
             {
