59 #ifdef CHECK_MEMORY_LEAKS
61 #endif // CHECK_MEMORY_LEAKS
68 bool addVehiclesDirectly) :
71 myAddVehiclesDirectly(addVehiclesDirectly),
72 myCurrentVTypeDistribution(0),
73 myCurrentRouteDistribution(0) {
104 departPos = bs->getBeginLanePosition();
107 const std::string fromID = attrs.
get<std::string>(
SUMO_ATTR_FROM, pid.c_str(), ok);
110 throw ProcessError(
"The from edge '" + fromID +
"' within a ride of person '" + pid +
"' is not known.");
120 throw ProcessError(
"The start edge within for person '" + pid +
"' is not known.");
122 const std::string toID = attrs.
get<std::string>(
SUMO_ATTR_TO, pid.c_str(), ok);
125 throw ProcessError(
"The to edge '" + toID +
"' within a ride of person '" + pid +
"' is not known.");
234 while (st.hasNext()) {
235 std::string vtypeID = st.next();
309 const std::string
id = vehType->
getID();
312 if (!MSGlobals::gStateLoaded) {
314 throw ProcessError(
"Another vehicle type (or distribution) with the id '" +
id +
"' exists.");
355 if (!MSGlobals::gStateLoaded) {
395 std::vector<SUMOReal> probs;
406 size_t probIndex = 0;
408 std::string routeID = st.
next();
413 const SUMOReal prob = (probs.size() > probIndex ? probs[probIndex] : 1.0);
417 if (probs.size() > 0 && probIndex != probs.size()) {
502 if (!MSGlobals::gStateLoaded) {
587 std::string errorSuffix;
615 if (ok && stop.
lane !=
"") {
617 WRITE_ERROR(
"The lane '" + stop.
lane +
"' for a stop is not known" + errorSuffix);
621 WRITE_ERROR(
"A stop must be placed on a bus stop or a lane" + errorSuffix);
635 WRITE_WARNING(
"Deprecated attribute 'pos' in description of stop" + errorSuffix);
641 WRITE_ERROR(
"Invalid start or end position for stop on lane '" + stop.
lane +
"'" + errorSuffix);
655 WRITE_ERROR(
"Invalid duration or end time is given for a stop on lane '" + stop.
lane +
"'" + errorSuffix);
662 WRITE_ERROR(
"Invalid bool for 'triggered' or 'parking' for stop on lane '" + stop.
lane +
"'" + errorSuffix);
668 }
else if (idx ==
"fit") {
672 if (!ok || stop.
index < 0) {
673 WRITE_ERROR(
"Invalid 'index' for stop on lane '" + stop.
lane +
"'" + errorSuffix);