Changeset 190 in tmcsimulator for trunk/src/atmsdriver/model/LoopDetector.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/LoopDetector.java

    r186 r190  
    2020    final public int loopID; 
    2121    final public String loopLocation; 
    22     final public int laneNum; 
    2322     
    2423    /* dynamic data */ 
    2524    public int vol; 
    2625    public float occ; 
    27     private int spd; 
    2826     
    2927    /** 
     
    3432     * @param laneNum  
    3533     */ 
    36     public LoopDetector(int loopID, String loopLocation, int laneNum) 
     34    public LoopDetector(int loopID, String loopLocation) 
    3735    { 
    3836        /* Set static data */ 
    3937        this.loopID = loopID; 
    4038        this.loopLocation = loopLocation; 
    41         this.laneNum = laneNum; 
    4239         
    4340        /* Init dynamic data */ 
    4441        this.vol = 0; 
    45         this.spd = 0; 
    4642        this.occ = 0; 
    4743    } 
     
    5450        LOOP_ID("Loop_ID"), 
    5551        LOOP_LOCATION("Loop_Location"), 
    56         LANE_NUM("Lane_Num"), 
    5752        VOL("Vol"), 
    58         SPD("Spd"), 
    5953        OCC("Occ"), 
    6054        LOOP("Loop"); 
     
    8882        build.append(Integer.toString(this.loopID)); 
    8983        build.append(" "); 
    90         build.append(Integer.toString(this.laneNum)); 
    91         build.append(" "); 
    9284        if(!MetaDataOnly) 
    9385        { 
     
    9688            build.append(" "); 
    9789            build.append(this.vol); 
    98             build.append(" "); 
    99             build.append(this.spd); 
    10090        } 
    10191        else 
     
    113103     * @param spd speed 
    114104     */ 
    115     public void updateLoop(int vol, float occ, int spd) 
     105    public void updateLoop(int vol, float occ) 
    116106    { 
    117107        this.vol = vol; 
    118108        this.occ = occ; 
    119         this.spd = spd; 
    120109    } 
    121110 
     
    140129        loopElement.appendChild(loopLocElement); 
    141130         
    142         Element laneNumElement = theDoc.createElement(XML_TAGS.LANE_NUM.tag); 
    143         laneNumElement.appendChild(theDoc.createTextNode(String.valueOf(this.laneNum))); 
    144         loopElement.appendChild(laneNumElement); 
    145          
    146131        Element volElement = theDoc.createElement(XML_TAGS.VOL.tag); 
    147132        volElement.appendChild(theDoc.createTextNode(String.valueOf(this.vol))); 
     
    151136        occElement.appendChild(theDoc.createTextNode(String.valueOf(this.occ))); 
    152137        loopElement.appendChild(occElement); 
    153          
    154         Element spdElement = theDoc.createElement(XML_TAGS.SPD.tag); 
    155         spdElement.appendChild(theDoc.createTextNode(String.valueOf(this.spd))); 
    156         loopElement.appendChild(spdElement); 
    157138    } 
    158139     
Note: See TracChangeset for help on using the changeset viewer.