53 const bool emptyDestinationsAllowed,
54 const bool ignoreErrors,
55 const bool checkSchema) :
59 OptionsCont::getOptions().getFloat(
"mapmatch.distance"),
62 myActiveRouteRepeat(0),
63 myActiveRoutePeriod(0),
64 myActivePlan(nullptr),
65 myActiveContainerPlan(nullptr),
66 myActiveContainerPlanSize(0),
67 myTryRepair(tryRepair),
68 myEmptyDestinationsAllowed(emptyDestinationsAllowed),
71 myKeepVTypeDist(
OptionsCont::getOptions().getBool(
"keep-vtype-distributions")),
72 myUnsortedInput(
OptionsCont::getOptions().exists(
"unsorted-input") &&
OptionsCont::getOptions().getBool(
"unsorted-input")),
73 myWriteFlows(
OptionsCont::getOptions().exists(
"keep-flows") &&
OptionsCont::getOptions().getBool(
"keep-flows")),
74 myCurrentVTypeDistribution(nullptr),
75 myCurrentAlternatives(nullptr),
76 myUseTaz(
OptionsCont::getOptions().getBool(
"with-taz")),
77 myWriteJunctions(
OptionsCont::getOptions().exists(
"write-trips")
79 &&
OptionsCont::getOptions().getBool(
"write-trips.junctions")) {
107 const std::string element =
toString(tag);
117 if (type !=
nullptr) {
126 const std::string tazType = useJunction ?
"junction" :
"taz";
129 if (fromTaz ==
nullptr) {
133 }
else if (fromTaz->getNumSuccessors() == 0 && tag !=
SUMO_TAG_PERSON) {
171 if (viaSink ==
nullptr) {
175 viaEdges.push_back(viaSink);
181 for (
const ROEdge* e : viaEdges) {
190 const std::string tazType = useJunction ?
"junction" :
"taz";
193 if (toTaz ==
nullptr) {
197 }
else if (toTaz->getNumPredecessors() == 0 && tag !=
SUMO_TAG_PERSON) {
253 (*myActiveContainerPlan) << attrs;
262 (*myActiveContainerPlan) << attrs;
294 std::vector<double> probs;
304 while (st.hasNext()) {
305 const std::string typeID = st.next();
307 if (dist !=
nullptr) {
308 const double distProb = ((int)probs.size() > probIndex ? probs[probIndex] : 1.) / dist->
getOverallProb();
309 std::vector<double>::const_iterator probIt = dist->
getProbs().begin();
316 if (type ==
nullptr) {
319 const double prob = ((int)probs.size() > probIndex ? probs[probIndex] : type->
defaultProbability);
325 if (probs.size() > 0 && probIndex != (int)probs.size()) {
399 if (type !=
nullptr) {
466 const ROEdge* last =
nullptr;
469 if (last !=
nullptr) {
471 if (intern->isInternal() && intern->getSuccessors().size() == 1 && intern->getSuccessors().front() == roe) {
472 fullRoute.push_back(intern);
476 fullRoute.push_back(roe);
488 if (stop.until > 0) {
493 throw ProcessError(
TLF(
"Cannot repeat stops with 'until' in route % because no cycleTime is defined.", description));
549 if (ok && index < 0) {
559 const std::string routeID = st.
next();
561 if (route ==
nullptr) {
591 if (fromTaz ==
nullptr) {
598 edges.push_back(fromTaz);
606 if (toTaz ==
nullptr) {
613 edges.push_back(toTaz);
640 if (type ==
nullptr) {
654 if (route ==
nullptr) {
661 const bool needCopy = route->
getID()[0] !=
'!';
669 }
else if (needCopy) {
691 if (dist !=
nullptr) {
693 std::vector<double>::const_iterator probIt = dist->
getProbs().begin();
712 if (type ==
nullptr) {
721 person->
getPlan().push_back(item);
766 std::vector<SUMOTime> departures;
771 std::sort(departures.begin(), departures.end());
772 std::reverse(departures.begin(), departures.end());
811 person->
getPlan().push_back(item->clone());
919 if (toStop ==
nullptr) {
931 (*myActiveContainerPlan) << attrs;
936 std::string errorSuffix;
952 const ROEdge* edge =
nullptr;
953 std::string stoppingPlaceID;
956 if (stoppingPlace !=
nullptr) {
965 if (ok && stop.
edge !=
"") {
967 if (edge ==
nullptr) {
971 }
else if (ok && stop.
lane !=
"") {
973 if (edge ==
nullptr) {
988 positions.push_back(pos);
993 if (type !=
nullptr) {
999 edge = geoEdges.front();
1005 stop.
endPos = edge->
getLanes()[0]->getShape().nearest_offset_to_point2D(pos,
false);
1009 }
else if (!ok || (stop.
lane ==
"" && stop.
edge ==
"")) {
1010 myErrorOutput->
inform(
"A stop must be placed on a bus stop, a container stop, a parking area, an edge or a lane" + errorSuffix);
1046 std::vector<ROPerson::PlanItem*>& plan = *
myActivePlan;
1049 const ROEdge* from =
nullptr;
1050 const ROEdge* to =
nullptr;
1057 }
else if (plan.empty()) {
1061 std::string stoppingPlaceID;
1063 if (stop !=
nullptr) {
1075 stop ==
nullptr ? std::numeric_limits<double>::infinity() : stop->
endPos);
1082 myErrorOutput->
inform(
"Triggered departure for person '" + pid +
"' requires a unique lines value.");
1085 const std::string vehID = st.
front();
1088 if (vehDepart == -1) {
1089 myErrorOutput->
inform(
"Cannot use triggered vehicle '" + vehID +
"' in triggered departure for person '" + pid +
"'.");
1095 myErrorOutput->
inform(
"Unknown vehicle '" + vehID +
"' in triggered departure for person '" + pid +
"'.");
1112 if (st.size() != 1) {
1113 throw ProcessError(
TLF(
"Triggered departure for container '%' requires a unique lines value.", pid));
1115 const std::string vehID = st.front();
1118 throw ProcessError(
"Unknown vehicle '" + vehID +
"' in triggered departure for container '" + pid +
"'.");
1123 if (vehDepart == -1) {
1124 throw ProcessError(
"Cannot use triggered vehicle '" + vehID +
"' in triggered departure for container '" + pid +
"'.");
1138 const std::string& rid,
bool& ok) {
1140 const std::string
id = st.next();
1142 if (edge ==
nullptr) {
1143 myErrorOutput->
inform(
"The edge '" +
id +
"' within the route " + rid +
" is not known.");
1146 into.push_back(edge);
1155 double& departPos,
double& arrivalPos, std::string& busStopID,
1157 const std::string description =
"walk or personTrip of '" + personID +
"'.";
1159 WRITE_WARNING(
TL(
"The attribute departPos is no longer supported for walks, please use the person attribute, the arrivalPos of the previous step or explicit stops."));
1162 if (lastStage !=
nullptr) {
1169 if (bs !=
nullptr) {
1171 arrivalPos = (bs->startPos + bs->endPos) / 2;
1173 if (toEdge !=
nullptr) {
1190 const ROEdge* from =
nullptr;
1191 const ROEdge* to =
nullptr;
1214 double departPos = 0;
1215 double arrivalPos = std::numeric_limits<double>::infinity();
1216 std::string busStopID;
1224 const std::string mode = st.next();
1225 if (mode ==
"car") {
1227 }
else if (mode ==
"taxi") {
1229 }
else if (mode ==
"bicycle") {
1231 }
else if (mode ==
"public") {
1242 departPos, originStopID, arrivalPos, busStopID, walkFactor, group);
1257 const std::shared_ptr<const RORoute> route = routeDef !=
nullptr ? routeDef->
getFirstRoute() :
nullptr;
1258 if (route ==
nullptr) {
1275 double departPos = 0.;
1276 double arrivalPos = std::numeric_limits<double>::infinity();
1278 WRITE_WARNING(
TL(
"The attribute departPos is no longer supported for walks, please use the person attribute, the arrivalPos of the previous step or explicit stops."));
1283 std::string stoppingPlaceID;
1299 for (
ROLane* lane : edgeItem.second->getLanes()) {
1301 const float cmin[2] = {(float) b.
xmin(), (float) b.
ymin()};
1302 const float cmax[2] = {(float) b.
xmax(), (float) b.
ymax()};
1303 tree->
Insert(cmin, cmax, lane);
#define JUNCTION_TAZ_MISSING_HELP
#define WRITE_WARNINGF(...)
#define WRITE_WARNING(msg)
std::vector< const ROEdge * > ConstROEdgeVector
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
constexpr SUMOTime TIME2STEPS(double x)
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
const double DEFAULT_VEH_PROB
const std::string DEFAULT_PEDTYPE_ID
const std::string DEFAULT_VTYPE_ID
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_TAXI
vehicle is a taxi
@ SVC_BUS
vehicle is a bus
@ SVC_PEDESTRIAN
pedestrian
const std::string LINE_ANY
const long long int VEHPARS_TO_TAZ_SET
const long long int VEHPARS_FROM_TAZ_SET
@ GIVEN
The time is given.
@ TRIGGERED
The departure is person triggered.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_STOP
stop for vehicles
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_PARAM
parameter associated to a certain key
@ SUMO_TAG_TRIP
a single trip definition (used by router)
@ SUMO_ATTR_FROM_JUNCTION
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_COLOR
A color information.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
double ymin() const
Returns minimum y-coordinate.
double xmin() const
Returns minimum x-coordinate.
PositionVector getShape(const bool closeShape) const
get position vector (shape) based on this boundary
double ymax() const
Returns maximum y-coordinate.
double xmax() const
Returns maximum x-coordinate.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
bool x2cartesian_const(Position &from) const
Converts the given coordinate into a cartesian using the previous initialisation.
Provides utility functions for matching locations to edges (during route parsing)
void parseGeoEdges(const PositionVector &positions, bool geo, SUMOVehicleClass vClass, std::vector< const ROEdge * > &into, const std::string &rid, bool isFrom, bool &ok, bool forceEdge=false)
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
virtual void inform(std::string msg, bool addType=true)
adds a new error to the list
const std::string & getID() const
Returns the id.
A RT-tree for efficient storing of SUMO's Named objects.
void Insert(const float a_min[2], const float a_max[2], Named *const &a_data)
Insert entry.
A storage for options typed value containers)
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
bool exists(const std::string &name) const
Returns the information whether the named option is known.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
static OptionsCont & getOptions()
Retrieves the options.
An output device that encapsulates an ofstream.
std::string getString() const
Returns the current content as a string.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
A basic edge for routing applications.
const ROEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself
bool isInternal() const
return whether this edge is an internal edge
int getNumSuccessors() const
Returns the number of edges this edge is connected to.
const ROEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
int getNumPredecessors() const
Returns the number of edges connected to this edge.
const std::vector< ROLane * > & getLanes() const
Returns this edge's lanes.
double getLength() const
Returns the length of the edge.
A single lane the router may use.
The router's network representation.
bool knowsVType(const std::string &id) const
returns whether a vehicle type or distribution with the given id was already loaded
SUMOVTypeParameter * getVehicleTypeSecure(const std::string &id)
Retrieves the named vehicle type.
const RandomDistributor< SUMOVTypeParameter * > * getVTypeDistribution(const std::string &id)
Retrieves the named vehicle type distribution.
bool addRouteDef(RORouteDef *def)
bool knowsVehicle(const std::string &id) const
returns whether a vehicle with the given id was already loaded
virtual bool addVehicle(const std::string &id, ROVehicle *veh)
SUMOTime getDeparture(const std::string &vehID) const
returns departure time for the given vehicle id
const SUMOVehicleParameter::Stop * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Retrieves a stopping place from the network.
void addContainer(const SUMOTime depart, const std::string desc)
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
bool addPerson(ROPerson *person)
RORouteDef * getRouteDef(const std::string &name) const
Returns the named route definition.
virtual bool addVehicleType(SUMOVTypeParameter *type)
Adds a read vehicle type definition to the network.
bool addVTypeDistribution(const std::string &id, RandomDistributor< SUMOVTypeParameter * > *vehTypeDistribution)
Adds a vehicle type distribution.
void routeSkipped()
Record routes excluded by the begin time.
const NamedObjectCont< ROEdge * > & getEdgeMap() const
bool addFlow(SUMOVehicleParameter *flow, const bool randomize)
Every person has a plan comprising of multiple planItems.
virtual double getDestinationPos() const =0
A person as used by router.
static void addTrip(std::vector< PlanItem * > &plan, const std::string &id, const ROEdge *const from, const ROEdge *const to, const SVCPermissions modeSet, const std::string &vTypes, const double departPos, const std::string &stopOrigin, const double arrivalPos, const std::string &busStop, double walkFactor, const std::string &group)
static void addStop(std::vector< PlanItem * > &plan, const SUMOVehicleParameter::Stop &stopPar, const ROEdge *const stopEdge)
static void addRide(std::vector< PlanItem * > &plan, const ROEdge *const from, const ROEdge *const to, const std::string &lines, double arrivalPos, const std::string &destStop, const std::string &group)
static void addWalk(std::vector< PlanItem * > &plan, const ConstROEdgeVector &edges, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string &busStop)
std::vector< PlanItem * > & getPlan()
Base class for a vehicle's route definition.
const ROEdge * getOrigin() const
double getOverallProb() const
Returns the sum of the probablities of the contained routes.
std::shared_ptr< const RORoute > getFirstRoute() const
void addAlternativeDef(const RORouteDef *alternative)
Adds an alternative loaded from the file.
void addLoadedAlternative(std::shared_ptr< RORoute > alternative)
Adds a single alternative loaded from the file An alternative may also be generated during DUA.
const ROEdge * getDestination() const
RORouteDef * copy(const std::string &id, const SUMOTime stopOffset) const
Returns a deep copy of the route definition.
const SUMOVTypeParameter * getVTypeParameter(const std::string &refid) override
void openVehicleTypeDistribution(const SUMOSAXAttributes &attrs) override
opens a type distribution for reading
const SUMOVehicleParameter::Stop * retrieveStoppingPlace(const SUMOSAXAttributes &attrs, const std::string &errorSuffix, std::string &id, const SUMOVehicleParameter::Stop *stopParam=nullptr)
retrieve stopping place element
bool myUseTaz
cached options
void addTransport(const SUMOSAXAttributes &attrs) override
Processing of a transport.
void deleteActivePlanAndVehicleParameter()
void openRoute(const SUMOSAXAttributes &attrs) override
opens a route for reading
std::string myCurrentVTypeDistributionID
The id of the currently parsed vehicle type distribution.
void addFlowPerson(const std::string &typeID, SUMOTime depart, const std::string &baseID, int i)
Processing of a person from a personFlow.
void closeContainerFlow() override
Ends the processing of a containerFlow.
RORouteHandler(RONet &net, const std::string &file, const bool tryRepair, const bool emptyDestinationsAllowed, const bool ignoreErrors, const bool checkSchema)
standard constructor
void parseEdges(const std::string &desc, ConstROEdgeVector &into, const std::string &rid, bool &ok)
Parse edges from strings.
RONet & myNet
The current route.
void addRide(const SUMOSAXAttributes &attrs) override
Processing of a ride.
ConstROEdgeVector myActiveRoute
The current route.
void closeRouteDistribution() override
closes (ends) the building of a distribution
void addTranship(const SUMOSAXAttributes &attrs) override
Processing of a tranship.
void closeContainer() override
Ends the processing of a container.
std::vector< ROPerson::PlanItem * > * myActivePlan
The plan of the current person.
const bool myWriteFlows
whether flows shall not be expanded
const bool myTryRepair
Information whether routes shall be repaired.
bool checkLastDepart() override
Checks whether the route file is sorted by departure time if needed.
OutputDevice_String * myActiveContainerPlan
The plan of the current container.
void closeVehicle() override
Ends the processing of a vehicle.
SUMOTime myActiveRoutePeriod
const SUMOTime myBegin
The begin time.
void closeRoute(const bool mayBeDisconnected=false) override
closes (ends) the building of a route.
Parameterised * addStop(const SUMOSAXAttributes &attrs) override
Processing of a stop.
RandomDistributor< SUMOVTypeParameter * > * myCurrentVTypeDistribution
The currently parsed distribution of vehicle types (probability->vehicle type)
void closePersonFlow() override
Ends the processing of a personFlow.
void openRouteDistribution(const SUMOSAXAttributes &attrs) override
opens a route distribution for reading
int myActiveContainerPlanSize
The number of stages in myActiveContainerPlan.
const bool myKeepVTypeDist
whether to keep the vtype distribution in output
void openTrip(const SUMOSAXAttributes &attrs) override
opens a trip for reading
const bool myUnsortedInput
whether input is read all at once (no sorting check is necessary)
void parseWalkPositions(const SUMOSAXAttributes &attrs, const std::string &personID, const ROEdge *fromEdge, const ROEdge *&toEdge, double &departPos, double &arrivalPos, std::string &busStopID, const ROPerson::PlanItem *const lastStage, bool &ok)
@ brief parse depart- and arrival positions of a walk
MsgHandler *const myErrorOutput
Depending on the "ignore-errors" option different outputs are used.
int myActiveRouteRepeat
number of repetitions of the active route
void closeFlow() override
Ends the processing of a flow.
ROEdge * retrieveEdge(const std::string &id) override
void addPersonTrip(const SUMOSAXAttributes &attrs) override
add a routing request for a walking or intermodal person
void closePerson() override
Ends the processing of a person.
~RORouteHandler() override
standard destructor
RORouteDef * myCurrentAlternatives
The currently parsed route alternatives.
void myStartElement(int element, const SUMOSAXAttributes &attrs) override
Called on the opening of a tag;.
void addWalk(const SUMOSAXAttributes &attrs) override
add a fully specified walk
void initLaneTree(NamedRTree *tree) override
void openRouteFlow(const SUMOSAXAttributes &attrs) override
opens a route flow for reading
void closeTrip() override
Ends the processing of a trip.
void openFlow(const SUMOSAXAttributes &attrs) override
opens a flow for reading
void closeVType() override
Ends the processing of a vehicle type.
void closeVehicleTypeDistribution() override
closes (ends) the building of a distribution
void parseFromViaTo(SumoXMLTag tag, const SUMOSAXAttributes &attrs, bool &ok)
Called for parsing from and to and the corresponding taz attributes.
A vehicle as used by router.
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)
Represents a generic random distribution.
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
bool add(T val, double prob, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
const std::vector< T > & getVals() const
Returns the members of the distribution.
void clear()
Clears the distribution.
const std::vector< double > & getProbs() const
Returns the probabilities assigned to the members of the distribution.
Parser for routes during their loading.
bool parseStop(SUMOVehicleParameter::Stop &stop, const SUMOSAXAttributes &attrs, std::string errorSuffix, MsgHandler *const errorOutput)
parses attributes common to all stops
std::set< std::string > mySkippedVehicles
IDs of skipped vehicles to suppress errors for the triggered transportables within.
void registerLastDepart()
save last depart (only to be used if vehicle is not discarded)
double myCurrentCosts
The currently parsed route costs.
std::string myActiveRouteID
The id of the current route.
std::vector< Parameterised * > myParamStack
The stack of currently parsed parameterised objects.
SUMOVehicleParameter * myVehicleParameter
Parameter of the current vehicle, trip, person, container or flow.
const bool myHardFail
flag to enable or disable hard fails
StopParVector myActiveRouteStops
List of the stops on the parsed route.
std::string myCurrentVTypeRef
if the currently parsed vType is only a reference to an existing type, store the refId
SUMOVTypeParameter * myCurrentVType
The currently parsed vehicle type.
static StopPos checkStopPos(double &startPos, double &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check start and end position of a stop
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
double myActiveRouteProbability
The probability of the current route.
double myCurrentVTypeProbability
if the currently parsed vType is only a reference, store the probability here
int myInsertStopEdgesAt
where stop edges can be inserted into the current route (-1 means no insertion)
std::string myActiveRouteRefID
The id of the route the current route references to.
const RGBColor * myActiveRouteColor
The currently parsed route's color.
virtual bool checkLastDepart()
Checks whether the route file is sorted by departure time if needed.
Encapsulated SAX-Attributes.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue=T(), bool report=true) const
Tries to read given attribute assuming it is an int.
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
Structure representing possible vehicle parameter.
double defaultProbability
The probability when being added to a distribution without an explicit probability.
void cacheParamRestrictions(const std::vector< std::string > &restrictionKeys)
SUMOVehicleClass vehicleClass
The vehicle's class.
std::string id
The vehicle type's id.
Definition of vehicle stop (position and duration)
std::string edge
The edge to stop at.
std::string lane
The lane to stop at.
double startPos
The stopping position start.
int parametersSet
Information for the output which parameter were set.
double endPos
The stopping position end.
Structure representing possible vehicle parameter.
double repetitionProbability
The probability for emitting a vehicle per second.
void incrementFlow(double scale, SumoRNG *rng=nullptr)
increment flow
std::string vtypeid
The vehicle's type id.
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
long long int repetitionsDone
The number of times the vehicle was already inserted.
std::vector< std::string > via
List of the via-edges the vehicle must visit.
long long int repetitionNumber
SUMOTime repetitionTotalOffset
The offset between depart and the time for the next vehicle insertions.
long long int parametersSet
Information for the router which parameter were set, TraCI may modify this (when changing color)
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
bool wasSet(long long int what) const
Returns whether the given parameter was set.
double departPos
(optional) The position the vehicle shall depart from
std::string routeid
The vehicle's route id.
std::string id
The vehicle's id.
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
std::string toTaz
The vehicle's destination zone (district)
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
std::string fromTaz
The vehicle's origin zone (district)
static bool parseStopTag(const SUMOSAXAttributes &attrs, const SUMOVehicleParameter::Stop *stopParam, SumoXMLTag &tag, std::string &id)
parse named stopping place attrs (or use stopParam attrs) and return it's tag and id
static double parseWalkPos(SumoXMLAttr attr, const bool hardFail, const std::string &id, double maxPos, const std::string &val, SumoRNG *rng=0)
parse departPos or arrivalPos for a walk
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID
std::string front()
returns the first substring without moving the iterator
int size() const
returns the number of existing substrings
std::string get(int pos) const
returns the item at the given position
bool hasNext()
returns the information whether further substrings exist
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
static double toDoubleSecure(const std::string &sData, const double def)
converts a string into the integer value described by it