20 #ifndef SUMOVehicleParameter_h 21 #define SUMOVehicleParameter_h 338 static bool parseDepart(
const std::string& val,
const std::string& element,
const std::string&
id,
350 static bool parseDepartLane(
const std::string& val,
const std::string& element,
const std::string&
id,
362 static bool parseDepartPos(
const std::string& val,
const std::string& element,
const std::string&
id,
374 static bool parseDepartPosLat(
const std::string& val,
const std::string& element,
const std::string&
id,
386 static bool parseDepartSpeed(
const std::string& val,
const std::string& element,
const std::string&
id,
398 static bool parseArrivalLane(
const std::string& val,
const std::string& element,
const std::string&
id,
410 static bool parseArrivalPos(
const std::string& val,
const std::string& element,
const std::string&
id,
422 static bool parseArrivalPosLat(
const std::string& val,
const std::string& element,
const std::string&
id,
435 static bool parseArrivalSpeed(
const std::string& val,
const std::string& element,
const std::string&
id,
456 static bool parsePersonModes(
const std::string& modes,
const std::string& element,
const std::string&
id,
SVCPermissions& modeSet, std::string& error);
628 std::vector<std::tuple<std::string, double, double> >
accessPos;
641 mutable std::vector<std::string>
via;
The departure is person triggered.
const int VEHPARS_TO_TAZ_SET
The current lane shall be used.
const int STOP_CONTAINER_TRIGGER_SET
virtual ~SUMOVehicleParameter()
Destructor.
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
No information given; use default.
SumoXMLTag
Numbers representing SUMO-XML - element names.
RGBColor color
The vehicle's color, TraCI may change this.
const double MIN_STOP_LENGTH
A free lateral position is chosen.
std::string lane
The lane to stop at.
const int VEHPARS_FORCE_REROUTE
At the leftmost side of the lane.
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
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.
The vehicle is discarded if emission fails (not fully implemented yet)
bool defaultOptionOverrides(const OptionsCont &oc, const std::string &optionName) const
Returns whether the defaults shall be used.
std::string vtypeid
The vehicle's type id.
Tag for the last element in the enum for safe int casting.
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
Tag for the last element in the enum for safe int casting.
The departure is container triggered.
At the leftmost side of the lane.
const int VEHPARS_PROB_SET
std::string getArrivalSpeed() const
obtain arrival speed parameter in string format
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
std::string line
the new line id of the trip within a cyclical public transport route
double repetitionProbability
The probability for emitting a vehicle per second.
The lateral position is chosen randomly.
Tag for the last element in the enum for safe int casting.
The least occupied lane is used.
If a fixed number of random choices fails, a free lateral position is chosen.
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color) ...
int repetitionsDone
The number of times the vehicle was already inserted.
std::string getArrivalPosLat() const
obtain arrival pos lat parameter in string format
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
double arrivalPosLat
(optional) The lateral position the vehicle shall arrive on
std::string busstop
(Optional) bus stop if one is assigned to the stop
int parametersSet
Information for the output which parameter were set.
std::string getDepartPosLat() const
obtain depart pos lat parameter in string format
const int VEHPARS_ARRIVALLANE_SET
The speed is chosen randomly.
Tag for the last element in the enum for safe int casting.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
The lane is chosen randomly.
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
The arrival position is given.
ArrivalPosLatDefinition
Possible ways to choose the departure position.
std::string parkingarea
(Optional) parking area if one is assigned to the stop
const int VEHPARS_NUMBER_SET
The least occupied lane from best lanes.
The position is chosen randomly.
Tag for the last element in the enum for safe int casting.
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
bool triggered
whether an arriving person lets the vehicle continue
std::string toTaz
The vehicle's destination zone (district)
std::string tripId
id of the trip within a cyclical public transport route
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
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
SUMOVehicleParameter()
Constructor.
No information given; use default.
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
DepartLaneDefinition
Possible ways to choose a lane on depart.
std::string routeid
The vehicle's route id.
At the center of the lane.
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
The least occupied lane from lanes which allow the continuation.
const int VEHPARS_DEPARTSPEED_SET
std::string getDepartPos() const
obtain depart pos parameter in string format
The current speed is used.
SUMOTime until
The time at which the vehicle may continue its journey.
std::string getArrivalPos() const
obtain arrival pos parameter in string format
At the rightmost side of the lane.
const int VEHPARS_DEPARTPOSLAT_SET
The maximum safe speed is used.
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
void write(OutputDevice &dev, const OptionsCont &oc, const SumoXMLTag tag=SUMO_TAG_VEHICLE, const std::string &typeID="") const
Writes the parameters as a beginning element.
const int STOP_TRIP_ID_SET
The maximum lane speed is used (speedLimit * speedFactor)
const int VEHPARS_ROUTE_SET
std::string fromTaz
The vehicle's origin zone (district)
No information given; use default.
Tag for the last element in the enum for safe int casting.
const int STOP_EXPECTED_SET
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.
void write(OutputDevice &dev) const
Writes the stop as XML.
const int VEHPARS_PERIOD_SET
double endPos
The stopping position end.
An upper class for objects with additional parameters.
const int VEHPARS_COLOR_SET
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons) ...
If a fixed number of random choices fails, a free position is chosen.
std::string getArrivalLane() const
obtain arrival lane parameter in string format
const int VEHPARS_FROM_TAZ_SET
The rightmost lane the vehicle may use.
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)
The maximum lane speed is used (speedLimit)
double arrivalPos
(optional) The position the vehicle shall arrive on
DepartSpeedDefinition
Possible ways to choose the departure speed.
Definition of vehicle stop (position and duration)
int index
at which position in the stops list
const int VEHPARS_VIA_SET
std::vector< std::string > via
List of the via-edges the vehicle must visit.
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
No information given; use default.
const int STOP_PARKING_SET
double departPos
(optional) The position the vehicle shall depart from
double startPos
The stopping position start.
const int STOP_TRIGGER_SET
Structure representing possible vehicle parameter.
std::string getDepartLane() const
obtain depart lane parameter in string format
std::vector< std::tuple< std::string, double, double > > accessPos
lanes and positions connected to this stop (only used by duarouter where Stop is used to store stoppi...
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.
const int STOP_EXPECTED_CONTAINERS_SET
bool containerTriggered
whether an arriving container lets the vehicle continue
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.
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.
At the rightmost side of the lane.
At the center of the lane.
SumoXMLTag tag
The vehicle tag.
A storage for options typed value containers)
Tag for the last element in the enum for safe int casting.
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.
No information given; use default.
The arrival lane is given.
int containerNumber
The static number of containers in the vehicle when it departs.
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.
No information given; use default.
std::string getDepartSpeed() const
obtain depart speed parameter in string format
bool wasSet(int what) const
Returns whether the given parameter was set.
const int VEHPARS_VTYPE_SET
No information given; use default.
Static storage of an output device and its base (abstract) implementation.
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)
std::string getDepart() const
obtain depart parameter in string format
std::string chargingStation
(Optional) charging station if one is assigned to the stop
std::string containerstop
(Optional) container stop if one is assigned to the stop
No information given; use default.
A free position is chosen.
const int VEHPARS_DEPARTPOS_SET
Insert behind the last vehicle as close as possible to still allow the specified departSpeed. Fallback to DEPART_POS_BASE if there is no vehicle on the departLane yet.
const int VEHPARS_PERSON_NUMBER_SET
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.
Tag for the last element in the enum for safe int casting.
Tag for the last element in the enum for safe int casting.
DepartPosDefinition
Possible ways to choose the departure position.
const int VEHPARS_CONTAINER_NUMBER_SET
The maximum arrival position is used.
SUMOTime duration
The stopping duration.
const int VEHPARS_PERSON_CAPACITY_SET
DepartDefinition
Possible ways to depart.
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.
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
bool parking
whether the vehicle is removed from the net while stopping
std::string id
The vehicle's id.
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
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.