Changeset 114 in tmcsimulator for trunk/src/atmsdriver/model/Station.java
- Timestamp:
- 10/14/2017 10:11:04 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/atmsdriver/model/Station.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/model/Station.java
r109 r114 50 50 this.routeNumber = hwy; 51 51 52 this.MLTotVol = 0; 53 this.OppTotVol = 0; 52 this.MLTotVol = getMLTotVol(); 53 this.OppTotVol = getOPPTotVol(); 54 } 55 56 private int getMLTotVol() 57 { 58 int mlTotVol = 0; 59 for(LoopDetector loop : loops) 60 { 61 if(loop.loopLocation.startsWith("ML")) 62 { 63 mlTotVol += loop.vol; 64 } 65 } 66 return mlTotVol; 67 } 68 69 private int getOPPTotVol() 70 { 71 int oppTotVol = 0; 72 for(LoopDetector loop : loops) 73 { 74 if(loop.loopLocation.startsWith("OP")) 75 { 76 oppTotVol += loop.vol; 77 } 78 } 79 return oppTotVol; 54 80 } 55 81 … … 143 169 // vol and occ along with each color. Then the updateLoop call 144 170 // below could be update(dotColor.volume, dotColor.occ, speed) 145 int volume = 0;146 int occ = 0;171 int volume = 10; 172 int occ = 10; 147 173 int speed = 0; 148 174 loop.updateLoop(volume, occ, speed);
Note: See TracChangeset
for help on using the changeset viewer.
