36 #include <microsim/MSLaneState.h>
43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
52 const std::string&
id,
54 size_t step,
size_t delay,
58 myMaxGap(maxGap), myPassingTime(passingTime), myDetectorGap(detectorGap) {}
63 const std::vector<MSLane*>& lanes,
64 std::map<std::string, std::vector<std::string> >& laneContinuations,
70 SUMOTime laneStateDetectorInterval = 1;
72 std::vector<MSLane*>::const_iterator i;
74 for (i = lanes.begin(); i != lanes.end(); i++) {
80 SUMOReal ilpos = length - inductLoopPosition;
85 std::string
id =
"TLS" + myId +
"_InductLoopOn_" + lane->
getID();
92 for (i = lanes.begin(); i != lanes.end(); i++) {
102 std::string
id =
"TLS" + myId +
"_LaneStateOff_" + lane->
getID();
105 new MSLaneState(
id, lane, lspos, lslen,
106 laneStateDetectorInterval);
129 for (
size_t i = 0; i < isgreen.size(); i++) {
130 if (isgreen.test(i)) {
131 const std::vector<MSLane*>& lanes =
getLanesAt(i);
135 for (LaneVector::const_iterator j = lanes.begin(); j != lanes.end(); j++) {
137 SUMOReal waiting = (*k).second->getCurrentNumberOfWaiting();
139 if (tmpdur > newduration) {
141 newduration = (
int) tmpdur;
167 static_cast<MSActuatedPhaseDefinition*
>(
myPhases[
myStep])->myLastSwitch =
203 for (
size_t i = 0; i < isgreen.size(); i++) {
204 if (isgreen.test(i)) {
205 const std::vector<MSLane*>& lanes =
getLanesAt(i);
209 for (LaneVector::const_iterator j = lanes.begin(); j != lanes.end(); j++) {
214 myInductLoops.find(*j)->second->getTimestepsSinceLastDetection();
225 MSActuatedPhaseDefinition*