79 #include <mesosim/MESegment.h>
80 #include <mesosim/MELoop.h>
84 #ifdef CHECK_MEMORY_LEAKS
86 #endif // CHECK_MEMORY_LEAKS
89 #ifdef DEBUG_VEHICLE_GUI_SELECTION
96 #define BUS_STOP_OFFSET 0.5
98 #define CRLL_LOOK_AHEAD 5
101 #define DIST_TO_STOPLINE_EXPECT_PRIORITY 1.0
131 return (myPos != state.
myPos ||
143 myPos(pos), mySpeed(speed) {}
151 mySpeedAdaptationStarted(true),
152 myConsiderSafeVelocity(true),
153 myConsiderMaxAcceleration(true),
154 myConsiderMaxDeceleration(true),
155 myRespectJunctionPriority(true),
156 myEmergencyBrakeRedLight(true),
157 myAmVTDControlled(false),
171 mySpeedAdaptationStarted =
true;
172 mySpeedTimeLine = speedTimeLine;
178 myLaneTimeLine = laneTimeLine;
185 myOriginalSpeed = speed;
187 while (mySpeedTimeLine.size() == 1 || (mySpeedTimeLine.size() > 1 && currentTime > mySpeedTimeLine[1].first)) {
188 mySpeedTimeLine.erase(mySpeedTimeLine.begin());
191 if (mySpeedTimeLine.size() < 2 || currentTime < mySpeedTimeLine[0].first) {
195 if (!mySpeedAdaptationStarted) {
196 mySpeedTimeLine[0].second = speed;
197 mySpeedAdaptationStarted =
true;
201 speed = mySpeedTimeLine[0].second - (mySpeedTimeLine[0].second - mySpeedTimeLine[1].second) * td;
202 if (myConsiderSafeVelocity) {
203 speed =
MIN2(speed, vSafe);
205 if (myConsiderMaxAcceleration) {
206 speed =
MIN2(speed, vMax);
208 if (myConsiderMaxDeceleration) {
209 speed =
MAX2(speed, vMin);
218 while (myLaneTimeLine.size() == 1 || (myLaneTimeLine.size() > 1 && currentTime > myLaneTimeLine[1].first)) {
219 myLaneTimeLine.erase(myLaneTimeLine.begin());
223 if (myLaneTimeLine.size() >= 2 && currentTime >= myLaneTimeLine[0].first) {
224 const unsigned int destinationLaneIndex = myLaneTimeLine[1].second;
225 if (destinationLaneIndex < (
unsigned int)currentEdge.
getLanes().size()) {
226 if (currentLaneIndex > destinationLaneIndex) {
228 }
else if (currentLaneIndex < destinationLaneIndex) {
240 mode = myStrategicLC;
242 mode = myCooperativeLC;
244 mode = mySpeedGainLC;
246 mode = myRightDriveLC;
254 state &= ~LCA_WANTS_LANECHANGE_OR_STAY;
262 state &= ~LCA_WANTS_LANECHANGE_OR_STAY;
283 switch (changeRequest) {
299 assert(myLaneTimeLine.size() >= 2);
300 assert(currentTime >= myLaneTimeLine[0].first);
301 return STEPS2TIME(myLaneTimeLine[1].first - currentTime);
307 myConsiderSafeVelocity = value;
313 myConsiderMaxAcceleration = value;
319 myConsiderMaxDeceleration = value;
325 myRespectJunctionPriority = value;
331 myEmergencyBrakeRedLight = value;
349 if (myVTDRoute.size() != 0) {
353 if (myVTDPos > myVTDLane->getLength()) {
354 myVTDPos = myVTDLane->getLength();
356 myVTDLane->forceVehicleInsertion(v, myVTDPos);
358 myAmVTDControlled =
false;
372 (*i)->resetPartialOccupation(
this);
376 if ((*i).myLink != 0) {
377 (*i).myLink->removeApproaching(
this);
412 for (std::vector<SUMOVehicleParameter::Stop>::iterator i = pars->
stops.begin(); i != pars->
stops.end(); ++i) {
415 "' on lane '" + i->lane +
"' is too close or not downstream the current route.");
418 for (std::vector<SUMOVehicleParameter::Stop>::const_iterator i = route->
getStops().begin(); i != route->
getStops().end(); ++i) {
421 "' on lane '" + i->lane +
"' is too close or not downstream the current route.");
425 const MSLane*
const depLane = (*myCurrEdge)->getDepartLane(*
this);
427 throw ProcessError(
"Invalid departlane definition for vehicle '" + pars->
id +
"'.");
431 WRITE_WARNING(
"Choosing new speed factor for vehicle '" + pars->
id +
"' to match departure speed.");
435 "' is too high for the departure lane '" + depLane->getID() +
"'.");
440 "' is too high for the vehicle type '" + type->
getID() +
"'.");
452 if ((*i).myLink != 0) {
453 (*i).myLink->removeApproaching(
this);
498 for (std::list<Stop>::iterator iter =
myStops.begin(); iter !=
myStops.end();) {
499 if (find(
myCurrEdge, edges.end(), &iter->lane->getEdge()) == edges.end()) {
502 iter->edge = find(
myCurrEdge, edges.end(), &iter->lane->getEdge());
507 for (std::vector<SUMOVehicleParameter::Stop>::const_iterator i = newRoute->
getStops().begin(); i != newRoute->
getStops().end(); ++i) {
510 "' on lane '" + i->lane +
"' is too close or not downstream the new route.");
565 if (!rem->first->notifyMove(*
this, oldPos + rem->second, newPos + rem->second, newSpeed)) {
567 if (myTraceMoveReminders) {
568 traceMoveReminder(
"notifyMove", rem->first, rem->second,
false);
574 if (myTraceMoveReminders) {
575 traceMoveReminder(
"notifyMove", rem->first, rem->second,
true);
590 rem->second += oldLaneLength;
592 if (myTraceMoveReminders) {
593 traceMoveReminder(
"adaptedPos", rem->first, rem->second,
true);
626 if (offset == 0. && !changingLanes) {
661 atan2(p1.
x() - p2.
x(), p2.
y() - p1.
y()) * 180. /
M_PI :
682 if (stop.
until != -1) {
683 stop.
until += untilOffset;
695 std::list<Stop>::iterator iter =
myStops.begin();
698 prevStopEdge =
myStops.back().edge;
699 prevStopPos =
myStops.back().endPos;
702 if (prevStopEdge == stop.
edge && prevStopPos > stop.
endPos) {
708 while (iter !=
myStops.end() && (iter->edge < stop.
edge ||
709 (iter->endPos < stop.
endPos && iter->edge == stop.
edge))) {
710 prevStopEdge = iter->edge;
711 prevStopPos = iter->endPos;
715 int index = stopPar.
index;
717 prevStopEdge = iter->edge;
718 prevStopPos = iter->endPos;
726 (prevStopEdge == stop.
edge && prevStopPos > stop.
endPos)) {
739 pos += (*myCurrEdge)->getLength();
776 return currentVelocity;
787 for (std::vector<MSPerson*>::const_iterator i = persons.begin(); i != persons.end(); ++i) {
815 bool busStopsMustHaveSpace =
true;
820 busStopsMustHaveSpace =
false;
830 if (stop.
until >= 0) {
846 return currentVelocity;
860 #ifdef DEBUG_VEHICLE_GUI_SELECTION
866 for (DriveItemVector::iterator i = lfLinks.begin(); i != lfLinks.end(); ++i) {
867 if ((*i).myLink != 0) {
868 (*i).myLink->removeApproaching(
this);
872 #ifdef HAVE_INTERNAL_LANES
873 myLinkLeaders.clear();
895 assert(bestLaneConts.size() > 0);
896 #ifdef HAVE_INTERNAL_LANES
897 bool hadNonInternal =
false;
899 bool hadNonInternal =
true;
904 unsigned int view = 0;
914 std::pair<const MSVehicle*, SUMOReal> leaderInfo = std::make_pair(pred, gap);
920 adaptToLeader(leaderInfo, seen, lastLink, lane, v, vLinkPass);
932 v =
MIN2(v, stopSpeed);
939 MSLinkCont::const_iterator link =
MSLane::succLinkSec(*
this, view + 1, *lane, bestLaneConts);
985 (*link)->getViaLaneOrLane()->getParallelLane(-
getLaneChangeModel().getLaneChangeDirection()) == 0)) {
987 const SUMOReal va = seen / timeRemaining;
992 const bool setRequest = v > 0;
1001 #ifdef HAVE_INTERNAL_LANES
1004 for (MSLink::LinkLeaders::const_iterator it = linkLeaders.begin(); it != linkLeaders.end(); ++it) {
1006 const MSVehicle* leader = (*it).vehAndGap.first;
1010 adaptToLeader(std::make_pair(
this, -1), seen, lastLink, lane, v, vLinkPass, it->distToCrossing);
1011 }
else if (leader->myLinkLeaders.count(
getID()) == 0) {
1013 myLinkLeaders.insert(leader->
getID());
1014 adaptToLeader(it->vehAndGap, seen, lastLink, lane, v, vLinkPass, it->distToCrossing);
1015 if (lastLink != 0) {
1023 vLinkWait =
MIN2(vLinkWait, v);
1026 if (lastLink != 0) {
1032 if (!(*link)->havePriority() && stopDist > cfModel.
getMaxDecel()) {
1041 const SUMOReal accelTime = (vLinkPass - v) / accel;
1042 const SUMOReal accelWay = accelTime * (vLinkPass + v) * 0.5;
1054 arrivalSpeedBraking = arrivalSpeed;
1061 arrivalSpeedBraking =
MIN2(arrivalSpeedBraking, arrivalSpeed);
1062 arrivalTimeBraking =
MAX2(arrivalTime, t +
TIME2STEPS(seen / ((v + arrivalSpeedBraking) * 0.5)));
1065 arrivalTime, arrivalSpeed,
1066 arrivalTimeBraking, arrivalSpeedBraking,
1069 #ifdef HAVE_INTERNAL_LANES
1070 if ((*link)->getViaLane() == 0) {
1071 hadNonInternal =
true;
1078 if (!setRequest || ((v <= 0 || seen > dist) && hadNonInternal && seenNonInternal > vehicleLength *
CRLL_LOOK_AHEAD)) {
1082 lane = (*link)->getViaLaneOrLane();
1094 lastLink = &lfLinks.back();
1105 if (leaderInfo.first != 0) {
1108 if (leaderInfo.second >= 0) {
1109 vsafeLeader = cfModel.
followSpeed(
this,
getSpeed(), leaderInfo.second, leaderInfo.first->getSpeed(), leaderInfo.first->getCarFollowModel().getMaxDecel());
1115 if (distToCrossing >= 0) {
1119 if (lastLink != 0) {
1122 v =
MIN2(v, vsafeLeader);
1123 vLinkPass =
MIN2(vLinkPass, vsafeLeader);
1130 #ifdef DEBUG_VEHICLE_GUI_SELECTION
1151 DriveItemVector::iterator i;
1153 MSLink* link = (*i).myLink;
1155 if (link != 0 && (*i).mySetRequest) {
1161 vSafe = (*i).myVLinkWait;
1168 const bool influencerPrio =
false;
1172 const bool opened = yellow || influencerPrio ||
1173 link->
opened((*i).myArrivalTime, (*i).myArrivalSpeed, (*i).getLeaveSpeed(),
1179 vSafe = (*i).myVLinkWait;
1198 vSafe = (*i).myVLinkPass;
1204 vSafe = (*i).myVLinkWait;
1212 vSafe = (*i).myVLinkWait;
1271 std::vector<MSLane*> passedLanes;
1273 passedLanes.push_back(*i);
1275 if (passedLanes.size() == 0 || passedLanes.back() !=
myLane) {
1276 passedLanes.push_back(
myLane);
1279 std::string emergencyReason =
" for unknown reasons";
1292 MSLink* link = (*i).myLink;
1303 emergencyReason =
" because of a red traffic light";
1310 emergencyReason =
" because there is no connection to the next edge";
1314 if (approachedLane !=
myLane && approachedLane != 0) {
1322 WRITE_WARNING(
"Vehicle '" +
getID() +
"' could not finish continuous lane change (turn lane) time=" +
1333 passedLanes.push_back(approachedLane);
1339 (*i)->resetPartialOccupation(
this);
1361 std::vector<MSLane*>::reverse_iterator i = passedLanes.rbegin() + 1;
1362 while (leftLength > 0 && i != passedLanes.rend()) {
1364 leftLength -= (*i)->setPartialOccupation(
this, leftLength);
1386 for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) {
1388 foundStopped =
true;
1389 const SUMOReal ret = (*i)->getPositionOnLane() - (*i)->getVehicleType().getLengthWithGap() - lengths;
1393 lengths += (*i)->getVehicleType().getLengthWithGap();
1402 #ifdef DEBUG_VEHICLE_GUI_SELECTION
1410 #ifdef HAVE_INTERNAL_LANES
1412 bool hadVehicle =
false;
1413 SUMOReal seenSpace = -lengthsInFront;
1415 bool foundStopped =
false;
1418 for (
unsigned int i = 0; i < lfLinks.size(); ++i) {
1421 if (item.
myLink == 0 || foundStopped) {
1427 const MSLane* approachedLane = item.
myLink->getViaLane();
1428 if (approachedLane != 0) {
1452 foundStopped =
true;
1455 seenSpace += approachedLane->
getLength();
1469 foundStopped =
true;
1477 #ifdef DEBUG_VEHICLE_GUI_SELECTION
1483 for (
int i = (
int)(lfLinks.size() - 1); i > 0; --i) {
1492 bool allowsContinuation = item.
myLink == 0 || item.
myLink->
isCont() || !lfLinks[i].hadVehicle || opened;
1493 if (!opened && item.
myLink != 0) {
1497 allowsContinuation =
true;
1501 if (allowsContinuation) {
1507 int removalBegin = -1;
1508 for (
unsigned int i = 0; hadVehicle && i < lfLinks.size() && removalBegin < 0; ++i) {
1522 if (leftSpace < 0/* && item.myLink->willHaveBlockedFoe()*/) {
1529 if (leftSpace < -impatienceCorrection / 10. && item.myLink->hasFoes()) {
1537 while (removalBegin < (
int)(lfLinks.size())) {
1539 lfLinks[removalBegin].myVLinkPass = lfLinks[removalBegin].myVLinkWait;
1541 lfLinks[removalBegin].mySetRequest =
false;
1550 for (DriveItemVector::iterator i = lfLinks.begin(); i != lfLinks.end(); ++i) {
1551 if ((*i).myLink != 0) {
1555 (*i).myLink->setApproaching(
this, (*i).myArrivalTime, (*i).myArrivalSpeed, (*i).getLeaveSpeed(),
1556 (*i).mySetRequest, (*i).myArrivalTimeBraking, (*i).myArrivalSpeedBraking,
getWaitingTime());
1565 if (rem->first->getLane() != 0 && rem->first->getLane() !=
getLane()) {
1567 if (myTraceMoveReminders) {
1568 traceMoveReminder(
"notifyEnter_skipped", rem->first, rem->second,
true);
1573 if (rem->first->notifyEnter(*
this, reason)) {
1575 if (myTraceMoveReminders) {
1576 traceMoveReminder(
"notifyEnter", rem->first, rem->second,
true);
1582 if (myTraceMoveReminders) {
1583 traceMoveReminder(
"notifyEnter", rem->first, rem->second,
false);
1613 if (!onTeleporting) {
1649 while (i != route.
begin() && leftLength > 0) {
1656 leftLength -= (lane)->setPartialOccupation(
this, leftLength);
1697 MSLane* clane = enteredLane;
1698 while (leftLength > 0) {
1704 leftLength -= (clane)->setPartialOccupation(
this, leftLength);
1712 if (rem->first->notifyLeave(*
this,
myState.
myPos + rem->second, reason)) {
1714 if (myTraceMoveReminders) {
1715 traceMoveReminder(
"notifyLeave", rem->first, rem->second,
true);
1721 if (myTraceMoveReminders) {
1722 traceMoveReminder(
"notifyLeave", rem->first, rem->second,
false);
1730 (*i)->resetPartialOccupation(
this);
1761 const std::vector<MSVehicle::LaneQ>&
1769 #ifdef DEBUG_VEHICLE_GUI_SELECTION
1776 if (startLane == 0) {
1779 assert(startLane != 0);
1797 std::vector<LaneQ>& lanes = *it;
1798 assert(lanes.size() > 0);
1799 if (&(lanes[0].lane->getEdge()) == nextEdge) {
1801 std::vector<LaneQ> oldLanes = lanes;
1803 const std::vector<MSLane*>& sourceLanes = startLane->
getEdge().
getLanes();
1804 for (std::vector<MSLane*>::const_iterator it_source = sourceLanes.begin(); it_source != sourceLanes.end(); ++it_source) {
1805 for (std::vector<LaneQ>::iterator it_lane = oldLanes.begin(); it_lane != oldLanes.end(); ++it_lane) {
1806 if ((*it_source)->getLinkCont()[0]->getLane() == (*it_lane).lane) {
1807 lanes.push_back(*it_lane);
1814 for (
int i = 0; i < (
int)lanes.size(); ++i) {
1815 if (i + lanes[i].bestLaneOffset < 0) {
1816 lanes[i].bestLaneOffset = -i;
1818 if (i + lanes[i].bestLaneOffset >= (
int)lanes.size()) {
1819 lanes[i].bestLaneOffset = (
int)lanes.size() - i - 1;
1821 assert(i + lanes[i].bestLaneOffset >= 0);
1822 assert(i + lanes[i].bestLaneOffset < (
int)lanes.size());
1823 if (lanes[i].bestContinuations[0] != 0) {
1825 lanes[i].bestContinuations.insert(lanes[i].bestContinuations.begin(), (
MSLane*)0);
1827 if (startLane->
getLinkCont()[0]->getLane() == lanes[i].lane) {
1830 assert(&(lanes[i].lane->getEdge()) == nextEdge);
1843 myLastBestLanesEdge = &startLane->
getEdge();
1847 const MSEdge* nextStopEdge = 0;
1848 const MSLane* nextStopLane = 0;
1852 nextStopLane = nextStop.
lane;
1853 nextStopEdge = &nextStopLane->
getEdge();
1861 if (nextStopEdge != 0) {
1870 bool progress =
true;
1872 std::vector<LaneQ> currentLanes;
1873 const std::vector<MSLane*>* allowed = 0;
1874 const MSEdge* nextEdge = 0;
1876 nextEdge = *(ce + 1);
1879 const std::vector<MSLane*>& lanes = (*ce)->getLanes();
1880 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
1887 q.
allowsContinuation = allowed == 0 || find(allowed->begin(), allowed->end(), cl) != allowed->end();
1888 currentLanes.push_back(q);
1891 if (nextStopEdge == *ce) {
1893 for (std::vector<LaneQ>::iterator q = currentLanes.begin(); q != currentLanes.end(); ++q) {
1894 if (nextStopLane != 0 && nextStopLane != (*q).lane) {
1895 (*q).allowsContinuation =
false;
1896 (*q).length = nextStopPos;
1903 seenLength += currentLanes[0].lane->getLength();
1905 progress &= (seen <= 4 || seenLength < 3000);
1906 progress &= seen <= 8;
1918 int bestThisIndex = 0;
1921 for (std::vector<LaneQ>::iterator j = last.begin(); j != last.end(); ++j, ++index) {
1922 if ((*j).length > bestLength) {
1923 bestLength = (*j).length;
1924 bestThisIndex = index;
1928 for (std::vector<LaneQ>::iterator j = last.begin(); j != last.end(); ++j, ++index) {
1929 if ((*j).length < bestLength) {
1930 (*j).bestLaneOffset = bestThisIndex - index;
1937 for (std::vector<std::vector<LaneQ> >::reverse_iterator i =
myBestLanes.rbegin() + 1; i !=
myBestLanes.rend(); ++i) {
1938 std::vector<LaneQ>& nextLanes = (*(i - 1));
1939 std::vector<LaneQ>& clanes = (*i);
1940 MSEdge& cE = clanes[0].lane->getEdge();
1944 for (std::vector<LaneQ>::iterator j = nextLanes.begin(); j != nextLanes.end(); ++j, ++index) {
1945 if ((*j).lane->isApproachedFrom(&cE) && bestConnectedLength < (*j).length) {
1946 bestConnectedLength = (*j).length;
1948 if (bestLength < (*j).length) {
1949 bestLength = (*j).length;
1953 int bestThisIndex = 0;
1954 if (bestConnectedLength > 0) {
1956 for (std::vector<LaneQ>::iterator j = clanes.begin(); j != clanes.end(); ++j, ++index) {
1957 LaneQ bestConnectedNext;
1958 bestConnectedNext.
length = -1;
1959 if ((*j).allowsContinuation) {
1960 for (std::vector<LaneQ>::const_iterator m = nextLanes.begin(); m != nextLanes.end(); ++m) {
1961 if ((*m).lane->isApproachedFrom(&cE, (*j).lane)) {
1962 if (bestConnectedNext.
length < (*m).length || (bestConnectedNext.
length == (*m).length &&
abs(bestConnectedNext.
bestLaneOffset) >
abs((*m).bestLaneOffset))) {
1963 bestConnectedNext = *m;
1968 (*j).
length += bestLength;
1970 (*j).length += bestConnectedNext.
length;
1974 if (clanes[bestThisIndex].length < (*j).length || (clanes[bestThisIndex].length == (*j).length &&
abs(clanes[bestThisIndex].bestLaneOffset) >
abs((*j).bestLaneOffset))) {
1975 bestThisIndex = index;
1981 int bestNextIndex = 0;
1982 int bestDistToNeeded = (
int) clanes.size();
1984 for (std::vector<LaneQ>::iterator j = clanes.begin(); j != clanes.end(); ++j, ++index) {
1985 if ((*j).allowsContinuation) {
1987 for (std::vector<LaneQ>::const_iterator m = nextLanes.begin(); m != nextLanes.end(); ++m, ++nextIndex) {
1988 if ((*m).lane->isApproachedFrom(&cE, (*j).lane)) {
1989 if (bestDistToNeeded >
abs((*m).bestLaneOffset)) {
1990 bestDistToNeeded =
abs((*m).bestLaneOffset);
1991 bestThisIndex = index;
1992 bestNextIndex = nextIndex;
1998 clanes[bestThisIndex].length += nextLanes[bestNextIndex].length;
1999 copy(nextLanes[bestNextIndex].bestContinuations.begin(), nextLanes[bestNextIndex].bestContinuations.end(), back_inserter(clanes[bestThisIndex].bestContinuations));
2004 for (std::vector<LaneQ>::iterator j = clanes.begin(); j != clanes.end(); ++j, ++index) {
2005 if ((*j).length < clanes[bestThisIndex].length || ((*j).length == clanes[bestThisIndex].length &&
abs((*j).bestLaneOffset) >
abs(clanes[bestThisIndex].bestLaneOffset))) {
2006 (*j).bestLaneOffset = bestThisIndex - index;
2008 (*j).bestLaneOffset = 0;
2019 std::vector<LaneQ>& currLanes = *
myBestLanes.begin();
2020 std::vector<LaneQ>::iterator i;
2021 for (i = currLanes.begin(); i != currLanes.end(); ++i) {
2023 for (std::vector<MSLane*>::const_iterator j = (*i).bestContinuations.begin() + 1; j != (*i).bestContinuations.end(); ++j) {
2024 nextOccupation += (*j)->getBruttoVehLenSum();
2026 (*i).nextOccupation = nextOccupation;
2027 if ((*i).lane == startLane) {
2034 const std::vector<MSLane*>&
2039 return (*myCurrentLaneInBestLanes).bestContinuations;
2043 const std::vector<MSLane*>&
2054 if ((*i).lane == lane) {
2055 return (*i).bestContinuations;
2067 return (*myCurrentLaneInBestLanes).bestLaneOffset;
2074 std::vector<MSVehicle::LaneQ>& preb =
myBestLanes.front();
2075 assert(laneIndex < preb.size());
2076 preb[laneIndex].occupation = density + preb[laneIndex].nextOccupation;
2093 #ifdef DEBUG_VEHICLE_GUI_SELECTION
2098 if (
isOnRoad() && destEdge != NULL) {
2112 std::pair<const MSVehicle* const, SUMOReal>
2115 return std::make_pair(static_cast<const MSVehicle*>(0), -1);
2122 MSLane::VehCont::const_iterator pred = std::find(vehs.begin(), vehs.end(),
this) + 1;
2123 if (pred != vehs.end()) {
2138 std::pair<const MSVehicle* const, SUMOReal> leaderInfo =
getLeader();
2139 if (leaderInfo.first == 0 ||
getSpeed() == 0) {
2196 unsigned int numExpected = (
unsigned int)
myStops.front().awaitedPersons.size();
2197 if (numExpected != 0) {
2202 numExpected = (
unsigned int)
myStops.front().awaitedPersons.size();
2204 if (numExpected == 0) {
2230 switch ((*link)->getDirection()) {
2268 for (std::list<Stop>::iterator iter =
myStops.begin(); iter !=
myStops.end(); iter++) {
2269 if (iter->lane == lane && fabs(iter->endPos - pos) <
POSITION_EPS) {
2270 if (duration == 0 && !iter->reached) {
2273 iter->duration = duration;
2301 if (
myStops.front().busstop != 0) {
2303 myStops.front().busstop->leaveFrom(
this);
2363 std::vector<int> internals;
2376 throw ProcessError(
"Error: Invalid vehicles in state (may be a meso state)!");
2378 unsigned int routeOffset;
2383 myDeparture -= offset;