 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
58 bool abortCreation =
true;
64 return handleError(hardFail, abortCreation,
"Invalid flow id '" +
id +
"'.");
70 "' has to be given in the definition of flow '" +
id +
"'.");
76 "' has to be given in the definition of flow '" +
id +
"'.");
82 "' has to be given in the definition of flow '" +
id +
"'.");
93 "' are allowed in flow '" +
id +
"'.");
102 "' is needed in flow '" +
id +
"'.");
130 if (ok && vph <= 0) {
132 return handleError(hardFail, abortCreation,
"Invalid repetition rate in the definition of flow '" +
id +
"'.");
134 if (ok && vph != 0) {
141 if (ok && vph <= 0) {
143 return handleError(hardFail, abortCreation,
"Invalid repetition rate in the definition of personFlow '" +
id +
"'.");
145 if (ok && vph != 0) {
154 return handleError(hardFail, abortCreation,
"Invalid repetition probability in the definition of flow '" +
id +
"'.");
158 ret->
depart = beginDefault;
162 if (ok && ret->
depart < 0) {
164 return handleError(hardFail, abortCreation,
"Negative begin time in the definition of flow '" +
id +
"'.");
175 (endDefault >=
TIME2STEPS(9223372036854773) || endDefault < 0)) {
176 WRITE_WARNING(
"Undefined end for flow '" +
id +
"', defaulting to 24hour duration.");
181 return handleError(hardFail, abortCreation,
"Flow '" +
id +
"' ends before its begin time.");
187 WRITE_WARNING(
"Flow '" +
id +
"' has 0 vehicles; will skip it.");
191 return handleError(hardFail, abortCreation,
"Negative repetition number in the definition of flow '" +
id +
"'.");
205 return handleError(hardFail, abortCreation,
"Invalid repetition rate in the definition of flow '" +
id +
"'.");
217 return handleError(hardFail, abortCreation,
"Flow cannot be created");
233 std::string id, errorMsg;
242 if (optionalID || !
id.empty()) {
268 }
else if (ret->
routeid.empty()) {
301 }
else if (
id.empty()) {
305 WRITE_ERROR(
"Invalid " +
toString(element) +
" id '" +
id +
"'. Contains invalid characters.");
319 bool abortCreation =
true;
464 if (personNumber >= 0) {
474 if (containerNumber >= 0) {
492 bool abortCreation =
true;
563 handleError(hardFail, abortCreation,
"Invalid speed distribution when parsing vType '" + vtype->
id +
"' (" + error +
")");
600 vtype->
impatience = -std::numeric_limits<double>::max();
616 vtype->
width = width;
663 vtype->
color = color;
673 if (defaultProbability < 0) {
684 if (lcmS ==
"JE2013") {
685 WRITE_WARNING(
"Lane change model 'JE2013' is deprecated. Using default model instead.");
692 handleError(hardFail, abortCreation,
"Unknown lane change model '" + lcmS +
"' when parsing vType '" + vtype->
id +
"'");
702 handleError(hardFail, abortCreation,
"Unknown car following model '" + cfmValue +
"' when parsing vType '" + vtype->
id +
"'");
709 if (personCapacity < 0) {
721 if (containerCapacity < 0) {
733 if (boardingDuration < 0) {
745 if (loadingDuration < 0) {
757 if (maxSpeedLat <= 0) {
784 handleError(hardFail, abortCreation,
"Unknown lateral alignment '" + alignS +
"' when parsing vType '" + vtype->
id +
"'");
789 handleError(hardFail, abortCreation,
"Invalid parsing embedded VType");
793 handleError(hardFail, abortCreation,
"Invalid Lane Change Model Parameters");
797 handleError(hardFail, abortCreation,
"Invalid Junction Model Parameters");
799 if (!abortCreation) {
821 bool abortCreation =
true;
822 CFAttrMap::const_iterator cf_it = allowedCFM.find(element);
824 if (cf_it == allowedCFM.end()) {
826 handleError(hardFail, abortCreation,
"Unknown car following model " +
toString(element) +
" when parsing vType '" + into.
id +
"'");
828 handleError(hardFail, abortCreation,
"Unknown car following model when parsing vType '" + into.
id +
"'");
839 for (
const auto& it : cf_it->second) {
842 std::string parsedCFMAttribute = attrs.
get<std::string>(it, into.
id.c_str(), ok);
849 }
else if (hardFail) {
850 throw ProcessError(
"Invalid train type '" + parsedCFMAttribute +
"' used in Car-Following-Attribute " +
toString(it));
852 WRITE_ERROR(
"Invalid train type '" + parsedCFMAttribute +
"' used in Car-Following-Attribute " +
toString(it));
856 int CFMIntAttribute = -1;
863 throw ProcessError(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Cannot be parsed to int");
865 WRITE_ERROR(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Cannot be parsed to int");
870 if (CFMIntAttribute <= 0) {
873 throw ProcessError(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Must be greater than 0");
875 WRITE_ERROR(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Must be greater than 0");
885 double CFMDoubleAttribute = -1;
892 throw ProcessError(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Cannot be parsed to float");
894 WRITE_ERROR(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Cannot be parsed to float");
910 if (CFMDoubleAttribute <= 0) {
913 throw ProcessError(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Must be greater than 0");
915 WRITE_ERROR(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Must be greater than 0");
924 if ((CFMDoubleAttribute < 0) || (CFMDoubleAttribute > 1)) {
927 throw ProcessError(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Only values between [0-1] are allowed");
929 WRITE_ERROR(
"Invalid Car-Following-Model Attribute " +
toString(it) +
". Only values between [0-1] are allowed");
939 WRITE_WARNING(
"Value of tau=" + parsedCFMAttribute +
" in car following model '" +
940 toString(into.
cfModel) +
"' lower than simulation step size may cause collisions");
959 std::set<SumoXMLAttr> kraussParams;
969 std::set<SumoXMLAttr> allParams(kraussParams);
971 std::set<SumoXMLAttr> kraussXParams(kraussParams);
978 allParams.insert(kraussXParams.begin(), kraussXParams.end());
980 std::set<SumoXMLAttr> smartSKParams;
993 allParams.insert(smartSKParams.begin(), smartSKParams.end());
995 std::set<SumoXMLAttr> daniel1Params;
1008 allParams.insert(daniel1Params.begin(), daniel1Params.end());
1010 std::set<SumoXMLAttr> pwagParams;
1020 allParams.insert(pwagParams.begin(), pwagParams.end());
1022 std::set<SumoXMLAttr> idmParams;
1031 allParams.insert(idmParams.begin(), idmParams.end());
1033 std::set<SumoXMLAttr> idmmParams;
1043 allParams.insert(idmmParams.begin(), idmmParams.end());
1045 std::set<SumoXMLAttr> bkernerParams;
1054 allParams.insert(bkernerParams.begin(), bkernerParams.end());
1056 std::set<SumoXMLAttr> wiedemannParams;
1064 allParams.insert(wiedemannParams.begin(), wiedemannParams.end());
1066 std::set<SumoXMLAttr> w99Params;
1077 allParams.insert(w99Params.begin(), w99Params.end());
1079 std::set<SumoXMLAttr> railParams;
1082 allParams.insert(railParams.begin(), railParams.end());
1084 std::set<SumoXMLAttr> ACCParams;
1098 allParams.insert(ACCParams.begin(), ACCParams.end());
1100 std::set<SumoXMLAttr> CACCParams;
1121 allParams.insert(CACCParams.begin(), CACCParams.end());
1123 std::set<SumoXMLAttr> ccParams;
1146 allParams.insert(ccParams.begin(), ccParams.end());
1158 std::set<SumoXMLAttr> lc2013Params;
1173 std::set<SumoXMLAttr> sl2015Params = lc2013Params;
1183 std::set<SumoXMLAttr> noParams;
1192 for (
const auto& it : allowed) {
1195 std::string parsedLCMAttribute = attrs.
get<std::string>(it, into.
id.c_str(), ok);
1197 double LCMAttribute = -1;
1204 throw ProcessError(
"Invalid Lane-Change-Model Attribute " +
toString(it) +
". Cannot be parsed to float");
1206 WRITE_ERROR(
"Invalid Lane-Change-Model Attribute " +
toString(it) +
". Cannot be parsed to float");
1222 if (LCMAttribute < 0) {
1225 throw ProcessError(
"Invalid Lane-Change-Model Attribute " +
toString(it) +
". Must be equal or greater than 0");
1227 WRITE_ERROR(
"Invalid Lane-Change-Model Attribute " +
toString(it) +
". Must be equal or greater than 0");
1236 if (LCMAttribute <= 0) {
1239 throw ProcessError(
"Invalid Lane-Change-Model Attribute " +
toString(it) +
". Must be greater than 0");
1241 WRITE_ERROR(
"Invalid Lane-Change-Model Attribute " +
toString(it) +
". Must be greater than 0");
1276 std::string parsedJMAttribute = attrs.
get<std::string>(it, into.
id.c_str(), ok);
1278 double JMAttribute = -1;
1285 throw ProcessError(
"Invalid Junction-Model Attribute " +
toString(it) +
". Cannot be parsed to float");
1287 WRITE_ERROR(
"Invalid Junction-Model Attribute " +
toString(it) +
". Cannot be parsed to float");
1291 if (ok && (JMAttribute != -1)) {
1295 if ((JMAttribute < 0) || (JMAttribute > 1)) {
1298 throw ProcessError(
"Invalid Junction-Model Attribute " +
toString(it) +
". Only values between [0-1] are allowed");
1300 WRITE_ERROR(
"Invalid Junction-Model Attribute " +
toString(it) +
". Only values between [0-1] are allowed");
1305 if (JMAttribute < 0) {
1308 throw ProcessError(
"Invalid Junction-Model Attribute " +
toString(it) +
". Must be equal or greater than 0");
1310 WRITE_ERROR(
"Invalid Junction-Model Attribute " +
toString(it) +
". Must be equal or greater than 0");
1331 if (vclassS ==
"") {
1336 if (realName != vclassS) {
1337 WRITE_WARNING(
"The vehicle class '" + vclassS +
"' for " + attrs.
getObjectType() +
" '" +
id +
"' is deprecated, use '" + realName +
"' instead.");
1354 if (realName != vclassS) {
1355 WRITE_WARNING(
"The shape '" + vclassS +
"' for " + attrs.
getObjectType() +
" '" +
id +
"' is deprecated, use '" + realName +
"' instead.");
1381 result = maxPos / 2.;
1394 std::stringstream ss;
1395 ss <<
"The parameter action-step-length must be a non-negative multiple of the simulation step-length. Ignoring given value (="
1400 }
else if (result %
DELTA_T != 0) {
1401 std::stringstream ss;
1405 ss <<
"The parameter action-step-length must be a non-negative multiple of the simulation step-length. Parsing given value ("
1406 << given <<
" s.) to the adjusted value "
1418 abortCreation =
true;
const int VTYPEPARS_LATALIGNMENT_SET
static SUMOVehicleParameter * handleError(const bool hardFail, bool &abortCreation, const std::string &message)
handle error loading SUMOVehicleParameter
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons)
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
const int VTYPEPARS_HASDRIVERSTATE_SET
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
SubParams lcParameter
Lane-changing parameter.
int containerNumber
The static number of containers in the vehicle when it departs.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
ArrivalPosDefinition
Possible ways to choose the arrival position.
double length
The physical vehicle length.
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color)
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
const int VTYPEPARS_MINGAP_SET
static CFAttrMap allowedCFModelAttrs
allowed attrs for each known CF-model
#define WRITE_WARNING(msg)
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
const std::string DEFAULT_PEDTYPE_ID
static bool parseVTypeEmbedded(SUMOVTypeParameter &into, const SumoXMLTag element, const SUMOSAXAttributes &attrs, const bool hardFail, const bool fromVType=false)
Parses an element embedded in vtype definition.
RGBColor color
The vehicle's color, TraCI may change this.
The arrival position is chosen randomly.
SUMOTime actionStepLength
The vehicle type's default actionStepLength [ms], i.e. the interval between two control actions....
SumoXMLTag cfModel
The enum-representation of the car-following model to use.
double departSpeed
(optional) The initial speed of the vehicle
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
const int VTYPEPARS_BOARDING_DURATION
std::string vtypeid
The vehicle's type id.
const int VEHPARS_NUMBER_SET
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
const int VEHPARS_FORCE_REROUTE
std::map< LaneChangeModel, std::set< SumoXMLAttr > > LCAttrMap
Lane-Change-Model attributes map.
double impatience
The vehicle's impatience (willingness to obstruct others)
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
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 const RGBColor YELLOW
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
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 osgFile
3D model file for this class
ArrivalPosLatDefinition
Possible ways to choose the departure position.
const int VTYPEPARS_MINGAP_LAT_SET
static std::set< SumoXMLAttr > allowedJMAttrs
allowed attrs for the junction model
const int VEHPARS_ARRIVALSPEED_SET
bool isValid(std::string &error)
check whether the distribution is valid
const std::string & getObjectType() const
return the objecttype to which these attributes belong
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
const int VTYPEPARS_OSGFILE_SET
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.
Structure representing possible vehicle parameter.
SUMOVehicleShape shape
This class' shape.
const int VTYPEPARS_PROBABILITY_SET
description of a vehicle type
SUMOTime getSUMOTimeReporting(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
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 containerCapacity
The container capacity of the vehicle.
SumoXMLTag
Numbers representing SUMO-XML - element names.
const int VEHPARS_PROB_SET
const int VEHPARS_DEPARTSPEED_SET
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
const int VTYPEPARS_CAR_FOLLOW_MODEL
SumoXMLTag tag
The vehicle tag.
static SUMOVehicleParameter * parseVehicleAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, const bool optionalID=false, const bool skipDepart=false, const bool isPerson=false)
Parses a vehicle's attributes.
weights: time range begin
static StringBijection< SumoXMLTag > CarFollowModels
car following models
const int VEHPARS_ARRIVALLANE_SET
const int VEHPARS_ROUTE_SET
int parametersSet
Information for the router which parameter were set.
const int VTYPEPARS_MAXSPEED_LAT_SET
std::string line
The vehicle's line (mainly for public transport)
static SUMOTime processActionStepLength(double given)
Checks and converts given value for the action step length from seconds to miliseconds assuring it be...
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT)
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
std::vector< double > & getParameter()
Returns the parameters of this distribution.
static LCAttrMap allowedLCModelAttrs
allowed attrs for each known LC-model
a flow definitio nusing a from-to edges instead of a route (used by router)
const int VEHPARS_ARRIVALPOS_SET
const int VTYPEPARS_LANE_CHANGE_MODEL_SET
std::string imgFile
Image file for this class.
static SUMOVTypeParameter * beginVTypeParsing(const SUMOSAXAttributes &attrs, const bool hardFail, const std::string &file)
Starts to parse a vehicle type.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
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.
double height
This class' height.
Structure representing possible vehicle parameter.
const int VEHPARS_COLOR_SET
SubParams jmParameter
Junction-model parameter.
T get(const std::string &str) const
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
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.
SubParams cfParameter
Car-following parameter.
double defaultProbability
The probability when being added to a distribution without an explicit probability.
vehicle is a passenger car (a "normal" car)
std::string id
The vehicle's id.
static void parseCommonAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, SUMOVehicleParameter *ret, std::string element)
Parses attributes common to vehicles and flows.
double repetitionProbability
The probability for emitting a vehicle per second.
const int VTYPEPARS_ACTIONSTEPLENGTH_SET
double arrivalPos
(optional) The position the vehicle shall arrive on
const int VEHPARS_LINE_SET
std::string fromTaz
The vehicle's origin zone (district)
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
SUMOTime boardingDuration
The time a person needs to board the vehicle.
double minGap
This class' free space in front of the vehicle itself.
double arrivalPosLat
(optional) The lateral position the vehicle shall arrive on
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 width
This class' width.
static bool parseDepart(const std::string &val, const std::string &element, const std::string &id, SUMOTime &depart, DepartDefinition &dd, std::string &error)
Validates a given depart value.
static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
double maxSpeedLat
The vehicle type's maximum lateral speed [m/s].
const int VEHPARS_ARRIVALPOSLAT_SET
double maxSpeed
The vehicle type's maximum speed [m/s].
int personCapacity
The person capacity of the vehicle.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
std::string routeid
The vehicle's route id.
bool hasDriverState
Whether vehicles of this type are equipped with a driver (i.e. MSDriverState))
const int VTYPEPARS_SPEEDFACTOR_SET
SUMOTime string2time(const std::string &r)
const int VEHPARS_VPH_SET
double departPosLat
(optional) The lateral position the vehicle shall depart from
std::map< SumoXMLTag, std::set< SumoXMLAttr > > CFAttrMap
Car-Following attributes map.
const int VEHPARS_DEPARTLANE_SET
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
DepartLaneDefinition
Possible ways to choose a lane on depart.
static SUMOEmissionClass getClassByName(const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING)
Checks whether the string describes a known vehicle class.
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
const int VTYPEPARS_LOADING_DURATION
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
static const CFAttrMap & getAllowedCFModelAttrs()
returns allowed attrs for each known CF-model (init on first use)
const int VTYPEPARS_CONTAINER_CAPACITY
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const int VEHPARS_VTYPE_SET
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
virtual std::string getName(int attr) const =0
Converts the given attribute id into a man readable string.
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
static SUMOVehicleParameter * parseFlowAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, const SUMOTime beginDefault, const SUMOTime endDefault, bool isPerson=false)
Parses a flow's attributes.
const int VEHPARS_DEPARTPOSLAT_SET
static StringBijection< int > Tags
The names of SUMO-XML elements for use in netbuild.
LateralAlignment latAlignment
The vehicles desired lateral alignment.
std::string id
The vehicle type's id.
const int VEHPARS_CONTAINER_NUMBER_SET
static StringBijection< TrainType > TrainTypes
train types
const int VEHPARS_DEPARTPOS_SET
static bool parseLCParams(SUMOVTypeParameter &into, LaneChangeModel model, const SUMOSAXAttributes &attrs, const bool hardFail)
Parses lane change model attributes.
const int VEHPARS_PERSON_NUMBER_SET
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
static bool parseJMParams(SUMOVTypeParameter &into, const SUMOSAXAttributes &attrs, const bool hardFail)
Parses junction model attributes.
const int VEHPARS_FROM_TAZ_SET
const int VTYPEPARS_PERSON_CAPACITY
DepartPosDefinition
Possible ways to choose the departure position.
const int VTYPEPARS_HEIGHT_SET
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
static double parseWalkPos(SumoXMLAttr attr, const bool hardFail, const std::string &id, double maxPos, const std::string &val, std::mt19937 *rng=0)
parse departPos or arrivalPos for a walk
static bool isAbsolute(const std::string &path)
Returns the information whether the given path is absolute.
const int VEHPARS_TO_TAZ_SET
LaneChangeModel lcModel
The lane-change model to use.
const int VTYPEPARS_IMGFILE_SET
The maximum arrival position is used.
SUMOTime loadingDuration
The time a container needs to get loaded on the vehicle.
DepartSpeedDefinition
Possible ways to choose the departure speed.
const int VEHPARS_PERIOD_SET
const int VTYPEPARS_LENGTH_SET
std::string toTaz
The vehicle's destination zone (district)
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
void parse(const std::string &description, const bool hardFail)
Overwrite by parsable distribution description.
static std::string parseID(const SUMOSAXAttributes &attrs, const SumoXMLTag element)
parse ID
SUMOEmissionClass emissionClass
The emission class of this vehicle.
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.
DepartPosLatDefinition departPosLatProcedure
Information how the vehicle shall choose the lateral departure position.
const int VTYPEPARS_EMISSIONCLASS_SET
const int VTYPEPARS_COLOR_SET
const int VTYPEPARS_SHAPE_SET
const int VEHPARS_END_SET
static SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
vehicles ignoring classes
const int VTYPEPARS_WIDTH_SET
Encapsulated SAX-Attributes.
const int VTYPEPARS_IMPATIENCE_SET
const int VTYPEPARS_MAXSPEED_SET
static double interpretEdgePos(double pos, double maximumValue, SumoXMLAttr attr, const std::string &id)
Interprets negative edge positions and fits them onto a given edge.
double departPos
(optional) The position the vehicle shall depart from
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
a single trip definition (used by router)
const int VTYPEPARS_VEHICLECLASS_SET
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
double minGapLat
The vehicle type's minimum lateral gap [m].
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.