Index: /trunk/src/tmcsim/application.properties
===================================================================
--- /trunk/src/tmcsim/application.properties	(revision 127)
+++ /trunk/src/tmcsim/application.properties	(revision 135)
@@ -1,5 +1,5 @@
-#Mon, 16 Oct 2017 17:41:29 -0700
+#Tue, 17 Oct 2017 18:13:47 -0700
 
-Application.revision=125
+Application.revision=133
 
 Application.buildnumber=53
Index: /trunk/src/tmcsim/client/ATMSBatchDriver.java
===================================================================
--- /trunk/src/tmcsim/client/ATMSBatchDriver.java	(revision 129)
+++ /trunk/src/tmcsim/client/ATMSBatchDriver.java	(revision 135)
@@ -155,7 +155,8 @@
         readBatchFile();
         // Launch the display
-        theView = new ATMSBatchViewer();
+        theView = new ATMSBatchViewer(this, new ArrayList<String>(incidents.keySet()));
         theView.setVisible(true);
-        theView.update("0:00", eventQueue);        
+        theView.update("0:00", eventQueue);
+
         // Create a timer that fetches the simulation time every second.
         Timer timer = new Timer(ONE_SECOND, new ActionListener()
@@ -201,5 +202,4 @@
                     }
                     //System.out.println("Next event will be launched at: " + formatter.format(eventTime));
-                    theView.update(currentClock, eventQueue);
                     // Check the queue of events to see if the first
                     // item should be launched.  IF so, 
@@ -230,4 +230,5 @@
                         }
                     }
+                    theView.update(currentClock, eventQueue);
                 }
             }
@@ -236,5 +237,6 @@
 
         // Start the FEP thread (to update ATMS every 30 sec). (See class def below)
-        new WriteToFEPThread().run();
+        Thread wtfep = new WriteToFEPThread();
+        wtfep.start();
 
         ensureProperShutdown();
@@ -277,4 +279,46 @@
     }
     
+    /** Clear an incident.  For each event associated with an incident,
+     * turn the dots in its range Green and remove it from the event queue.
+     * @param incidentNumber incident to be cleared.
+     */
+    public void clearIncident(String incidentNumber)
+    {
+        boolean ok = incidents.containsKey(incidentNumber);
+        if (!ok) 
+        {
+            System.out.println("Sorry, that incident number isn't found.");
+            return;
+        }
+        System.out.println("Clearing incident " + incidentNumber);
+        List<String> events = incidents.get(incidentNumber);
+        // Process each event associated with this incident 
+        for (String event: events)
+        {
+            System.out.println("Event: " + event + " cleared.");
+            eventQueue.remove(event);
+            // Extract fields from event and prepare them 
+            Scanner lineScan = new Scanner(event);
+            try
+            {
+                lineScan.next(); // skip incident number field
+                lineScan.next(); // skip time field
+                int routeNumber = lineScan.nextInt();
+                Station.DIRECTION dir = Station.DIRECTION.toDirection(lineScan.next());
+                double postmile = lineScan.nextDouble();
+                int range = lineScan.nextInt();
+                // apply colorization to highways, forcing to green, indicating cleared
+                console.applyColorToHighwayStretch(routeNumber, dir, postmile, range, ConsoleDriver.DOTCOLOR.GREEN);
+            }
+            catch (InputMismatchException ex)
+            {
+                System.out.println("Internal error, please report to programmers." + event);
+            }
+            
+        }
+        // Now refresh the view with the updated queue of events
+        theView.update("0:00", eventQueue);
+    }
+    
     /**
      * Connect to the Coordinator's RMI object, and register this object for
Index: /trunk/src/tmcsim/client/ATMSBatchViewer.java
===================================================================
--- /trunk/src/tmcsim/client/ATMSBatchViewer.java	(revision 128)
+++ /trunk/src/tmcsim/client/ATMSBatchViewer.java	(revision 135)
@@ -1,14 +1,16 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
 package tmcsim.client;
 
+import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Queue;
+import java.util.Set;
 import java.util.Vector;
 import javax.swing.AbstractListModel;
+import javax.swing.JLabel;
 import javax.swing.JList;
+import javax.swing.JOptionPane;
 
 /**
@@ -18,10 +20,21 @@
 public class ATMSBatchViewer extends javax.swing.JFrame 
 {
+    /** Reference to the driver associated with this GUI */
+    private ATMSBatchDriver driver; 
+    private final List<String> incidents;
     /**
-     * Creates new form ATMSBatchViewer
+     * Creates new form ATMSBatchViewer.
+     * @param incidents a list of incidents to show in a list.
      */
-    public ATMSBatchViewer() 
+    public ATMSBatchViewer(ATMSBatchDriver driver, List<String> incidentList) 
     {
         initComponents();
+        this.driver = driver; 
+        this.incidents = incidentList;
+        lstIncidents.setModel(new javax.swing.AbstractListModel<String>()
+        {
+            public int getSize() { return incidents.size(); }
+            public String getElementAt(int i) { return incidents.get(i); }
+        });        
     }
 
@@ -48,5 +61,6 @@
     @SuppressWarnings("unchecked")
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
+    private void initComponents()
+    {
 
         pnlEvents = new javax.swing.JPanel();
@@ -54,9 +68,14 @@
         lstEvents = new javax.swing.JList<>();
         txtClockTime = new javax.swing.JLabel();
+        pnlIncidents = new javax.swing.JPanel();
+        btnClear = new javax.swing.JButton();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        lstIncidents = new javax.swing.JList<>();
 
         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
 
         lstEvents.setFont(new java.awt.Font("Noto Mono", 0, 12)); // NOI18N
-        lstEvents.setModel(new javax.swing.AbstractListModel<String>() {
+        lstEvents.setModel(new javax.swing.AbstractListModel<String>()
+        {
             String[] strings = { "item 1", "item 2" };
             public int getSize() { return strings.length; }
@@ -73,5 +92,5 @@
             pnlEventsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEventsLayout.createSequentialGroup()
-                .addContainerGap(83, Short.MAX_VALUE)
+                .addContainerGap(74, Short.MAX_VALUE)
                 .addComponent(scrollEvents, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addGap(59, 59, 59))
@@ -90,4 +109,42 @@
         );
 
+        btnClear.setText("Clear Incident");
+        btnClear.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnClearActionPerformed(evt);
+            }
+        });
+
+        lstIncidents.setFont(new java.awt.Font("Noto Mono", 0, 15)); // NOI18N
+        lstIncidents.setModel(new javax.swing.AbstractListModel<String>()
+        {
+            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
+            public int getSize() { return strings.length; }
+            public String getElementAt(int i) { return strings[i]; }
+        });
+        lstIncidents.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+        jScrollPane1.setViewportView(lstIncidents);
+
+        javax.swing.GroupLayout pnlIncidentsLayout = new javax.swing.GroupLayout(pnlIncidents);
+        pnlIncidents.setLayout(pnlIncidentsLayout);
+        pnlIncidentsLayout.setHorizontalGroup(
+            pnlIncidentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(pnlIncidentsLayout.createSequentialGroup()
+                .addGroup(pnlIncidentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(btnClear)
+                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addGap(0, 173, Short.MAX_VALUE))
+        );
+        pnlIncidentsLayout.setVerticalGroup(
+            pnlIncidentsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIncidentsLayout.createSequentialGroup()
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(btnClear)
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+        );
+
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
         getContentPane().setLayout(layout);
@@ -97,4 +154,8 @@
                 .addComponent(pnlEvents, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 .addContainerGap())
+            .addGroup(layout.createSequentialGroup()
+                .addGap(76, 76, 76)
+                .addComponent(pnlIncidents, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
         );
         layout.setVerticalGroup(
@@ -102,9 +163,32 @@
             .addGroup(layout.createSequentialGroup()
                 .addComponent(pnlEvents, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addGap(0, 129, Short.MAX_VALUE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(pnlIncidents, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addContainerGap())
         );
 
         pack();
     }// </editor-fold>//GEN-END:initComponents
+
+    private void btnClearActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnClearActionPerformed
+    {//GEN-HEADEREND:event_btnClearActionPerformed
+        String selectedItem =  lstIncidents.getSelectedValue();
+        if (selectedItem == null)
+        {
+            JOptionPane.showMessageDialog(this, "No Incident Selected", "Warning", JOptionPane.INFORMATION_MESSAGE);
+        }
+        else
+        {
+            System.out.println("Clicked Incident:" + selectedItem);
+            if (driver != null) driver.clearIncident(selectedItem);
+            lstIncidents.clearSelection();
+            // Remove selectedItem from list model;
+            incidents.remove(selectedItem);
+            // Update the list displayed
+            String[] array = new String[incidents.size()];
+            array = incidents.toArray(array);
+            lstIncidents.setListData(array);
+        }
+    }//GEN-LAST:event_btnClearActionPerformed
 
     /**
@@ -141,5 +225,7 @@
                 sample.add("Greetings");
                 sample.add("Earthling");
-                ATMSBatchViewer view = new ATMSBatchViewer();
+                List<String> items = new ArrayList<String>();
+                items.add("Able"); items.add("Baker");
+                ATMSBatchViewer view = new ATMSBatchViewer(null,items);
                 view.setVisible(true);
                 view.update("01", sample);
@@ -150,6 +236,10 @@
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnClear;
+    private javax.swing.JScrollPane jScrollPane1;
     private javax.swing.JList<String> lstEvents;
+    private javax.swing.JList<String> lstIncidents;
     private javax.swing.JPanel pnlEvents;
+    private javax.swing.JPanel pnlIncidents;
     private javax.swing.JScrollPane scrollEvents;
     private javax.swing.JLabel txtClockTime;
Index: /trunk/src/tmcsim/client/ATMSBatchViewer.form
===================================================================
--- /trunk/src/tmcsim/client/ATMSBatchViewer.form	(revision 128)
+++ /trunk/src/tmcsim/client/ATMSBatchViewer.form	(revision 135)
@@ -28,4 +28,9 @@
               <EmptySpace max="-2" attributes="0"/>
           </Group>
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace min="-2" pref="76" max="-2" attributes="0"/>
+              <Component id="pnlIncidents" min="-2" max="-2" attributes="0"/>
+              <EmptySpace max="32767" attributes="0"/>
+          </Group>
       </Group>
     </DimensionLayout>
@@ -34,5 +39,7 @@
           <Group type="102" alignment="0" attributes="0">
               <Component id="pnlEvents" min="-2" max="-2" attributes="0"/>
-              <EmptySpace min="0" pref="129" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="pnlIncidents" max="32767" attributes="0"/>
+              <EmptySpace max="-2" attributes="0"/>
           </Group>
       </Group>
@@ -46,5 +53,5 @@
           <Group type="103" groupAlignment="0" attributes="0">
               <Group type="102" alignment="1" attributes="0">
-                  <EmptySpace pref="83" max="32767" attributes="0"/>
+                  <EmptySpace pref="74" max="32767" attributes="0"/>
                   <Component id="scrollEvents" min="-2" pref="354" max="-2" attributes="0"/>
                   <EmptySpace min="-2" pref="59" max="-2" attributes="0"/>
@@ -104,4 +111,69 @@
       </SubComponents>
     </Container>
+    <Container class="javax.swing.JPanel" name="pnlIncidents">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" attributes="0">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Component id="btnClear" min="-2" max="-2" attributes="0"/>
+                      <Component id="jScrollPane1" min="-2" pref="211" max="-2" attributes="0"/>
+                  </Group>
+                  <EmptySpace min="0" pref="173" max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="1" attributes="0">
+                  <Component id="jScrollPane1" min="-2" pref="179" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="btnClear" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Component class="javax.swing.JButton" name="btnClear">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Clear Incident"/>
+          </Properties>
+          <Events>
+            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnClearActionPerformed"/>
+          </Events>
+        </Component>
+        <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+          <AuxValues>
+            <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+          </AuxValues>
+
+          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+          <SubComponents>
+            <Component class="javax.swing.JList" name="lstIncidents">
+              <Properties>
+                <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+                  <Font name="Noto Mono" size="15" style="0"/>
+                </Property>
+                <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
+                  <StringArray count="5">
+                    <StringItem index="0" value="Item 1"/>
+                    <StringItem index="1" value="Item 2"/>
+                    <StringItem index="2" value="Item 3"/>
+                    <StringItem index="3" value="Item 4"/>
+                    <StringItem index="4" value="Item 5"/>
+                  </StringArray>
+                </Property>
+                <Property name="selectionMode" type="int" value="0"/>
+              </Properties>
+              <AuxValues>
+                <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
+              </AuxValues>
+            </Component>
+          </SubComponents>
+        </Container>
+      </SubComponents>
+    </Container>
   </SubComponents>
 </Form>
