Index: /branches/FEPSimulator/HighwaysParser.cpp
===================================================================
--- /branches/FEPSimulator/HighwaysParser.cpp	(revision 177)
+++ /branches/FEPSimulator/HighwaysParser.cpp	(revision 186)
@@ -1,121 +1,15 @@
-#include "NetworkReader.h"
+/* 
+ * File:   HighwaysParser.cpp
+ * Author: jtorres
+ * 
+ * Created on October 28, 2017, 7:23 PM
+ */
 
-HighwaysParser::HighwaysParser(const char * xml) {
-    ldsIndex = 0;
-    loadLines(xml);
-}
+#include "HighwaysParser.h"
 
-LOOP * HighwaysParser::parseLoop(TiXmlElement * loopElem) {
-    LOOP *loop = new LOOP;
-
-    TiXmlElement *subLoopElem = loopElem->FirstChildElement();
-    loop->loopID = atoi(subLoopElem->GetText());
-    subLoopElem = subLoopElem->NextSiblingElement();
-    loop->loop_loc = (char *) subLoopElem->GetText();
-    subLoopElem = subLoopElem->NextSiblingElement();
-    subLoopElem = subLoopElem->NextSiblingElement(); // skip lane num
-    loop->vol = atoi(subLoopElem->GetText());
-    subLoopElem = subLoopElem->NextSiblingElement();
-    loop->occ = atof(subLoopElem->GetText());
-    subLoopElem = subLoopElem->NextSiblingElement();
-    loop->spd = atof(subLoopElem->GetText());
-
-    return loop;
-}
-
-STATION * HighwaysParser::parseStation(TiXmlElement *stationElem, FEP_LINE *line) {
-    STATION *station = new STATION;
-
-    TiXmlElement *stationSubElem = stationElem->FirstChildElement();
-    station->lds = atol(stationSubElem->GetText());
-    cout << "Station: " << station->lds << endl;
-    line->lds.push_back(station->lds);
-    line->ldsIndex.push_back(ldsIndex++);
-    stationSubElem = stationSubElem->NextSiblingElement();
-    station->line_num = atoi(stationSubElem->GetText());
-    stationSubElem = stationSubElem->NextSiblingElement();
-    station->drop = atoi(stationSubElem->GetText());
-    stationSubElem = stationSubElem->NextSiblingElement();
-    stationSubElem = stationSubElem->NextSiblingElement(); // skip location
-    stationSubElem = stationSubElem->NextSiblingElement(); // skip postmile
-    stationSubElem = stationSubElem->NextSiblingElement(); // skip direction
-    stationSubElem = stationSubElem->NextSiblingElement(); // skip freeway
-    station->MlTotVol = atoi(stationSubElem->GetText());
-    stationSubElem = stationSubElem->NextSiblingElement();
-    station->OppTotVol = atoi(stationSubElem->GetText());
-
-    station->pos = 0; // NOT SURE WHY WE NEED THIS?
-
-    // Add loops to station
-    TiXmlElement *loopElem = stationSubElem->NextSiblingElement()->FirstChildElement();
-    for (loopElem; loopElem; loopElem = loopElem->NextSiblingElement()) {
-        LOOP *loop = parseLoop(loopElem);
-        station->loops.push_back(loop);
-    }
-    cout << "Number of Loops: " << station->loops.size() << endl;
-    // Data pack ATMS message
-    station->length = station->loops.size() * 2 + CONTROL_DATA_LEN;
-    cout << station->loops.size() << endl;
-    station->dataPack = DataPacker::packData(station);
-
-    return station;
-}
-
-FEP_LINE * HighwaysParser::parseLine(TiXmlElement * lineElem) {
-    FEP_LINE *line = new FEP_LINE;
-
-    TiXmlElement *lineSubElem = lineElem->FirstChildElement();
-    line->lineNum = atoi(lineSubElem->GetText());
-    cout << "Line: " << line->lineNum << endl;
-    lineSubElem = lineSubElem->NextSiblingElement();
-    line->count = atoi(lineSubElem->GetText());
-    lineSubElem = lineSubElem->NextSiblingElement();
-    line->schedule = atoi(lineSubElem->GetText());
-    lineSubElem = lineSubElem->NextSiblingElement();
-    line->lineInfo = atoi(lineSubElem->GetText());
-    lineSubElem = lineSubElem->NextSiblingElement();
-    line->systemKey = atol(lineSubElem->GetText());
-    lineSubElem = lineSubElem->NextSiblingElement();
-    line->globalSeq = atol(lineSubElem->GetText());
-    lineSubElem = lineSubElem->NextSiblingElement();
-    line->schedleSeq = atol(lineSubElem->GetText());
-
-    TiXmlElement *stationsElem = lineSubElem->NextSiblingElement();
-    TiXmlElement *stationElem = stationsElem->FirstChildElement();
-    for (stationElem; stationElem; stationElem = stationElem->NextSiblingElement()) {
-        stations.push_back(parseStation(stationElem, line));
-    }
-    return line;
-}
-
-void HighwaysParser::loadLines(const char * xml) {
-    // Load network xml file
-    TiXmlDocument doc;
-    doc.Parse((const char*) xml, 0, TIXML_ENCODING_UTF8);
-
-    // grab <Network> element
-    TiXmlHandle hDoc(&doc);
-    TiXmlElement *networkElem = hDoc.FirstChildElement().Element();
-
-    // grab first <Line> element
-    TiXmlElement *lineElem = networkElem->FirstChildElement();
-
-    // iterate through each line element to create FEP_LINE list
-    for (lineElem; lineElem; lineElem = lineElem->NextSiblingElement()) {
-        lines.push_back(parseLine(lineElem));
-    }
-}
-
-vector<FEP_LINE*> HighwaysParser::getLines() {
-
-    return lines;
-}
-
-vector<STATION*> HighwaysParser::getStations() {
-
-    return stations;
+HighwaysParser::HighwaysParser() {
 }
 
 HighwaysParser::~HighwaysParser() {
+}
 
-}
Index: /branches/FEPSimulator/nbproject/configurations.xml
===================================================================
--- /branches/FEPSimulator/nbproject/configurations.xml	(revision 185)
+++ /branches/FEPSimulator/nbproject/configurations.xml	(revision 186)
@@ -7,5 +7,5 @@
       <itemPath>DataPacker.h</itemPath>
       <itemPath>FEPSim.h</itemPath>
-      <itemPath>NetworkReader.h</itemPath>
+      <itemPath>HighwaysParser.h</itemPath>
       <itemPath>fep.h</itemPath>
       <itemPath>network.h</itemPath>
@@ -62,7 +62,7 @@
       <item path="HighwaysParser.cpp" ex="false" tool="1" flavor2="0">
       </item>
+      <item path="HighwaysParser.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="Main.cpp" ex="false" tool="1" flavor2="0">
-      </item>
-      <item path="NetworkReader.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="fep.h" ex="false" tool="3" flavor2="0">
@@ -105,7 +105,7 @@
       <item path="HighwaysParser.cpp" ex="false" tool="1" flavor2="0">
       </item>
+      <item path="HighwaysParser.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="Main.cpp" ex="false" tool="1" flavor2="0">
-      </item>
-      <item path="NetworkReader.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="fep.h" ex="false" tool="3" flavor2="0">
Index: /branches/FEPSimulator/nbproject/private/private.xml
===================================================================
--- /branches/FEPSimulator/nbproject/private/private.xml	(revision 185)
+++ /branches/FEPSimulator/nbproject/private/private.xml	(revision 186)
@@ -8,4 +8,5 @@
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
+            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/Main.cpp</file>
             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.cpp</file>
         </group>
Index: anches/FEPSimulator/NetworkReader.h
===================================================================
--- /branches/FEPSimulator/NetworkReader.h	(revision 182)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/** 
- * File: NetworkReader.h
- * 
- * A NetworkReader reads in data about the traffic network from a specified
- * xml file.
- * 
- * A NetworkReader contains two public methods 'getLines' and 'getLoops',
- * which are getters for the list of FEP_LINES, and STATIONS, respectively.
- * 
- * Example XML file:
- * <code>
- * <Network>
- * <Line>
- *   <Line_Num>5</Line_Num>
- *   <Count>20</Count>
- *   <Schedule>1</Schedule>
- *   <Line_Info>1</Line_Info>
- *   <System_Key>1123005673</System_Key>
- *   <Global_Seq>1357648</Global_Seq>
- *   <Schedule_Seq>26492</Schedule_Seq>
- *   <Stations>
- *     <Station>
- *       <LDS_ID>1205270</LDS_ID>
- *       <Line_Num>5</Line_Num>
- *       <Drop>19</Drop>
- *       <Location>MAIN 1</Location>
- *       <Post_Mile>33.0</Post_Mile>
- *       <Direction>S</Direction>
- *       <Freeway>5</Freeway>
- *       <ML_Tot_Vol>0</ML_Tot_Vol>
- *       <Opp_Tot_Vol>0</Opp_Tot_Vol>
- *       <Loops>
- *         <Loop>
- *           <Loop_ID>1205272</Loop_ID>
- *           <Loop_Location>RAMP_ON</Loop_Location>
- *           <Lane_Num>1</Lane_Num>
- *           <Vol>0</Vol>
- *           <Occ>0</Occ>
- *           <Spd>0</Spd>
- *         </Loop>
- *          .......
- * </code>
- * 
- * @author John A. Torres
- * @verions 9/08/2017
- */
-
-// Include guard
-#ifndef __NETWORKREADER_H_INCLUDED__
-#define __NETWORKREADER_H_INCLUDED__
-
-// Included dependencies
-#include "network.h"
-#include <vector>
-#include <string.h>
-#include <iostream>
-#include "tinyxml.h"
-#include "DataPacker.h"
-
-class HighwaysParser {
-public:
-    /**
-     * Constructor
-     * @param xml Highway Status XML data
-     */
-    HighwaysParser(const char * xml);
-    
-    /**
-     * Destructor: no cleaning necessary
-     */
-    ~HighwaysParser();
-    
-    /**
-     * Returns FEP_LINE list.
-     * 
-     * @return List of FEP_LINES
-     */
-    vector<FEP_LINE*> getLines();
-    
-    /**
-     * Returns STATIONS list.
-     * @return List of STATIONs
-     */
-    vector<STATION*> getStations();
-    
-private:
-    vector<FEP_LINE*> lines;
-    vector<STATION*> stations;
-    int ldsIndex;
-    
-    /**
-     * Loads Highway Status data from xml.
-     * 
-     * @param xml Highway Status XML.
-     */
-    void loadLines(const char * networkFileName);
-    
-    /**
-     * Parses a single LOOP
-     * @param loopElem TinyXML loop elem
-     * @return LOOP
-     */
-    LOOP * parseLoop(TiXmlElement * loopElem);
-    
-    /**
-     * Parses a single STATION
-     * 
-     * @param TinyXML station element
-     * @param the parent FEP_LINE
-     * @return STATION
-     */
-    STATION * parseStation(TiXmlElement *stationElem, FEP_LINE *line);
-    
-    /**
-     * Parses a single FEP_LINE
-     * @param TinyXML line element
-     * @return FEP_LINE
-     */
-    FEP_LINE * parseLine(TiXmlElement *lineElem);
-};
-
-#endif
Index: /trunk/src/atmsdriver/ATMSDriver.java
===================================================================
--- /trunk/src/atmsdriver/ATMSDriver.java	(revision 184)
+++ /trunk/src/atmsdriver/ATMSDriver.java	(revision 186)
@@ -116,4 +116,5 @@
                 Integer.parseInt(ATMSDriverProperties.getProperty(
                                 PROPERTIES.FEP_WRITER_PORT.name)));
+        System.out.println(highways.toCondensedFormat(false));
         // create the exchange reader
         exchangeReader = new ExchangeReader();
Index: /trunk/src/atmsdriver/model/Highways.java
===================================================================
--- /trunk/src/atmsdriver/model/Highways.java	(revision 184)
+++ /trunk/src/atmsdriver/model/Highways.java	(revision 186)
@@ -354,24 +354,32 @@
         }
     }
-
-    /**
-     * Returns the highways metadata in condensed form. This function took the 
-     * highways model and wrote it into condensed form. It is also useful for
-     * testing.
-     *
-     * @return the highways meta data string
-     */
-    public String getHighwaysMeta()
-    {
-            StringBuilder build = new StringBuilder();
-            build.append(lines.size());
-            build.append("\n");
-            for (FEPLine line : lines)
-            {
-                build.append(line.getLineMeta());
-            }
-            return build.toString();
-    }
-
+    
+    /** Returns a string of highways data. If MetaDataOnly is true, you get a full
+     *  dump of the highways meta data, which does not include dynamic loop values,
+     *  and does include the string location names. If MetaDataOnly is false,
+     *  dynamic loop values are included, and unnecessary information like string
+     *  location values are included.
+     * 
+     *  The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly
+     *  value of false, over the socket.
+     * 
+     *  The MetaDataOnly flag should be used to get a full dump of the highways
+     *  information. This was used to get the highways_fullmap.txt output.
+     * 
+     * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim
+     * @return String, highways data in condensed format
+     */
+    public String toCondensedFormat(boolean MetaDataOnly)
+    {
+        StringBuilder build = new StringBuilder();
+        build.append(lines.size());
+        build.append("\n");
+        for(FEPLine line : lines)
+        {
+            build.append(line.toCondensedFormat(MetaDataOnly));
+        }
+        return build.toString();
+    }
+    
     /**
      * Returns the Highways model data in XML format.
Index: /trunk/src/atmsdriver/model/LoopDetector.java
===================================================================
--- /trunk/src/atmsdriver/model/LoopDetector.java	(revision 184)
+++ /trunk/src/atmsdriver/model/LoopDetector.java	(revision 186)
@@ -68,13 +68,20 @@
     }
     
-    /**
-     * Returns the loop metadata in condensed form.
-     * This is just a quick script function to make a proper highway
-     * metadata configuration file, so that we can read the network
-     * faster.
-     * 
-     * @return loop metadata
-     */
-    public String getLoopMeta()
+    /** Returns a string of highways data. If MetaDataOnly is true, you get a full
+     *  dump of the highways meta data, which does not include dynamic loop values,
+     *  and does include the string location names. If MetaDataOnly is false,
+     *  dynamic loop values are included, and unnecessary information like string
+     *  location values are included.
+     * 
+     *  The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly
+     *  value of false, over the socket.
+     * 
+     *  The MetaDataOnly flag should be used to get a full dump of the highways
+     *  information. This was used to get the highways_fullmap.txt output.
+     * 
+     * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim
+     * @return String, highways data in condensed format
+     */
+    public String toCondensedFormat(boolean MetaDataOnly)
     {
         StringBuilder build = new StringBuilder();
@@ -83,5 +90,17 @@
         build.append(Integer.toString(this.laneNum));
         build.append(" ");
-        build.append(this.loopLocation);
+        if(!MetaDataOnly)
+        {
+            build.append(" ");
+            build.append(this.occ);
+            build.append(" ");
+            build.append(this.vol);
+            build.append(" ");
+            build.append(this.spd);
+        }
+        else
+        {
+            build.append(this.loopLocation);
+        }
         build.append("\n");
         return build.toString();
Index: /trunk/src/atmsdriver/model/Station.java
===================================================================
--- /trunk/src/atmsdriver/model/Station.java	(revision 184)
+++ /trunk/src/atmsdriver/model/Station.java	(revision 186)
@@ -88,13 +88,21 @@
         return oppTotVol;
     }
-
-    /**
-     * Returns the station metadata in condensed form. This is just a quick
-     * script function to make a proper highway metadata configuration file, so
-     * that we can read the network faster.
-     *
-     * @return station metadata
-     */
-    public String getStationMeta()
+    
+    /** Returns a string of highways data. If MetaDataOnly is true, you get a full
+     *  dump of the highways meta data, which does not include dynamic loop values,
+     *  and does include the string location names. If MetaDataOnly is false,
+     *  dynamic loop values are included, and unnecessary information like string
+     *  location values are included.
+     * 
+     *  The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly
+     *  value of false, over the socket.
+     * 
+     *  The MetaDataOnly flag should be used to get a full dump of the highways
+     *  information. This was used to get the highways_fullmap.txt output.
+     * 
+     * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim
+     * @return String, highways data in condensed format
+     */
+    public String toCondensedFormat(boolean MetaDataOnly)
     {
         StringBuilder build = new StringBuilder();
@@ -111,9 +119,12 @@
         build.append(Integer.toString(loops.size()));
         build.append(" ");
-        build.append(this.location);
+        if(MetaDataOnly)
+        {
+            build.append(this.location);
+        }
         build.append("\n");
         for (LoopDetector loop : loops)
         {
-            build.append(loop.getLoopMeta());
+            build.append(loop.toCondensedFormat(MetaDataOnly));
         }
         return build.toString();
Index: /trunk/src/atmsdriver/model/FEPLine.java
===================================================================
--- /trunk/src/atmsdriver/model/FEPLine.java	(revision 184)
+++ /trunk/src/atmsdriver/model/FEPLine.java	(revision 186)
@@ -37,9 +37,20 @@
     }
     
-    /**
-     * Returns the FEPLine meta data in string format
-     * @return FEPLine metadata
+    /** Returns a string of highways data. If MetaDataOnly is true, you get a full
+     *  dump of the highways meta data, which does not include dynamic loop values,
+     *  and does include the string location names. If MetaDataOnly is false,
+     *  dynamic loop values are included, and unnecessary information like string
+     *  location values are included.
+     * 
+     *  The FEPSimulator takes in the toCondensedFormat() output, with a MetaDataOnly
+     *  value of false, over the socket.
+     * 
+     *  The MetaDataOnly flag should be used to get a full dump of the highways
+     *  information. This was used to get the highways_fullmap.txt output.
+     * 
+     * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim
+     * @return String, highways data in condensed format
      */
-    public String getLineMeta()
+    public String toCondensedFormat(boolean MetaDataOnly)
     {
         StringBuilder build = new StringBuilder();
@@ -50,7 +61,7 @@
         build.append(Integer.toString(this.stations.size()));
         build.append("\n");
-        for (Station station : stations)
+        for(Station station : stations)
         {
-            build.append(station.getStationMeta());
+            build.append(station.toCondensedFormat(MetaDataOnly));
         }
         return build.toString();
Index: /trunk/src/tmcsim/application.properties
===================================================================
--- /trunk/src/tmcsim/application.properties	(revision 185)
+++ /trunk/src/tmcsim/application.properties	(revision 186)
@@ -1,5 +1,5 @@
-#Sat, 28 Oct 2017 19:14:00 -0700
+#Sat, 28 Oct 2017 19:54:27 -0700
 
-Application.revision=184
+Application.revision=185
 
-Application.buildnumber=63
+Application.buildnumber=67
Index: /trunk/test/atmsdriver/model/LoadSadDotsTest.java
===================================================================
--- /trunk/test/atmsdriver/model/LoadSadDotsTest.java	(revision 185)
+++ /trunk/test/atmsdriver/model/LoadSadDotsTest.java	(revision 186)
@@ -61,5 +61,5 @@
         ArrayList<Station> stations = fiftyfiveN.stations;
         Station sad = stations.get(0);
-        System.out.println(""+sad.getStationMeta());
+        System.out.println(""+sad.toCondensedFormat(true));
         assertEquals(22, sad.loops.size());
 
@@ -69,5 +69,5 @@
         stations = fourohfiveS.stations;
         Station happy = stations.get(0);
-        System.out.println(""+happy.getStationMeta());
+        System.out.println(""+happy.toCondensedFormat(true));
         assertEquals(9, happy.loops.size());
     }
Index: /trunk/test/atmsdriver/model/StationTest.java
===================================================================
--- /trunk/test/atmsdriver/model/StationTest.java	(revision 103)
+++ /trunk/test/atmsdriver/model/StationTest.java	(revision 186)
@@ -50,5 +50,5 @@
         System.out.println("getStationMeta");
         String expResult = "2 3 4 N 1.0 0 A\n";
-        String result = alpha.getStationMeta();
+        String result = alpha.toCondensedFormat(true);
         assertEquals(expResult, result);
     }
