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 +
"'.");
117 if (ret->routeid.empty()) {
130 if (ok && vph <= 0) {
132 return handleError(hardFail, abortCreation,
"Invalid repetition rate in the definition of flow '" +
id +
"'.");
134 if (ok && vph != 0) {
135 ret->repetitionOffset =
TIME2STEPS(3600. / vph);
141 if (ok && vph <= 0) {
143 return handleError(hardFail, abortCreation,
"Invalid repetition rate in the definition of personFlow '" +
id +
"'.");
145 if (ok && vph != 0) {
146 ret->repetitionOffset =
TIME2STEPS(3600. / vph);
152 if (ok && (ret->repetitionProbability <= 0 || ret->repetitionProbability > 1)) {
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 +
"'.");
166 ret->repetitionEnd = endDefault;
167 if (ret->repetitionEnd < 0) {
175 (endDefault >=
TIME2STEPS(9223372036854773) || endDefault < 0)) {
176 WRITE_WARNING(
"Undefined end for flow '" +
id +
"', defaulting to 24hour duration.");
177 ret->repetitionEnd = ret->depart +
TIME2STEPS(24 * 3600);
179 if (ok && ret->repetitionEnd < ret->depart) {
181 return handleError(hardFail, abortCreation,
"Flow '" +
id +
"' ends before its begin time.");
186 if (ret->repetitionNumber == 0) {
187 WRITE_WARNING(
"Flow '" +
id +
"' has 0 vehicles; will skip it.");
189 if (ok && ret->repetitionNumber < 0) {
191 return handleError(hardFail, abortCreation,
"Negative repetition number in the definition of flow '" +
id +
"'.");
193 if (ok && ret->repetitionOffset < 0) {
194 ret->repetitionOffset = (ret->repetitionEnd - ret->depart) / ret->repetitionNumber;
197 ret->repetitionEnd = ret->depart + ret->repetitionNumber * ret->repetitionOffset;
200 if (ok && ret->repetitionProbability > 0) {
201 ret->repetitionNumber = std::numeric_limits<int>::max();
203 if (ok && ret->repetitionOffset <= 0) {
205 return handleError(hardFail, abortCreation,
"Invalid repetition rate in the definition of flow '" +
id +
"'.");
208 ret->repetitionNumber = std::numeric_limits<int>::max();
210 const double repLength = (double)(ret->repetitionEnd - ret->depart);
211 ret->repetitionNumber = (int)ceil(repLength / ret->repetitionOffset);
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) {
468 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_PERSON_NUMBER) +
" cannot be negative");
474 if (containerNumber >= 0) {
492 bool abortCreation =
true;
510 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_LENGTH) +
" must be greater than 0");
522 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_MINGAP) +
" must be equal or greater than 0");
534 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_MAXSPEED) +
" must be greater than 0");
553 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_SPEEDDEV) +
" must be equal or greater than 0");
563 handleError(hardFail, abortCreation,
"Invalid speed distribution when parsing vType '" + vtype->
id +
"' (" + error +
")");
589 throw InvalidArgument(
toString(SUMO_ATTR_EMISSIONCLASS) +
" with name '" + parsedEmissionClass +
"' doesn't exist.");
591 WRITE_ERROR(
toString(SUMO_ATTR_EMISSIONCLASS) +
" with name '" + parsedEmissionClass +
"' doesn't exist.");
600 vtype->
impatience = -std::numeric_limits<double>::max();
614 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_WIDTH) +
" must be greater than 0");
616 vtype->
width = width;
626 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_HEIGHT) +
" must be equal or greater than 0");
663 vtype->
color = color;
673 if (defaultProbability < 0) {
674 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_PROB) +
" must be equal or greater than 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) {
710 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_PERSON_CAPACITY) +
" must be equal or greater than 0");
721 if (containerCapacity < 0) {
722 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_CONTAINER_CAPACITY) +
" must be equal or greater than 0");
733 if (boardingDuration < 0) {
745 if (loadingDuration < 0) {
757 if (maxSpeedLat <= 0) {
758 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_MAXSPEED_LAT) +
" must be greater than 0");
770 handleError(hardFail, abortCreation,
toString(SUMO_ATTR_MINGAP_LAT) +
" must be equal or greater than 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;
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
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
const int VTYPEPARS_MAXSPEED_SET
const int VEHPARS_TO_TAZ_SET
const int VTYPEPARS_MINGAP_SET
static StringBijection< SumoXMLTag > CarFollowModels
car following models
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLTag cfModel
The enum-representation of the car-following model to use.
RGBColor color
The vehicle's color, TraCI may change this.
const int VTYPEPARS_LATALIGNMENT_SET
const int VEHPARS_FORCE_REROUTE
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
description of a vehicle type
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.
double impatience
The vehicle's impatience (willingness to obstruct others)
const int VTYPEPARS_HASDRIVERSTATE_SET
std::string vtypeid
The vehicle's type id.
static std::set< SumoXMLAttr > allowedJMAttrs
allowed attrs for the junction model
static SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
a flow definitio nusing a from-to edges instead of a route (used by router)
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
virtual std::string getName(int attr) const =0
Converts the given attribute id into a man readable string.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
void parse(const std::string &description, const bool hardFail)
Overwrite by parsable distribution description.
SUMOVehicleShape shape
This class' shape.
Structure representing possible vehicle parameter.
const int VTYPEPARS_MINGAP_LAT_SET
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT) ...
static SUMOVTypeParameter * beginVTypeParsing(const SUMOSAXAttributes &attrs, const bool hardFail, const std::string &file)
Starts to parse a vehicle type.
const int VEHPARS_PROB_SET
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
double defaultProbability
The probability when being added to a distribution without an explicit probability.
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.
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
int containerCapacity
The container capacity of the vehicle.
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color) ...
const int VTYPEPARS_BOARDING_DURATION
static SUMOVehicleParameter * handleError(const bool hardFail, bool &abortCreation, const std::string &message)
handle error loading SUMOVehicleParameter
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
weights: time range begin
double arrivalPosLat
(optional) The lateral position the vehicle shall arrive on
static SUMOTime processActionStepLength(double given)
Checks and converts given value for the action step length from seconds to miliseconds assuring it be...
static LCAttrMap allowedLCModelAttrs
allowed attrs for each known LC-model
std::vector< double > & getParameter()
Returns the parameters of this distribution.
const int VEHPARS_ARRIVALLANE_SET
const std::string & getObjectType() const
return the objecttype to which these attributes belong
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
const int VTYPEPARS_CAR_FOLLOW_MODEL
const int VTYPEPARS_OSGFILE_SET
ArrivalPosLatDefinition
Possible ways to choose the departure position.
const int VTYPEPARS_MAXSPEED_LAT_SET
const int VTYPEPARS_PROBABILITY_SET
const int VEHPARS_NUMBER_SET
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.
#define WRITE_WARNING(msg)
static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
double height
This class' height.
std::string toTaz
The vehicle's destination zone (district)
const int VTYPEPARS_LANE_CHANGE_MODEL_SET
const int VEHPARS_ARRIVALSPEED_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 departSpeed
(optional) The initial speed of the vehicle
static const CFAttrMap & getAllowedCFModelAttrs()
returns allowed attrs for each known CF-model (init on first use)
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
DepartLaneDefinition
Possible ways to choose a lane on depart.
double maxSpeed
The vehicle type's maximum speed [m/s].
double width
This class' width.
SUMOTime boardingDuration
The time a person needs to board the vehicle.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const int VTYPEPARS_ACTIONSTEPLENGTH_SET
std::string routeid
The vehicle's route id.
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
Encapsulated SAX-Attributes.
const int VEHPARS_DEPARTSPEED_SET
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter ...
static bool isAbsolute(const std::string &path)
Returns the information whether the given path is absolute.
std::string osgFile
3D model file for this class
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
std::map< SumoXMLTag, std::set< SumoXMLAttr > > CFAttrMap
Car-Following attributes map.
T get(const std::string &str) const
static SUMOVehicleParameter * parseFlowAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, const SUMOTime beginDefault, const SUMOTime endDefault, bool isPerson=false)
Parses a flow's attributes.
std::string imgFile
Image file for this class.
static bool parseJMParams(SUMOVTypeParameter &into, const SUMOSAXAttributes &attrs, const bool hardFail)
Parses junction model attributes.
const int VEHPARS_DEPARTPOSLAT_SET
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
SUMOTime string2time(const std::string &r)
const int VEHPARS_ROUTE_SET
std::string fromTaz
The vehicle's origin zone (district)
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.
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
const int VEHPARS_PERIOD_SET
const int VTYPEPARS_LOADING_DURATION
const int VTYPEPARS_CONTAINER_CAPACITY
const int VEHPARS_COLOR_SET
static std::string parseID(const SUMOSAXAttributes &attrs, const SumoXMLTag element)
parse ID
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons) ...
vehicle is a passenger car (a "normal" car)
const int VEHPARS_FROM_TAZ_SET
const int VEHPARS_END_SET
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
std::string line
The vehicle's line (mainly for public transport)
const int VTYPEPARS_SPEEDFACTOR_SET
double arrivalPos
(optional) The position the vehicle shall arrive on
static StringBijection< TrainType > TrainTypes
train types
DepartSpeedDefinition
Possible ways to choose the departure speed.
double maxSpeedLat
The vehicle type's maximum lateral speed [m/s].
int parametersSet
Information for the router which parameter were set.
const int VEHPARS_ARRIVALPOSLAT_SET
double departPosLat
(optional) The lateral position the vehicle shall depart from
const int VEHPARS_LINE_SET
const int VEHPARS_ARRIVALPOS_SET
int personCapacity
The person capacity of the vehicle.
bool hasDriverState
Whether vehicles of this type are equipped with a driver (i.e. MSDriverState))
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
double departPos
(optional) The position the vehicle shall depart from
double minGapLat
The vehicle type's minimum lateral gap [m].
static const RGBColor YELLOW
static void parseCommonAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, SUMOVehicleParameter *ret, std::string element)
Parses attributes common to vehicles and flows.
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.
Structure representing possible vehicle parameter.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
static SUMOEmissionClass getClassByName(const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING)
Checks whether the string describes a known vehicle class.
const std::string DEFAULT_PEDTYPE_ID
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.
SubParams jmParameter
Junction-model parameter.
const int VTYPEPARS_IMGFILE_SET
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.
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.
SubParams cfParameter
Car-following parameter.
SUMOTime loadingDuration
The time a container needs to get loaded on the vehicle.
SumoXMLTag tag
The vehicle tag.
const int VEHPARS_DEPARTLANE_SET
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 containerNumber
The static number of containers in the vehicle when it departs.
std::string id
The vehicle type's id.
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.
const int VTYPEPARS_PERSON_CAPACITY
static CFAttrMap allowedCFModelAttrs
allowed attrs for each known CF-model
LateralAlignment latAlignment
The vehicles desired lateral alignment.
SUMOTime actionStepLength
The vehicle type's default actionStepLength [ms], i.e. the interval between two control actions...
const int VEHPARS_VTYPE_SET
double minGap
This class' free space in front of the vehicle itself.
const int VTYPEPARS_HEIGHT_SET
ArrivalPosDefinition
Possible ways to choose the arrival position.
const int VEHPARS_VPH_SET
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
a single trip definition (used by router)
const int VTYPEPARS_WIDTH_SET
static StringBijection< int > Tags
The names of SUMO-XML elements for use in netbuild.
const int VEHPARS_DEPARTPOS_SET
const int VEHPARS_PERSON_NUMBER_SET
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.
LaneChangeModel lcModel
The lane-change model to use.
const int VTYPEPARS_LENGTH_SET
DepartPosDefinition
Possible ways to choose the departure position.
const int VTYPEPARS_VEHICLECLASS_SET
const int VEHPARS_CONTAINER_NUMBER_SET
const int VTYPEPARS_EMISSIONCLASS_SET
The maximum arrival position is used.
static bool parseLCParams(SUMOVTypeParameter &into, LaneChangeModel model, const SUMOSAXAttributes &attrs, const bool hardFail)
Parses lane change model attributes.
const int VTYPEPARS_COLOR_SET
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street...
const int VTYPEPARS_SHAPE_SET
double length
The physical vehicle length.
SubParams lcParameter
Lane-changing parameter.
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
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.
SUMOEmissionClass emissionClass
The emission class of this vehicle.
vehicles ignoring classes
std::map< LaneChangeModel, std::set< SumoXMLAttr > > LCAttrMap
Lane-Change-Model attributes map.
bool isValid(std::string &error)
check whether the distribution is valid
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
std::string id
The vehicle's id.
const int VTYPEPARS_IMPATIENCE_SET
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.
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.
The arrival position is chosen randomly.
DepartPosLatDefinition departPosLatProcedure
Information how the vehicle shall choose the lateral departure position.