Skip to content

Commit

Permalink
params for all stages #14198
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Jan 12, 2024
1 parent 568cdfb commit 774437b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/microsim/MSRouteHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ MSRouteHandler::addRideOrTransport(const SUMOSAXAttributes& attrs, const SumoXML
const SUMOTime intendedDepart = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DEPART, nullptr, ok, -1);
arrivalPos = SUMOVehicleParameter::interpretEdgePos(arrivalPos, to->getLength(), SUMO_ATTR_ARRIVALPOS, agent + " '" + aid + "' takes a " + mode + " to edge '" + to->getID() + "'");
myActiveTransportablePlan->push_back(new MSStageDriving(from, to, s, arrivalPos, st.getVector(), group, intendedVeh, intendedDepart));
myParamStack.push_back(myActiveTransportablePlan->back());
} catch (ProcessError&) {
deleteActivePlanAndVehicleParameter();
throw;
Expand Down Expand Up @@ -1688,11 +1689,13 @@ MSRouteHandler::addTranship(const SUMOSAXAttributes& attrs) {
double arrivalPos = attrs.getOpt<double>(SUMO_ATTR_ARRIVALPOS, cid.c_str(), ok,
cs == nullptr ? myActiveRoute.back()->getLength() : cs->getEndLanePosition());
myActiveTransportablePlan->push_back(new MSStageTranship(myActiveRoute, cs, speed, departPos, arrivalPos));
myParamStack.push_back(myActiveTransportablePlan->back());
myActiveRoute.clear();
} catch (ProcessError&) {
deleteActivePlanAndVehicleParameter();
throw;
}
}


/****************************************************************************/
3 changes: 3 additions & 0 deletions src/utils/vehicle/SUMORouteHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ SUMORouteHandler::myEndElement(int element) {
closeRouteDistribution();
break;
case SUMO_TAG_PERSONTRIP:
case SUMO_TAG_RIDE:
case SUMO_TAG_TRANSPORT:
case SUMO_TAG_TRANSHIP:
case SUMO_TAG_WALK:
if (myParamStack.size() == 2) {
myParamStack.pop_back();
Expand Down

0 comments on commit 774437b

Please sign in to comment.