57 const SUMOTime beginDefault,
const SUMOTime endDefault,
const bool allowInternalRoutes) {
61 if (!needID || !
id.empty()) {
71 const bool hasXPH = hasVPH || hasPPH || hasCPH || hasPH;
86 if (hasXPH && !(hasVPH ^ hasPPH ^ hasCPH ^ hasPH)) {
92 "' has to be given in the definition of " +
toString(tag) +
" '" +
id +
"'.");
94 if (hasPeriod && hasXPH) {
97 "' and '" + attrs.
getName(PERHOUR) +
98 "' has to be given in the definition of "
101 if (hasPeriod && hasProb) {
105 "' has to be given in the definition of "
106 +
toString(tag) +
" '" +
id +
"'.");
108 if (hasProb && hasXPH) {
111 "' and '" + attrs.
getName(PERHOUR) +
112 "' has to be given in the definition of "
113 +
toString(tag) +
" '" +
id +
"'.");
115 if (hasPeriod || hasXPH || hasProb) {
116 if (hasEnd && hasNumber) {
127 +
toString(tag) +
" '" +
id +
"'.");
140 +
toString(tag) +
" '" +
id +
"'.");
146 flowParameter->
tag = tag;
148 flowParameter->
id = id;
167 bool poissonFlow =
false;
171 const std::string distName = description.substr(0, description.find(
'('));
172 if (distName ==
"exp") {
177 rate =
StringUtils::toDouble(description.substr(distName.size() + 1, description.size() - distName.size() - 2));
187 return handleVehicleError(hardFail, flowParameter,
"Invalid rate parameter for exponentially distributed period in the definition of " +
toString(tag) +
" '" +
id +
"'.");
203 const double vph = attrs.
get<
double>(PERHOUR,
id.c_str(), ok);
206 }
else if (vph <= 0) {
207 return handleVehicleError(hardFail, flowParameter,
"Invalid repetition rate in the definition of " +
toString(tag) +
" '" +
id +
"'.");
222 return handleVehicleError(hardFail, flowParameter,
"Invalid repetition probability in the definition of " +
toString(tag) +
" '" +
id +
"'.");
228 flowParameter->
depart = beginDefault;
238 std::string errorMsg;
244 if (flowParameter->
depart < 0) {
245 return handleVehicleError(hardFail, flowParameter,
"Negative begin time in the definition of " +
toString(tag) +
" '" +
id +
"'.");
263 return handleVehicleError(hardFail, flowParameter,
toString(tag) +
" '" +
id +
"' with triggered begin must define 'number'.");
267 }
else if ((endDefault ==
SUMOTime_MAX || endDefault < 0) && (!hasNumber || (!hasProb && !hasPeriod && !hasXPH))) {
273 flow[0] = (char)::toupper((
char)flow[0]);
274 return handleVehicleError(hardFail, flowParameter, flow +
" '" +
id +
"' ends before its begin time.");
286 flow[0] = (char)::toupper((
char)flow[0]);
287 WRITE_WARNING(flow +
" '" +
id +
"' has no instances; will skip it.");
291 return handleVehicleError(hardFail, flowParameter,
"Negative repetition number in the definition of " +
toString(tag) +
" '" +
id +
"'.");
305 flowParameter->
repetitionNumber = std::numeric_limits<long long int>::max();
310 flowParameter->
repetitionNumber = std::numeric_limits<long long int>::max();
312 return handleVehicleError(hardFail, flowParameter,
"Invalid repetition rate in the definition of " +
toString(tag) +
" '" +
id +
"'.");
316 flowParameter->
repetitionNumber = std::numeric_limits<long long int>::max();
325 return flowParameter;
348 if (optionalID || !
id.empty()) {
351 vehicleParameter->
id = id;
371 const std::string helper = attrs.
get<std::string>(
SUMO_ATTR_DEPART, vehicleParameter->
id.c_str(), ok);
376 std::string departErrorMsg;
384 return vehicleParameter;
400 }
else if (
id.empty()) {
416 const std::string element =
toString(tag);
423 WRITE_WARNINGF(
TL(
"Internal routes receive an ID starting with '!' and must not be referenced in other vehicle or flow definitions. Please remove all references to route '%' in case it is internal."), routeID);
650 }
else if (personNumber >= 0) {
663 }
else if (containerNumber >= 0) {
676 }
else if (speedFactor > 0) {
717 std::string errorMsg;
738 }
else if (calibratorSpeed >= 0 || calibratorSpeed == -1) {
764 if (base ==
nullptr) {
780 }
else if (length <= 0) {
792 }
else if (minGap < 0) {
804 }
else if (maxSpeed <= 0) {
816 }
else if (desiredMaxSpeed <= 0) {
847 }
else if (speedDev < 0) {
857 return handleVehicleTypeError(hardFail, vType,
"Invalid speed distribution when parsing vType '" + vType->
id +
"' (" + error +
")");
886 }
else if (mass < 0) {
898 }
else if (impatienceStr ==
"off") {
899 vType->
impatience = -std::numeric_limits<double>::max();
915 }
else if (width <= 0) {
918 vType->
width = width;
924 WRITE_WARNINGF(
TL(
"Pedestrian vType '%' width % is larger than pedestrian.striping.stripe-width and this may cause collisions with vehicles."),
id, vType->
width);
933 }
else if (height < 0) {
976 vType->
color = color;
984 const double defaultProbability = attrs.
get<
double>(
SUMO_ATTR_PROB, vType->
id.c_str(), ok);
987 }
else if (defaultProbability < 0) {
999 }
else if (lcmS ==
"JE2013") {
1000 WRITE_WARNING(
TL(
"Lane change model 'JE2013' is deprecated. Using default model instead."));
1007 return handleVehicleTypeError(hardFail, vType,
"Unknown lane change model '" + lcmS +
"' when parsing vType '" + vType->
id +
"'");
1019 return handleVehicleTypeError(hardFail, vType,
"Unknown car following model '" + cfmValue +
"' when parsing vType '" + vType->
id +
"'");
1027 }
else if (personCapacity < 0) {
1039 }
else if (containerCapacity < 0) {
1051 }
else if (boardingDuration < 0) {
1063 }
else if (loadingDuration < 0) {
1075 }
else if (scale < 0) {
1078 vType->
scale = scale;
1117 }
else if (bf < 0) {
1129 }
else if (maxSpeedLat <= 0) {
1141 }
else if (minGapLat < 0) {
1161 return handleVehicleTypeError(hardFail, vType,
"Unknown lateral alignment '" + alignS +
"' when parsing vType '" + vType->
id +
"';\n must be one of (\"right\", \"center\", \"arbitrary\", \"nice\", \"compact\", \"left\" or a float)");
1200 }
else if (base !=
nullptr) {
1211 std::map<int, std::pair<SUMOTime, SUMOTime>> angleTimesMap;
1212 int tripletCount = 0;
1215 if (pos.
size() != 3) {
1216 WRITE_ERRORF(
TL(
"maneuverAngleTimes format for vType '%' % contains an invalid triplet."), vtype->
id, atm);
1223 angleTimesMap[angle] = std::make_pair(t1, t2);
1225 WRITE_ERRORF(
TL(
"Triplet '%' for vType '%' maneuverAngleTimes cannot be parsed as 'int double double'"), st.
get(tripletCount), vtype->
id);
1231 if (angleTimesMap.size() > 0) {
1233 for (
const auto& angleTime : angleTimesMap) {
1236 angleTimesMap.clear();
1247 CFAttrMap::const_iterator cf_it = allowedCFM.find(element);
1249 if (cf_it == allowedCFM.end()) {
1253 WRITE_ERRORF(
TL(
"Unknown car-following model when parsing vType '%'"), into->
id);
1263 for (
const auto& it : cf_it->second) {
1267 std::string parsedCFMAttribute = attrs.
get<std::string>(it, into->
id.c_str(), ok);
1274 WRITE_ERROR(
"Invalid train type '" + parsedCFMAttribute +
"' used in Car-Following-Attribute " +
toString(it));
1283 double CFMDoubleAttribute = -1;
1291 if (CFMDoubleAttribute <= 0) {
1301 WRITE_ERRORF(
TL(
"Invalid Car-Following-Model Attribute %. Cannot be parsed as a vector of <speed accel> pairs"),
toString(it));
1306 double CFMDoubleAttribute = -1;
1321 if (CFMDoubleAttribute <= 0) {
1332 if ((CFMDoubleAttribute < 0) || (CFMDoubleAttribute > 1)) {
1333 WRITE_ERRORF(
TL(
"Invalid Car-Following-Model Attribute %. Only values between [0-1] are allowed"),
toString(it));
1354 std::set<SumoXMLAttr> genericParams;
1366 std::set<SumoXMLAttr> kraussParams(genericParams);
1372 std::set<SumoXMLAttr> allParams(kraussParams);
1374 std::set<SumoXMLAttr> kraussXParams(kraussParams);
1381 allParams.insert(kraussXParams.begin(), kraussXParams.end());
1383 std::set<SumoXMLAttr> smartSKParams(genericParams);
1391 allParams.insert(smartSKParams.begin(), smartSKParams.end());
1393 std::set<SumoXMLAttr> daniel1Params(genericParams);
1401 allParams.insert(daniel1Params.begin(), daniel1Params.end());
1403 std::set<SumoXMLAttr> pwagParams(genericParams);
1408 allParams.insert(pwagParams.begin(), pwagParams.end());
1410 std::set<SumoXMLAttr> idmParams(genericParams);
1414 allParams.insert(idmParams.begin(), idmParams.end());
1416 std::set<SumoXMLAttr> eidmParams(genericParams);
1435 allParams.insert(eidmParams.begin(), eidmParams.end());
1437 std::set<SumoXMLAttr> idmmParams(genericParams);
1442 allParams.insert(idmmParams.begin(), idmmParams.end());
1444 std::set<SumoXMLAttr> bkernerParams(genericParams);
1448 allParams.insert(bkernerParams.begin(), bkernerParams.end());
1450 std::set<SumoXMLAttr> wiedemannParams(genericParams);
1454 allParams.insert(wiedemannParams.begin(), wiedemannParams.end());
1456 std::set<SumoXMLAttr> w99Params(genericParams);
1467 allParams.insert(w99Params.begin(), w99Params.end());
1469 std::set<SumoXMLAttr> railParams(genericParams);
1487 allParams.insert(railParams.begin(), railParams.end());
1489 std::set<SumoXMLAttr> ACCParams(genericParams);
1500 allParams.insert(ACCParams.begin(), ACCParams.end());
1502 std::set<SumoXMLAttr> CACCParams(genericParams);
1521 allParams.insert(CACCParams.begin(), CACCParams.end());
1523 std::set<SumoXMLAttr> ccParams(genericParams);
1543 allParams.insert(ccParams.begin(), ccParams.end());
1545 std::set<SumoXMLAttr> naschParams(genericParams);
1548 allParams.insert(naschParams.begin(), naschParams.end());
1560 std::set<SumoXMLAttr> lc2013Params;
1589 std::set<SumoXMLAttr> sl2015Params = lc2013Params;
1600 std::set<SumoXMLAttr> noParams;
1608 for (
const auto& it : allowed) {
1612 std::string parsedLCMAttribute = attrs.
get<std::string>(it, into->
id.c_str(), ok);
1617 double LCMAttribute = -1;
1638 if (LCMAttribute < 0) {
1639 WRITE_ERRORF(
TL(
"Invalid Lane-Change-Model Attribute %. Must be equal or greater than 0"),
toString(it));
1649 if (LCMAttribute <= 0) {
1660 if (LCMAttribute < -1 || LCMAttribute > 1) {
1683 std::string parsedJMAttribute = attrs.
get<std::string>(it, into->
id.c_str(), ok);
1701 if ((JMAttribute < 0) || (JMAttribute > 1)) {
1702 WRITE_ERRORF(
TL(
"Invalid Junction-Model Attribute %. Only values between [0-1] are allowed"),
toString(it));
1705 }
else if (JMAttribute < 0
1732 if (vclassS ==
"") {
1738 if (realName != vclassS) {
1739 WRITE_WARNING(
"The vehicle class '" + vclassS +
"' for " + attrs.
getObjectType() +
" '" +
id +
"' is deprecated, use '" + realName +
"' instead.");
1756 if (realName != vclassS) {
1757 WRITE_WARNING(
"The shape '" + vclassS +
"' for " + attrs.
getObjectType() +
" '" +
id +
"' is deprecated, use '" + realName +
"' instead.");
1779 result = maxPos / 2.;
1789 const std::string defaultError =
"The parameter action-step-length must be a non-negative multiple of the simulation step-length. ";
1799 if (fabs(given * 1000. -
double(result)) > NUMERICAL_EPS) {
1809 return id.substr(0, 1) ==
"!";
1819 WRITE_ERRORF(
TL(
"Invalid Car-Following-Model Attribute %. An acceleration profile value cannot be negative"),
toString(attr));
1823 WRITE_ERRORF(
TL(
"Entry '%' of % table for vType '%' cannot be parsed as 'double'"), value,
toString(attr), vtype->
id);
1834 for (
const std::string& opt : oc.
getStringVector(
"persontrip.transfer.car-walk")) {
1835 if (opt ==
"parkingAreas") {
1837 }
else if (opt ==
"ptStops") {
1839 }
else if (opt ==
"allJunctions") {
1842 WRITE_ERRORF(
TL(
"Invalid transfer option '%'. Must be one of 'parkingAreas', 'ptStops' and 'allJunctions'"), opt);
1847 if (taxiDropoff.empty() && hasTaxi) {
1850 for (
const std::string& opt : taxiDropoff) {
1851 if (opt ==
"parkingAreas") {
1853 }
else if (opt ==
"ptStops") {
1855 }
else if (opt ==
"allJunctions") {
1858 WRITE_ERRORF(
TL(
"Invalid transfer option '%'. Must be one of 'parkingAreas', 'ptStops' and 'allJunctions'"), opt);
1862 if (taxiPickup.empty() && hasTaxi) {
1865 for (
const std::string& opt : taxiPickup) {
1866 if (opt ==
"parkingAreas") {
1868 }
else if (opt ==
"ptStops") {
1870 }
else if (opt ==
"allJunctions") {
1873 WRITE_ERRORF(
TL(
"Invalid transfer option '%'. Must be one of 'parkingAreas', 'ptStops' and 'allJunctions'"), opt);
1886 if (stopParam !=
nullptr) {
1918 if (vehicleParameter) {
1919 delete vehicleParameter;
1923 }
else if (message.size() > 0) {
1932 if (vehicleTypeParameter) {
1933 delete vehicleTypeParameter;
1937 }
else if (message.size() > 0) {
@ TAXI_DROPOFF_ANYWHERE
taxi customer may exit anywhere
@ PT_STOPS
public transport stops and access
@ TAXI_PICKUP_ANYWHERE
taxi customer may be picked up anywhere
@ TAXI_PICKUP_PARKING_AREAS
taxi customer may be picked up at parking areas
@ TAXI_DROPOFF_PT
taxi customer may exit at public transport stops
@ TAXI_DROPOFF_PARKING_AREAS
taxi customer may exit at parking areas
@ ALL_JUNCTIONS
junctions with edges allowing the additional mode
@ TAXI_PICKUP_PT
taxi customer may be picked up at public transport stops
@ PARKING_AREAS
parking areas
#define WRITE_WARNINGF(...)
#define WRITE_ERRORF(...)
#define WRITE_WARNING(msg)
std::vector< std::string > StringVector
Definition of a vector of strings.
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
constexpr SUMOTime TIME2STEPS(double x)
const long long int VTYPEPARS_TTT_SET
const long long int VTYPEPARS_SHAPE_SET
const long long int VTYPEPARS_LOADING_DURATION
const long long int VTYPEPARS_TTT_BIDI_SET
const long long int VTYPEPARS_SCALE_SET
const long long int VTYPEPARS_PERSON_CAPACITY
const long long int VTYPEPARS_CAR_FOLLOW_MODEL
const long long int VTYPEPARS_WIDTH_SET
const long long int VTYPEPARS_ACTIONSTEPLENGTH_SET
const long long int VTYPEPARS_MAXSPEED_LAT_SET
const long long int VTYPEPARS_MAXSPEED_SET
const long long int VTYPEPARS_EMISSIONCLASS_SET
const long long int VTYPEPARS_LATALIGNMENT_SET
const long long int VTYPEPARS_COLOR_SET
const long long int VTYPEPARS_LANE_CHANGE_MODEL_SET
const long long int VTYPEPARS_DESIRED_MAXSPEED_SET
const long long int VTYPEPARS_OSGFILE_SET
const long long int VTYPEPARS_MANEUVER_ANGLE_TIMES_SET
const long long int VTYPEPARS_SPEEDFACTOR_PREMATURE_SET
const long long int VTYPEPARS_SPEEDFACTOR_SET
const long long int VTYPEPARS_MINGAP_SET
const long long int VTYPEPARS_PROBABILITY_SET
const long long int VTYPEPARS_HEIGHT_SET
const long long int VTYPEPARS_PARKING_BADGES_SET
const long long int VTYPEPARS_MASS_SET
const long long int VTYPEPARS_BOARDING_DURATION
LatAlignmentDefinition
Possible ways to choose the lateral alignment, i.e., how vehicles align themselves within their lane.
const long long int VTYPEPARS_BOARDING_FACTOR_SET
const long long int VTYPEPARS_VEHICLECLASS_SET
const long long int VTYPEPARS_IMPATIENCE_SET
const long long int VTYPEPARS_LENGTH_SET
const long long int VTYPEPARS_IMGFILE_SET
const long long int VTYPEPARS_CONTAINER_CAPACITY
const long long int VTYPEPARS_MINGAP_LAT_SET
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SUMOVehicleShape::UNKNOWN, false)
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
const std::string DEFAULT_PEDTYPE_ID
SUMOVehicleShape
Definition of vehicle classes to differ between different appearances.
const std::string DEFAULT_CONTAINERTYPE_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_PEDESTRIAN
pedestrian
const long long int VEHPARS_ARRIVALSPEED_SET
const long long int VEHPARS_DEPARTPOSLAT_SET
const long long int VEHPARS_ARRIVALPOSLAT_SET
const long long int VEHPARS_PERSON_NUMBER_SET
const long long int VEHPARS_DEPARTSPEED_SET
RouteIndexDefinition
Possible ways to choose the departure and arrival edge.
const long long int VEHPARS_FORCE_REROUTE
DepartLaneDefinition
Possible ways to choose a lane on depart.
const long long int VEHPARS_END_SET
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.
const long long int VEHPARS_PERIOD_SET
DepartPosLatDefinition
Possible ways to choose the lateral departure position.
DepartPosDefinition
Possible ways to choose the departure position.
const long long int VEHPARS_ROUTE_SET
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
const long long int VEHPARS_COLOR_SET
DepartSpeedDefinition
Possible ways to choose the departure speed.
const long long int VEHPARS_TO_TAZ_SET
const long long int VEHPARS_ARRIVALLANE_SET
const long long int VEHPARS_DEPARTLANE_SET
const long long int VEHPARS_DEPARTPOS_SET
const long long int VEHPARS_ARRIVALPOS_SET
const long long int VEHPARS_ARRIVALEDGE_SET
const long long int VEHPARS_CONTAINER_NUMBER_SET
const long long int VEHPARS_FROM_TAZ_SET
const long long int VEHPARS_PARKING_BADGES_SET
const long long int VEHPARS_PROB_SET
const long long int VEHPARS_SPEEDFACTOR_SET
const long long int VEHPARS_VTYPE_SET
const long long int VEHPARS_VPH_SET
ArrivalPosDefinition
Possible ways to choose the arrival position.
@ RANDOM
The arrival position is chosen randomly.
@ MAX
The maximum arrival position is used.
@ DEFAULT
No information given; use default.
@ CENTER
Half the road length.
const long long int VEHPARS_CALIBRATORSPEED_SET
ArrivalPosLatDefinition
Possible ways to choose the lateral arrival position.
const long long int VEHPARS_LINE_SET
const long long int VEHPARS_DEPARTEDGE_SET
const long long int VEHPARS_INSERTION_CHECKS_SET
const long long int VEHPARS_NUMBER_SET
@ TRIGGERED
The departure is person triggered.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_CF_KRAUSS_PLUS_SLOPE
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_CF_PWAGNER2009
@ SUMO_TAG_CF_KRAUSS_ORIG1
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_OVERHEAD_WIRE_SEGMENT
An overhead wire segment.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_GCC_GAIN_GAP_DOT_CACC
@ SUMO_ATTR_CF_EIDM_T_ACC_MAX
@ SUMO_ATTR_STARTUP_DELAY
@ SUMO_ATTR_RESISTANCE_COEFFICIENT_CONSTANT
@ SUMO_ATTR_CF_EIDM_EPSILON_ACC
@ SUMO_ATTR_CF_CC_FLATBED_KP
@ SUMO_ATTR_GCC_GAIN_SPEED
@ SUMO_ATTR_ROECKL_OFFSET_SHARP
@ SUMO_ATTR_CURVE_INTEGRATION
@ SUMO_ATTR_EMISSIONCLASS
@ SUMO_ATTR_CF_CC_FLATBED_D
@ SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME
@ SUMO_ATTR_LCA_COOPERATIVE_SPEED
@ SUMO_ATTR_RESISTANCE_TABLE
@ SUMO_ATTR_MAXACCEL_PROFILE
@ SUMO_ATTR_ROECKL_NUMERATOR_SHARP
@ SUMO_ATTR_CF_EIDM_T_LOOK_AHEAD
@ SUMO_ATTR_CF_CC_FLATBED_KA
@ SUMO_ATTR_CF_CC_PLOEG_KP
@ SUMO_ATTR_CF_WIEDEMANN_SECURITY
@ SUMO_ATTR_LCA_ASSERTIVE
@ SUMO_ATTR_LCA_LANE_DISCIPLINE
@ SUMO_ATTR_CONTAINER_STOP
@ SUMO_ATTR_CF_EIDM_USEVEHDYNAMICS
@ SUMO_ATTR_CF_IDMM_ADAPT_TIME
@ SUMO_ATTR_LANE_CHANGE_MODEL
@ SUMO_ATTR_CF_KERNER_PHI
@ SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE
@ SUMO_ATTR_GC_GAIN_SPACE
@ SUMO_ATTR_DEPARTPOS_LAT
@ SUMO_ATTR_PARKING_BADGES
@ SUMO_ATTR_CF_EIDM_C_COOLNESS
@ SUMO_ATTR_CF_EIDM_SIG_ERROR
@ SUMO_ATTR_LCA_COOPERATIVE_MINSPEED
@ SUMO_ATTR_CA_GAIN_GAP_CACC
@ SUMO_ATTR_LCA_LOOKAHEADLEFT
@ SUMO_ATTR_APPARENTDECEL
@ SUMO_ATTR_CURVE_RESISTANCE
@ SUMO_ATTR_ROECKL_SHARP_RADIUS
@ SUMO_ATTR_GC_GAIN_GAP_DOT_CACC
@ SUMO_ATTR_LCA_SPEEDGAIN_PARAM
@ SUMO_ATTR_ACTIONSTEPLENGTH
@ SUMO_ATTR_CF_CC_PLOEG_H
@ SUMO_ATTR_LCA_MAXDISTLATSTANDING
@ SUMO_ATTR_LCA_IMPATIENCE
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_LCA_COOPERATIVE_ROUNDABOUT
@ SUMO_ATTR_CA_GAIN_GAP_DOT_CACC
@ SUMO_ATTR_LCA_COOPERATIVE_HELPTIME
@ SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME
@ SUMO_ATTR_HEADWAY_TIME_CACC_TO_ACC
@ SUMO_ATTR_CONTAINER_NUMBER
@ SUMO_ATTR_CA_GAIN_SPACE
@ SUMO_ATTR_CHARGING_STATION
@ SUMO_ATTR_LOADING_DURATION
@ SUMO_ATTR_CF_EIDM_MAX_VEH_PREVIEW
@ SUMO_ATTR_LCA_SPEEDGAIN_LOOKAHEAD
@ SUMO_ATTR_LCA_MAXSPEEDLATFACTOR
@ SUMO_ATTR_MANEUVER_ANGLE_TIMES
Class specific timing values for vehicle maneuvering through angle ranges.
@ SUMO_ATTR_CF_CC_CCACCEL
@ SUMO_ATTR_CONTAINERSPERHOUR
@ SUMO_ATTR_ROECKL_NUMERATOR
@ SUMO_ATTR_CF_EIDM_T_REACTION
@ SUMO_ATTR_CF_EIDM_T_PERSISTENCE_ESTIMATE
@ SUMO_ATTR_CF_PWAGNER2009_TAULAST
@ SUMO_ATTR_TIME_TO_TELEPORT_BIDI
@ SUMO_ATTR_CF_CC_PLOEG_KD
@ SUMO_ATTR_GC_GAIN_GAP_CACC
@ SUMO_ATTR_OVERHEAD_WIRE_SEGMENT
@ SUMO_ATTR_CF_EIDM_SIG_GAP
@ SUMO_ATTR_CAR_FOLLOW_MODEL
@ SUMO_ATTR_CF_EIDM_JERK_MAX
@ SUMO_ATTR_RESISTANCE_COEFFICIENT_QUADRATIC
@ SUMO_ATTR_LCA_MAXSPEEDLATSTANDING
@ SUMO_ATTR_JM_DRIVE_AFTER_YELLOW_TIME
@ SUMO_ATTR_LCA_KEEPRIGHT_PARAM
@ SUMO_ATTR_DESIRED_MAXSPEED
@ SUMO_ATTR_LCA_STRATEGIC_LOOKAHEAD
@ SUMO_ATTR_LCA_CONTRIGHT
@ SUMO_ATTR_CONTAINER_CAPACITY
@ SUMO_ATTR_LCA_COOPERATIVE_PARAM
@ SUMO_ATTR_LCA_OPPOSITE_PARAM
@ SUMO_ATTR_BOARDING_FACTOR
@ SUMO_ATTR_CF_CC_CCDECEL
@ SUMO_ATTR_LCA_SPEEDGAIN_REMAIN_TIME
@ SUMO_ATTR_GCC_GAIN_SPACE
@ SUMO_ATTR_EMERGENCYDECEL
@ SUMO_ATTR_CF_CC_FLATBED_H
@ SUMO_ATTR_LCA_OVERTAKE_DELTASPEED_FACTOR
@ SUMO_ATTR_CF_CC_LANES_COUNT
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_LCA_SUBLANE_PARAM
@ SUMO_ATTR_CF_IDM_STEPPING
@ SUMO_ATTR_CF_IDMM_ADAPT_FACTOR
@ SUMO_ATTR_COLLISION_MINGAP_FACTOR
@ SUMO_ATTR_ROECKL_OFFSET
@ SUMO_ATTR_BOARDING_DURATION
@ SUMO_ATTR_CF_CC_CONSTSPACING
@ SUMO_ATTR_CF_EIDM_M_FLATNESS
@ SUMO_ATTR_JM_SIGMA_MINOR
@ SUMO_ATTR_CF_EIDM_M_BEGIN
@ SUMO_ATTR_CF_EIDM_T_PERSISTENCE_DRIVE
@ SUMO_ATTR_TIME_TO_TELEPORT
@ SUMO_ATTR_CA_GAIN_SPEED
@ SUMO_ATTR_CF_EIDM_SIG_LEADER
@ SUMO_ATTR_LCA_COOPERATIVE_HELPTHRESHOLD
@ SUMO_ATTR_RESISTANCE_COEFFICIENT_LINEAR
@ SUMO_ATTR_APPLYDRIVERSTATE
@ SUMO_ATTR_PERSON_NUMBER
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_CF_PWAGNER2009_APPROB
@ SUMO_ATTR_DESACCEL_PROFILE
@ SUMO_ATTR_SPEEDFACTOR_PREMATURE
@ SUMO_ATTR_LCA_OVERTAKE_RIGHT
@ SUMO_ATTR_ARRIVALPOS_LAT
@ SUMO_ATTR_LCA_ACCEL_LAT
@ SUMO_ATTR_LCA_STRATEGIC_PARAM
@ SUMO_ATTR_TRACTION_TABLE
@ SUMO_ATTR_INSERTIONCHECKS
@ SUMO_ATTR_PERSON_CAPACITY
@ SUMO_ATTR_GC_GAIN_SPEED
@ SUMO_ATTR_GCC_GAIN_GAP_CACC
@ SUMO_ATTR_LCA_KEEPRIGHT_ACCEPTANCE_TIME
@ SUMO_ATTR_LCA_EXPERIMENTAL1
@ SUMO_ATTR_LCA_TIME_TO_IMPATIENCE
@ SUMO_ATTR_JM_TIMEGAP_MINOR
@ SUMO_ATTR_CF_CC_FLATBED_KV
@ SUMO_ATTR_LCA_SPEEDGAIN_URGENCY
@ SUMO_ATTR_CF_WIEDEMANN_ESTIMATION
@ SUMO_ATTR_PERSONSPERHOUR
@ SUMO_ATTR_LCA_SPEEDGAINRIGHT
const double INVALID_DOUBLE
invalid double
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void parse(const std::string &description, const bool hardFail)
Overwrite by parsable distribution description.
void setParameter(const int index, const double value)
Set a parameter of this distribution.
const std::string isValid() const
check whether the distribution is valid
static bool isAbsolute(const std::string &path)
Returns the information whether the given path is absolute.
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
A storage for options typed value containers)
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.
static SUMOEmissionClass getClassByName(const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING)
Checks whether the string describes a known vehicle class.
static const RGBColor YELLOW
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)
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.
virtual std::string getName(int attr) const =0
Converts the given attribute id into a man readable string.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
const std::string & getObjectType() const
return the objecttype to which these attributes belong
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.
double width
This class' width.
SubParams cfParameter
Car-following parameter.
double defaultProbability
The probability when being added to a distribution without an explicit probability.
SUMOTime actionStepLength
The vehicle type's default actionStepLength [ms], i.e. the interval between two control actions....
double height
This class' height.
double desiredMaxSpeed
The vehicle type's desired maximum speed [m/s].
SUMOEmissionClass emissionClass
The emission class of this vehicle.
double latAlignmentOffset
(optional) The vehicle's desired lateral alignment as offset in m from center line
std::vector< std::string > parkingBadges
the parking access rights
static std::set< SumoXMLAttr > AllowedJMAttrs
allowed attrs for the junction model
double length
The physical vehicle length.
double maxSpeedLat
The vehicle type's maximum lateral speed [m/s].
double speedFactorPremature
the possible speed reduction when a train is ahead of schedule
long long int parametersSet
Information for the router which parameter were set.
double minGap
This class' free space in front of the vehicle itself.
std::string imgFile
Image file for this class.
SUMOVehicleShape shape
This class' shape.
int personCapacity
The person capacity of the vehicle.
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
double scale
individual scaling factor (-1 for undefined)
SUMOTime timeToTeleport
the custom time-to-teleport for this type
std::string osgFile
3D model file for this class
double maxSpeed
The vehicle type's (technical) maximum speed [m/s].
SUMOTime timeToTeleportBidi
the custom time-to-teleport.bidi for this type
int containerCapacity
The container capacity of the vehicle.
SUMOTime boardingDuration
The time a person needs to board the vehicle.
double minGapLat
The vehicle type's minimum lateral gap [m].
double boardingFactor
factor for boardingDuration / loadingDuration
SUMOVehicleClass vehicleClass
The vehicle's class.
SUMOTime loadingDuration
The time a container needs to get loaded on the vehicle.
std::string id
The vehicle type's id.
SumoXMLTag cfModel
The enum-representation of the car-following model to use.
SubParams lcParameter
Lane-changing parameter.
LatAlignmentDefinition latAlignmentProcedure
Information on how the vehicle shall choose the lateral alignment.
SubParams jmParameter
Junction-model parameter.
double impatience
The vehicle's impatience (willingness to obstruct others)
std::map< int, std::pair< SUMOTime, SUMOTime > > myManoeuverAngleTimes
Map of manoeuver angles versus the times (entry, exit) to execute the manoeuver.
LaneChangeModel lcModel
The lane-change model to use.
static bool parseLatAlignment(const std::string &val, double &lao, LatAlignmentDefinition &lad)
Parses and validates a given latAlignment value.
Definition of vehicle stop (position and duration)
std::string parkingarea
(Optional) parking area if one is assigned to the stop
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::string busstop
(Optional) bus stop if one is assigned to the stop
std::string containerstop
(Optional) container stop if one is assigned to the stop
Structure representing possible vehicle parameter.
double departPosLat
(optional) The lateral position the vehicle shall depart from
double arrivalPosLat
(optional) The lateral position the vehicle shall arrive on
double repetitionProbability
The probability for emitting a vehicle per second.
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
double departSpeed
(optional) The initial speed of the vehicle
SumoXMLTag tag
The vehicle tag.
std::string vtypeid
The vehicle's type id.
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
double speedFactor
individual speedFactor (overriding distribution from vType)
long long int repetitionNumber
static bool parseArrivalLane(const std::string &val, const std::string &element, const std::string &id, int &lane, ArrivalLaneDefinition &ald, std::string &error)
Validates a given arrivalLane value.
static bool parseArrivalPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosLatDefinition &apd, std::string &error)
Validates a given arrivalPosLat value.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
long long int parametersSet
Information for the router which parameter were set, TraCI may modify this (when changing color)
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
static bool parseDepartSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, DepartSpeedDefinition &dsd, std::string &error)
Validates a given departSpeed value.
static bool parseArrivalPos(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosDefinition &apd, std::string &error)
Validates a given arrivalPos value.
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons)
static bool parseArrivalSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, ArrivalSpeedDefinition &asd, std::string &error)
Validates a given arrivalSpeed value.
double poissonRate
The rate for emitting vehicles with a poisson distribution.
RouteIndexDefinition arrivalEdgeProcedure
Information how the vehicle's final edge shall be chosen.
DepartPosLatDefinition departPosLatProcedure
Information how the vehicle shall choose the lateral departure position.
SVCPermissions modes
The modes a person or container can use.
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
std::string vTypes
The types of usable (auto-generated) vehicles for a person / container.
double departPos
(optional) The position the vehicle shall depart from
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
RGBColor color
The vehicle's color, TraCI may change this.
double arrivalPos
(optional) The position the vehicle shall arrive on
static int parseInsertionChecks(const std::string &value)
parses insertion checks
double calibratorSpeed
speed (used by calibrator flows
static bool parseDepartLane(const std::string &val, const std::string &element, const std::string &id, int &lane, DepartLaneDefinition &dld, std::string &error)
Validates a given departLane value.
std::string routeid
The vehicle's route id.
std::string id
The vehicle's id.
std::vector< std::string > parkingBadges
The parking access rights.
int departEdge
(optional) The initial edge within the route of the vehicle
static bool parseDepart(const std::string &val, const std::string &element, const std::string &id, SUMOTime &depart, DepartDefinition &dd, std::string &error, const std::string &attr="departure")
Validates a given depart value.
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.
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
static bool parseRouteIndex(const std::string &val, const std::string &element, const std::string &id, const SumoXMLAttr attr, int &edgeIndex, RouteIndexDefinition &rid, std::string &error)
Validates a given departEdge or arrivalEdge value.
static bool parseDepartPosLat(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosLatDefinition &dpd, std::string &error)
Validates a given departPosLat value.
std::string toTaz
The vehicle's destination zone (district)
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
static double interpretEdgePos(double pos, double maximumValue, SumoXMLAttr attr, const std::string &id, bool silent=false)
Interprets negative edge positions and fits them onto a given edge.
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
static bool parseDepartPos(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosDefinition &dpd, std::string &error)
Validates a given departPos value.
int insertionChecks
bitset of InsertionCheck
int arrivalEdge
(optional) The final edge within the route of the vehicle
std::string fromTaz
The vehicle's origin zone (district)
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
std::string line
The vehicle's line (mainly for public transport)
int containerNumber
The static number of containers in the vehicle when it departs.
RouteIndexDefinition departEdgeProcedure
Information how the vehicle's initial edge shall be chosen.
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
static const CFAttrMap & getAllowedCFModelAttrs()
returns allowed attrs for each known CF-model (init on first use)
static SUMOVTypeParameter * beginVTypeParsing(const SUMOSAXAttributes &attrs, const bool hardFail, const std::string &file, const SUMOVTypeParameter *const base)
Starts to parse a vehicle type.
static bool parseLCParams(SUMOVTypeParameter *into, LaneChangeModel model, const SUMOSAXAttributes &attrs)
Parses lane change model attributes.
static bool isInternalRouteID(const std::string &id)
Checks whether the route ID uses the syntax of internal routes.
std::map< SumoXMLTag, std::set< SumoXMLAttr > > CFAttrMap
Car-Following attributes map.
static int parseCarWalkTransfer(const OptionsCont &oc, const bool hasTaxi)
static std::string parseID(const SUMOSAXAttributes &attrs, const SumoXMLTag element)
parse ID
static bool parseCFMParams(SUMOVTypeParameter *into, const SumoXMLTag element, const SUMOSAXAttributes &attrs, const bool nestedCFM)
Parses Car Following Mode params.
static SUMOTime processActionStepLength(double given)
Checks and converts given value for the action step length from seconds to miliseconds assuring it be...
std::map< LaneChangeModel, std::set< SumoXMLAttr > > LCAttrMap
Lane-Change-Model attributes map.
static SUMOVTypeParameter * handleVehicleTypeError(const bool hardFail, SUMOVTypeParameter *vehicleTypeParameter, const std::string message="")
handle error loading SUMOVTypeParameter
static void parseCommonAttributes(const SUMOSAXAttributes &attrs, SUMOVehicleParameter *ret, SumoXMLTag tag, const bool allowInternalRoutes=false)
Parses attributes common to vehicles and flows.
static bool parseAngleTimesMap(SUMOVTypeParameter *vtype, const std::string)
Parse string containing AngleTimes triplets (angle, entry time, exit time)
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 SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
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 LCAttrMap allowedLCModelAttrs
allowed attrs for each known LC-model
static bool validProfile(SUMOVTypeParameter *vtype, const std::string data, const SumoXMLAttr attr)
Parse string containing a vector of pairs.
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.
static SUMOVehicleParameter * handleVehicleError(const bool hardFail, SUMOVehicleParameter *vehicleParameter, const std::string message="")
handle error loading SUMOVehicleParameter
static CFAttrMap allowedCFModelAttrs
allowed attrs for each known CF-model
static bool parseJMParams(SUMOVTypeParameter *into, const SUMOSAXAttributes &attrs)
Parses junction model attributes.
static StringBijection< SumoXMLTag > CarFollowModels
car following models
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
static StringBijection< TrainType > TrainTypes
train types
static SequentialStringBijection Tags
The names of SUMO-XML elements for use in netbuild.
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
T get(const std::string &str) const
get key
int size() const
returns the number of existing substrings
std::string get(int pos) const
returns the item at the given position
std::vector< std::string > getVector()
return vector of strings
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 toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
struct for default values that depend of VClass
double maxSpeed
The vehicle type's maximum speed [m/s] (technical limit, not subject to speed deviation)