Changeset 190 in tmcsimulator for trunk/src/atmsdriver/model/Highways.java


Ignore:
Timestamp:
10/29/2017 10:51:53 PM (9 years ago)
Author:
jtorres
Message:

vds_data/highways_fullmap.txt: removed lane num field, not necessary. ATMSDriver.java: removed System.out statement. FEPLine.java: renamed lineNum member to lineID. Highways.java: added example output for toCondensedFormat(boolean) method in method comments. LoopDetector?.java: removed spd member, not necessary, as we calculate speed form occ and vol. Station.java: conformed to above changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/atmsdriver/model/Highways.java

    r186 r190  
    6161        // configure and load highways 
    6262        this.highways = configureHighways(); 
    63          
     63 
    6464        // write to FEP host and port number 
    6565        this.FEPHostName = FEPHostName; 
     
    278278 
    279279        int loopID = scline.nextInt(); 
    280         int laneNum = scline.nextInt(); 
    281         String loopLoc = getLoopLoc(line); // NEED GET LOOPLOC 
     280        String loopLoc = getLoopLoc(line); 
    282281        scline.close(); 
    283         return new LoopDetector(loopID, loopLoc, laneNum); 
     282        return new LoopDetector(loopID, loopLoc); 
    284283    } 
    285284 
     
    293292    { 
    294293        Scanner sc = new Scanner(line); 
    295         sc.nextInt(); 
    296294        sc.nextInt(); 
    297295 
     
    343341             
    344342            // Write the highways data over the socket 
    345             out.println(this.toXML()); 
     343            out.println(this.toCondensedFormat(false)); 
    346344             
    347345            // close the socket 
     
    369367     * @param MetaDataOnly Whether you want meta data, or a full dump for FEPSim 
    370368     * @return String, highways data in condensed format 
     369     *  
     370     * Example toCondensedFormat(MetaDataOnly = false) output: 
     371     *  
     372     * 43                   // "number of lines" 
     373     * 32 0 13              // "line id" "count num" "number of stations" 
     374     * 1210831 1 5 S 0.9 8  // "station id" "drop num" "route num"... 
     375     *                      //      ..."direction" "postmile" "number of loops" 
     376     * 1210832  0.0 0       // "loop id" "occ" "vol" 
     377     * 1210833  0.0 0       // .. 
     378     * 1210834  0.0 0       // .. 
     379     * 1210835  0.0 0       // .. 
     380     * 1210836  0.0 0       // .. 
     381     * 1210837  0.0 0       // .. 
     382     * 1210838  0.0 0       // .. 
     383     * 1210839  0.0 0       // .. 
     384     * ... 
     385     *  
     386     * Example toCondensedFormat(MetaDataOnly = true) output: 
     387     *  
     388     * 43                           // "number of lines" 
     389     * 32 0 13                      // "line id" "count num" "number of stations" 
     390     * 1210831 1 5 S 0.9 8 CALAFIA  // "station id" "drop num" "route num"... 
     391     *                              //      ..."direction" "postmile"... 
     392     *                              //      ..."number of loops" "string location" 
     393     * 1210832 ML_1                 // "loop id" "loop location" 
     394     * 1210833 ML_2                 // "            " 
     395     * 1210834 ML_3                 // "            " 
     396     * 1210835 ML_4                 // "            " 
     397     * 1210836 PASSAGE              // "            " 
     398     * 1210837 DEMAND               // "            " 
     399     * 1210838 QUEUE                // "            " 
     400     * 1210839 RAMP_OFF             // "            " 
     401     * ... 
    371402     */ 
    372403    public String toCondensedFormat(boolean MetaDataOnly) 
Note: See TracChangeset for help on using the changeset viewer.