- Timestamp:
- 10/06/2017 11:44:52 PM (9 years ago)
- Location:
- trunk/src/atmsdriver
- Files:
-
- 2 edited
- 1 moved
-
NetworkLoader.java (modified) (7 diffs)
-
model/FEPLine.java (modified) (3 diffs)
-
model/Station.java (moved) (moved from trunk/src/atmsdriver/model/LoopDetectorStation.java) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/NetworkLoader.java
r79 r84 2 2 3 3 import atmsdriver.model.FEPLine; 4 import atmsdriver.model. LoopDetectorStation;4 import atmsdriver.model.Station; 5 5 import atmsdriver.model.LoopDetector; 6 import atmsdriver.model. LoopDetectorStation.DIRECTION;6 import atmsdriver.model.Station.DIRECTION; 7 7 import java.io.File; 8 8 import java.io.FileNotFoundException; … … 17 17 * 18 18 * The public method getFEPLines() method can be used to get all the FEPLines 19 *within a network. All other methods are private and are used to construct20 *the FEPLines.21 *22 * The "LDSFile" contains LoopDetectorStation and FEPLine information.23 *ex.24 *< Insert file here >19 within a network. All other methods are private and are used to construct 20 the FEPLines. 21 22 The "LDSFile" contains Station and FEPLine information. 23 ex. 24 < Insert file here > 25 25 * The "loopFile" contains individual LoopDetector information. 26 26 * ex. … … 157 157 158 158 // Create each Station for the current FEPLine 159 ArrayList< LoopDetectorStation> stns = new ArrayList<>();159 ArrayList<Station> stns = new ArrayList<>(); 160 160 for(Integer stnNum : stnNums) 161 161 { … … 165 165 166 166 // Create the Station and add to list for curr FEPLine 167 LoopDetectorStation stn =167 Station stn = 168 168 createStation(stnNum, new Scanner(LDSFile), loops); 169 169 stns.add(stn); … … 181 181 182 182 // Creates line 183 private FEPLine createLine(int lineNum, Scanner scLine, ArrayList< LoopDetectorStation> stns)183 private FEPLine createLine(int lineNum, Scanner scLine, ArrayList<Station> stns) 184 184 { 185 185 FEPLine line = null; … … 239 239 240 240 // creates a Station 241 private LoopDetectorStation createStation(int stnNum, Scanner sc, ArrayList<LoopDetector> detectors)242 { 243 LoopDetectorStation LDS = null;241 private Station createStation(int stnNum, Scanner sc, ArrayList<LoopDetector> detectors) 242 { 243 Station LDS = null; 244 244 245 245 sc.nextLine(); … … 264 264 double postmile = scLine.nextDouble(); 265 265 String ldsName = getLocation(strLine); /************* DOESNT GRAB WHOLE???? *///// 266 LDS = new LoopDetectorStation(lineNum, ldsID, drop, ldsName, detectors, fwy, dir, postmile);266 LDS = new Station(lineNum, ldsID, drop, ldsName, detectors, fwy, dir, postmile); 267 267 268 268 break; -
trunk/src/atmsdriver/model/FEPLine.java
r79 r84 19 19 /* Static FEPLine meta data */ 20 20 final private int lineNum; 21 final private List< LoopDetectorStation> stations;21 final private List<Station> stations; 22 22 final private int count; 23 23 // NOT SURE IF NEXT IS FINAL … … 28 28 final private long scheduleSeq; 29 29 30 public FEPLine(int lineNum, List< LoopDetectorStation> stations, int count,30 public FEPLine(int lineNum, List<Station> stations, int count, 31 31 int schedule, int lineInfo, long systemKey, long globalSeq, 32 32 long scheduleSeq) … … 79 79 Element stationsElement = theDoc.createElement(XML_TAGS.STATIONS.tag); 80 80 lineElement.appendChild(stationsElement); 81 for( LoopDetectorStation station : stations)81 for(Station station : stations) 82 82 { 83 83 station.toXML(stationsElement); -
trunk/src/atmsdriver/model/Station.java
r79 r84 5 5 import org.w3c.dom.Element; 6 6 7 /** A LoopDetectorStation is a simulation of a station in a traffic network.7 /** A Station is a simulation of a station in a traffic network. 8 8 * 9 * A LoopDetectorStation (LDS) contains static meta data about the station, and10 *two dynamic attributes, MLTotVol and OppTotVol.11 *12 *A single LDS contains multiple LoopDetectors, which13 *contain data for a single lane on one direction of the freeway. A LDS14 *is specific to a single freeway, direction, and postmile.9 * A Station (LDS) contains static meta data about the station, and 10 two dynamic attributes, MLTotVol and OppTotVol. 11 12 A single LDS contains multiple LoopDetectors, which 13 contain data for a single lane on one direction of the freeway. A LDS 14 is specific to a single freeway, direction, and postmile. 15 15 * 16 16 * @author John A. Torres 17 17 * @version 9/10/2017 18 18 */ 19 public class LoopDetectorStation{20 /* Static LoopDetectorStation meta data */19 public class Station implements Comparable { 20 /* Static Station meta data */ 21 21 final private int lineNum; 22 22 final private int ldsID; // double check … … 28 28 final private DIRECTION direction; 29 29 30 /* Dynamic LoopDetectorStation data */30 /* Dynamic Station data */ 31 31 private int MLTotVol; 32 32 private int OppTotVol; 33 33 34 34 /* Constructor */ 35 public LoopDetectorStation(int lineNum, int ldsID, int drop,35 public Station(int lineNum, int ldsID, int drop, 36 36 String location, List<LoopDetector> loops, int fwy, 37 37 DIRECTION direction, double postmile) … … 48 48 this.MLTotVol = 0; 49 49 this.OppTotVol = 0; 50 } 51 52 @Override 53 public int compareTo(Object o) { 54 50 55 } 51 56
Note: See TracChangeset
for help on using the changeset viewer.
