328 embeddedRoute->getParameters())) {
379 embeddedRoute->getParameters())) {
499 if (vehicleTypeParameter) {
505 delete vehicleTypeParameter;
515 bool parsedOk =
true;
534 bool parsedOk =
true;
536 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
539 std::vector<std::string> vTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk);
540 std::vector<double> probabilities = attrs.
getOpt<std::vector<double> >(
SUMO_ATTR_PROBS,
id.c_str(), parsedOk);
551 for (
int i = 0; i < (int)vTypes.size(); i++) {
571 bool parsedOk =
true;
573 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
574 const std::vector<std::string> edges = attrs.
get<std::vector<std::string> >(
SUMO_ATTR_EDGES,
id.c_str(), parsedOk);
608 bool parsedOk =
true;
628 writeError(
TL(
"an embedded route cannot have their own ID"));
631 bool parsedOk =
true;
635 const std::vector<std::string> edges = attrs.
get<std::vector<std::string> >(
SUMO_ATTR_EDGES, vehicleID.c_str(), parsedOk);
667 bool parsedOk =
true;
669 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
671 std::vector<std::string> routes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_ROUTES,
id.c_str(), parsedOk);
672 std::vector<double> probabilities = attrs.
getOpt<std::vector<double> >(
SUMO_ATTR_PROBS,
id.c_str(), parsedOk);
682 for (
int i = 0; i < (int)routes.size(); i++) {
702 bool parsedOk =
true;
708 writeError(
TL(
"Attributes 'from', 'fromJunction' and 'fromTaz' cannot be defined together"));
711 writeError(
TL(
"Attributes 'to', 'toJunction' and 'toTaz' cannot be defined together"));
730 const std::string fromJunction = attrs.
get<std::string>(
SUMO_ATTR_FROM_TAZ, tripParameter->
id.c_str(), parsedOk);
731 const std::string toJunction = attrs.
get<std::string>(
SUMO_ATTR_TO_TAZ, tripParameter->
id.c_str(), parsedOk);
745 const std::string from = attrs.
getOpt<std::string>(
SUMO_ATTR_FROM, tripParameter->
id.c_str(), parsedOk,
"");
746 const std::string to = attrs.
getOpt<std::string>(
SUMO_ATTR_TO, tripParameter->
id.c_str(), parsedOk,
"");
748 const std::vector<std::string> via = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VIA, tripParameter->
id.c_str(), parsedOk);
763 delete tripParameter;
774 if (vehicleParameter) {
780 delete vehicleParameter;
790 bool parsedOk =
true;
798 writeError(
TL(
"Attributes 'from', 'fromJunction' and 'fromTaz' cannot be defined together"));
801 writeError(
TL(
"Attributes 'to', 'toJunction' and 'toTaz' cannot be defined together"));
805 const std::string from = attrs.
get<std::string>(
SUMO_ATTR_FROM, flowParameter->
id.c_str(), parsedOk);
806 const std::string to = attrs.
get<std::string>(
SUMO_ATTR_TO, flowParameter->
id.c_str(), parsedOk);
808 const std::vector<std::string> via = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VIA, flowParameter->
id.c_str(), parsedOk);
834 const std::string fromJunction = attrs.
get<std::string>(
SUMO_ATTR_FROM_TAZ, flowParameter->
id.c_str(), parsedOk);
835 const std::string toJunction = attrs.
get<std::string>(
SUMO_ATTR_TO_TAZ, flowParameter->
id.c_str(), parsedOk);
847 const std::string route = attrs.
get<std::string>(
SUMO_ATTR_ROUTE, flowParameter->
id.c_str(), parsedOk);
861 delete flowParameter;
871 bool parsedOk =
true;
877 std::vector<SumoXMLTag> stopParents;
901 if (personParameter) {
907 delete personParameter;
918 if (personFlowParameter) {
924 delete personFlowParameter;
934 bool parsedOk =
true;
938 const std::vector<std::string> via = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VIA,
"", parsedOk);
939 const std::vector<std::string> vTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
"", parsedOk);
940 const std::vector<std::string> lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
"", parsedOk);
941 std::vector<std::string> modes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_MODES,
"", parsedOk);
948 std::string dummyError;
976 writeError(
TL(
"Speed and duration attributes cannot be defined together in walks"));
980 bool parsedOk =
true;
1009 bool parsedOk =
true;
1013 const std::vector<std::string> lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
"", parsedOk);
1036 if (containerParameter) {
1042 delete containerParameter;
1053 if (containerFlowParameter) {
1059 delete containerFlowParameter;
1069 bool parsedOk =
true;
1073 const std::vector<std::string> lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
"", parsedOk);
1095 writeError(
TL(
"Speed and duration attributes cannot be defined together in tranships"));
1099 bool parsedOk =
true;
1128 bool parsedOk =
true;
1148 return writeError(
TL(
"Invalid parsing embedded VType"));
1232 if (!stop.
edge.empty() && !stop.
lane.empty()) {
1233 return writeError(
TL(
"A stop must be defined either with an edge or with an lane, not both"));
1247 if (numStoppingPlaces > 1) {
1248 return writeError(
TL(
"A stop must be defined only in a StoppingPlace"));
1249 }
else if ((numStoppingPlaces == 0) && stop.
edge.empty() && stop.
lane.empty()) {
1250 return writeError(
TL(
"A stop must be defined in an edge, a lane, or in a StoppingPlace"));
1253 std::string errorSuffix;
1255 errorSuffix =
" at '" + stop.
busstop +
"'" + errorSuffix;
1261 errorSuffix =
" at '" + stop.
containerstop +
"'" + errorSuffix;
1263 errorSuffix =
" at '" + stop.
parkingarea +
"'" + errorSuffix;
1264 }
else if (stop.
edge !=
"") {
1265 errorSuffix =
" at '" + stop.
edge +
"'" + errorSuffix;
1267 errorSuffix =
" on lane '" + stop.
lane +
"'" + errorSuffix;
1271 if (stop.
speed < 0) {
1272 return writeError(
"Speed cannot be negative for stop" + errorSuffix);
1288 if (!expectTrigger && (!ok || (stop.
duration < 0 && stop.
until < 0 && stop.
speed == 0))) {
1289 return writeError(
"Invalid duration or end time is given for a stop" + errorSuffix);
1295 WRITE_WARNING(
"Stop at parkingarea overrides attribute 'parking' for stop" + errorSuffix);
1299 return writeError(
"Invalid bool for 'triggered', 'containerTriggered' or 'parking' for stop" + errorSuffix);
1302 const std::vector<std::string>& expected = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_EXPECTED,
nullptr, ok);
1312 stop.
permitted.insert(permitted.begin(), permitted.end());
1315 stop.
awaitedContainers.insert(expectedContainers.begin(), expectedContainers.end());
1331 }
else if (idx ==
"fit") {
1335 if (!ok || stop.
index < 0) {
1336 return writeError(
"Invalid 'index' for stop" + errorSuffix);
1371 for (
size_t i = probabilities.size(); i < vTypes.size(); i++) {
1375 while (vTypes.size() < probabilities.size()) {
1376 probabilities.pop_back();
#define WRITE_WARNINGF(...)
#define WRITE_WARNING(msg)
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
const int STOP_ARRIVAL_SET
const int STOP_DURATION_SET
const int STOP_POSLAT_SET
const int STOP_EXPECTED_SET
const int STOP_JUMP_UNTIL_SET
const int STOP_PARKING_SET
const int STOP_TRIP_ID_SET
const int STOP_PERMITTED_SET
const int STOP_CONTAINER_TRIGGER_SET
const int STOP_EXTENSION_SET
const int STOP_TRIGGER_SET
const int STOP_ONDEMAND_SET
const int STOP_STARTED_SET
const int STOP_EXPECTED_CONTAINERS_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_STOP
stop for vehicles
@ SUMO_TAG_VEHICLE
description of a vehicle
@ SUMO_TAG_ROUTE_DISTRIBUTION
distribution of a route
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_ROUTE
description of a route
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
@ SUMO_TAG_PARAM
parameter associated to a certain key
@ SUMO_TAG_ERROR
tag used for indicate that there is an error (usually loading elements in handlers)
@ SUMO_TAG_TRIP
a single trip definition (used by router)
ParkingType
Numbers representing special SUMO-XML-attribute values Information on whether a car is parking on the...
@ SUMO_ATTR_CONTAINER_TRIGGERED
@ SUMO_ATTR_FROM_JUNCTION
@ SUMO_ATTR_CONTAINER_STOP
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_CHARGING_STATION
@ SUMO_ATTR_OVERHEAD_WIRE_SEGMENT
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_DETERMINISTIC
@ SUMO_ATTR_EXPECTED_CONTAINERS
@ SUMO_ATTR_COLOR
A color information.
const double INVALID_DOUBLE
invalid double
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
The XML-Handler for network loading.
bool checkStopParents(CommonXMLStructure::SumoBaseObject *obj)
check stop parents
CommonXMLStructure::SumoBaseObject * getEmbeddedRoute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject) const
get embedded route from children
void checkParsedParent(const SumoXMLTag currentTag, const std::vector< SumoXMLTag > &parentTags, bool &ok)
check parsed parents
bool checkContainerPlanParents(CommonXMLStructure::SumoBaseObject *obj)
check container plan parents
bool writeError(const std::string &error)
write error and enable error creating element
bool myAbortLoading
abort loading
void parseParameters(const SUMOSAXAttributes &attrs)
parse generic parameters
CommonXMLStructure myCommonXMLStructure
common XML Structure
bool checkVehicleParents(CommonXMLStructure::SumoBaseObject *obj)
check vehicle parents
const std::string myFilename
filename
bool checkNegative(const SumoXMLTag tag, const std::string &id, const SumoXMLAttr attribute, const int value, const bool canBeZero)
check if the given int value is NOT negative
bool checkPersonPlanParents(CommonXMLStructure::SumoBaseObject *obj)
check person plan parents
plan parameters (used for group all from-to parameters related with plans)
void addIntAttribute(const SumoXMLAttr attr, const int value)
add int attribute into current SumoBaseObject node
void setVehicleTypeParameter(const SUMOVTypeParameter *vehicleTypeParameter)
set vehicle type parameters
const SUMOVehicleParameter::Stop & getStopParameter() const
get stop parameters
const RGBColor & getColorAttribute(const SumoXMLAttr attr) const
get color attribute
SUMOTime getTimeAttribute(const SumoXMLAttr attr) const
get time attribute
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
const CommonXMLStructure::PlanParameters & getPlanParameters() const
get plan parameteres
const std::map< std::string, std::string > & getParameters() const
get parameters
SUMOVehicleClass getVClass() const
vehicle class
void setPlanParameters(const CommonXMLStructure::PlanParameters &planParameters)
set plan parmeter
const SUMOVTypeParameter & getVehicleTypeParameter() const
get current vType
SumoXMLTag getTag() const
get XML myTag
void markAsCreated()
mark as successfully created
void addTimeAttribute(const SumoXMLAttr attr, const SUMOTime value)
add time attribute into current SumoBaseObject node
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
int getIntAttribute(const SumoXMLAttr attr) const
get int attribute
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
void setVClass(SUMOVehicleClass vClass)
set vehicle class
void setVehicleParameter(const SUMOVehicleParameter *vehicleParameter)
set vehicle parameters
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
void setStopParameter(const SUMOVehicleParameter::Stop &stopParameter)
add stop parameters
double getDoubleAttribute(const SumoXMLAttr attr) const
get double attribute
const SUMOVehicleParameter & getVehicleParameter() const
get vehicle parameters
const std::vector< std::string > & getStringListAttribute(const SumoXMLAttr attr) const
get string list attribute
void addColorAttribute(const SumoXMLAttr attr, const RGBColor &value)
add color attribute into current SumoBaseObject node
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
const std::vector< SumoBaseObject * > & getSumoBaseObjectChildren() const
get SumoBaseObject children
void abortSUMOBaseOBject()
abort SUMOBaseOBject
CommonXMLStructure::SumoBaseObject * getSumoBaseObjectRoot() const
get SumoBaseObject root
CommonXMLStructure::SumoBaseObject * getCurrentSumoBaseObject() const
get current editedSumoBaseObject
void openSUMOBaseOBject()
open SUMOBaseOBject
void closeSUMOBaseOBject()
close SUMOBaseOBject
static const std::vector< SumoXMLTag > vehicles
vehicles namespace
static const std::vector< SumoXMLTag > routes
route namespace
static const std::vector< SumoXMLTag > persons
persons namespace
static const std::vector< SumoXMLTag > containers
containers namespace
A storage for options typed value containers)
static const RGBColor INVISIBLE
void parseWalk(const SUMOSAXAttributes &attrs)
parse walk
virtual bool buildTranship(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPosition, const double departPosition, const double speed, const SUMOTime duration)=0
build tranship
void parseContainerFlow(const SUMOSAXAttributes &attrs)
parse container flow
void parseFlow(const SUMOSAXAttributes &attrs)
parse flow (including flows, flows over routes and flows with embedded routes)
virtual bool buildRouteRef(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &routeID, const double probability)=0
build route ref
bool parseNestedCFM(const SumoXMLTag tag, const SUMOSAXAttributes &attrs, CommonXMLStructure::SumoBaseObject *vTypeObject)
parse nested CarFollowingModel
bool isOverFromToJunctions(const CommonXMLStructure::SumoBaseObject *sumoBaseObject) const
check if element is defined over from-to junctions
bool beginParseAttributes(SumoXMLTag tag, const SUMOSAXAttributes &attrs)
begin parse attributes
virtual bool buildFlow(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromEdgeID, const std::string &toEdgeID)=0
build flow (from-to edges)
void parsePerson(const SUMOSAXAttributes &attrs)
parse person
void parseTransport(const SUMOSAXAttributes &attrs)
parse transport
void parseRouteRef(const SUMOSAXAttributes &attrs)
parse route reference
void adjustTypesAndProbabilities(std::vector< std::string > &vTypes, std::vector< double > &probabilities)
adjust types and probabilities
void endParseAttributes()
end parse attributes
virtual bool buildPerson(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &personParameters)=0
build person
virtual bool buildFlowEmbeddedRoute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::vector< std::string > &edgeIDs, const RGBColor &color, const int repeat, const SUMOTime cycleTime, const Parameterised::Map &routeParameters)=0
build a flow with an embedded route
virtual bool buildPersonFlow(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &personFlowParameters)=0
build person flow
virtual bool buildContainer(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &containerParameters)=0
build container
virtual bool buildWalk(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const double speed, const SUMOTime duration)=0
build walk
void parseVTypeDistribution(const SUMOSAXAttributes &attrs)
parse vType distribution
virtual bool buildRide(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const std::vector< std::string > &lines, const std::string &group)=0
build ride
void parseVTypeRef(const SUMOSAXAttributes &attrs)
parse vType reference
virtual bool buildFlowOverRoute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters)=0
build a flow over an existent route
void parseStop(const SUMOSAXAttributes &attrs)
parse stop
void parseContainer(const SUMOSAXAttributes &attrs)
parse container
void parsePersonTrip(const SUMOSAXAttributes &attrs)
parse person trip
void parseRoute(const SUMOSAXAttributes &attrs)
parse route
bool isOverFromToTAZs(const CommonXMLStructure::SumoBaseObject *sumoBaseObject) const
check if element is defined over from-to junctions
void parseTrip(const SUMOSAXAttributes &attrs)
parse trip
SUMOTime myFlowEndDefault
The default value for flow ends.
virtual ~RouteHandler()
Destructor.
bool isOverFromToEdges(const CommonXMLStructure::SumoBaseObject *sumoBaseObject) const
check if element is defined over from-to edges
RouteHandler()=delete
invalidate default onstructor
virtual bool buildTripTAZs(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromTazID, const std::string &toTazID)=0
build trip (from-to TAZs)
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
void parsePersonFlow(const SUMOSAXAttributes &attrs)
parse person flow
void parseInterval(const SUMOSAXAttributes &attrs)
parse interval
virtual bool buildPersonTrip(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const std::vector< std::string > &types, const std::vector< std::string > &modes, const std::vector< std::string > &lines, const double walkFactor, const std::string &group)=0
build person trip
void parseVType(const SUMOSAXAttributes &attrs)
void parseRide(const SUMOSAXAttributes &attrs)
parse ride
virtual bool buildFlowJunctions(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromJunctionID, const std::string &toJunctionID)=0
build flow (from-to junctions)
virtual bool buildVType(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVTypeParameter &vTypeParameter)=0
build vType
virtual bool buildFlowTAZs(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromTAZID, const std::string &toTAZID)=0
build flow (from-to TAZs)
SUMOTime myFlowBeginDefault
The default value for flow begins.
virtual bool buildVehicleEmbeddedRoute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::vector< std::string > &edgeIDs, const RGBColor &color, const int repeat, const SUMOTime cycleTime, const Parameterised::Map &routeParameters)=0
build a vehicle with an embedded route
virtual bool buildRoute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, SUMOVehicleClass vClass, const std::vector< std::string > &edgeIDs, const RGBColor &color, const int repeat, const SUMOTime cycleTime, const double probability, const Parameterised::Map &routeParameters)=0
build route
void parseVehicle(const SUMOSAXAttributes &attrs)
parse vehicle (including vehicles over routes and vehicles with embedded routes)
virtual bool buildStop(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const SUMOVehicleParameter::Stop &stopParameters)=0
build stop
virtual bool buildTrip(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromEdgeID, const std::string &toEdgeID)=0
build trip (from-to edges)
void parseRouteEmbedded(const SUMOSAXAttributes &attrs)
parse embedded route
virtual bool buildVTypeRef(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &vTypeID, const double probability)=0
build vType ref
virtual bool buildContainerFlow(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &containerFlowParameters)=0
build container flow
virtual bool buildVehicleOverRoute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters)=0
build a vehicle over an existent route
bool parseStopParameters(SUMOVehicleParameter::Stop &stop, const SUMOSAXAttributes &attrs)
parse stop parameters
virtual bool buildTripJunctions(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromJunctionID, const std::string &toJunctionID)=0
build trip (from-to junctions)
virtual bool buildRouteDistribution(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id)=0
build route distribution
const bool myHardFail
enable or disable hardFail (stop parsing if parameter aren't correct)
virtual bool buildTransport(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const std::vector< std::string > &lines, const std::string &group)=0
build transport
void parseRouteDistribution(const SUMOSAXAttributes &attrs)
parse route distribution
virtual bool buildVTypeDistribution(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const int deterministic)=0
build vType distribution
void parseTranship(const SUMOSAXAttributes &attrs)
parse tranship
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.
SUMOTime getSUMOTimeReporting(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
Structure representing possible vehicle parameter.
Definition of vehicle stop (position and duration)
SUMOTime started
the time at which this stop was reached
std::string edge
The edge to stop at.
ParkingType parking
whether the vehicle is removed from the net while stopping
std::string lane
The lane to stop at.
SUMOTime extension
The maximum time extension for boarding / loading.
bool friendlyPos
enable or disable friendly position (used by netedit)
double speed
the speed at which this stop counts as reached (waypoint mode)
std::string parkingarea
(Optional) parking area if one is assigned to the stop
std::string split
the id of the vehicle (train portion) that splits of upon reaching this stop
double startPos
The stopping position start.
std::string line
the new line id of the trip within a cyclical public transport route
double posLat
the lateral offset when stopping
bool onDemand
whether the stop may be skipped
std::string chargingStation
(Optional) charging station if one is assigned to the stop
std::string overheadWireSegment
(Optional) overhead line segment if one is assigned to the stop
std::set< std::string > permitted
IDs of persons or containers that may board/load at this stop.
SUMOTime jumpUntil
earlierst jump end if there shall be a jump from this stop to the next route edge
int parametersSet
Information for the output which parameter were set.
int index
at which position in the stops list
SUMOTime jump
transfer time if there shall be a jump from this stop to the next route edge
std::string join
the id of the vehicle (train portion) to which this vehicle shall be joined
SUMOTime until
The time at which the vehicle may continue its journey.
std::string actType
act Type (only used by Persons) (used by netedit)
bool triggered
whether an arriving person lets the vehicle continue
SUMOTime ended
the time at which this stop was ended
double endPos
The stopping position end.
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
std::string busstop
(Optional) bus stop if one is assigned to the stop
std::string tripId
id of the trip within a cyclical public transport route
std::string containerstop
(Optional) container stop if one is assigned to the stop
bool containerTriggered
whether an arriving container lets the vehicle continue
SUMOTime arrival
The (expected) time at which the vehicle reaches the stop.
SUMOTime duration
The stopping duration.
Structure representing possible vehicle parameter.
std::string id
The vehicle's id.
static bool parsePersonModes(const std::string &modes, const std::string &element, const std::string &id, SVCPermissions &modeSet, std::string &error)
Validates a given person modes value.
static void parseStopTriggers(const std::vector< std::string > &triggers, bool expectTrigger, Stop &stop)
parses stop trigger values
static SUMOVTypeParameter * beginVTypeParsing(const SUMOSAXAttributes &attrs, const bool hardFail, const std::string &file)
Starts to parse a vehicle type.
static bool parseCFMParams(SUMOVTypeParameter *into, const SumoXMLTag element, const SUMOSAXAttributes &attrs, const bool nestedCFM)
Parses Car Following Mode params.
static SUMOVehicleParameter * parseVehicleAttributes(int element, const SUMOSAXAttributes &attrs, const bool hardFail, const bool optionalID=false, const bool skipDepart=false, const bool allowInternalRoutes=false)
Parses a vehicle's attributes.
static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
static SUMOVehicleParameter * parseFlowAttributes(SumoXMLTag tag, const SUMOSAXAttributes &attrs, const bool hardFail, const bool needID, const SUMOTime beginDefault, const SUMOTime endDefault, const bool allowInternalRoutes=false)
Parses a flow's attributes.