 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef SUMOVehicleParameter_h
20 #define SUMOVehicleParameter_h
344 static bool parseDepart(
const std::string& val,
const std::string& element,
const std::string&
id,
356 static bool parseDepartLane(
const std::string& val,
const std::string& element,
const std::string&
id,
368 static bool parseDepartPos(
const std::string& val,
const std::string& element,
const std::string&
id,
380 static bool parseDepartPosLat(
const std::string& val,
const std::string& element,
const std::string&
id,
392 static bool parseDepartSpeed(
const std::string& val,
const std::string& element,
const std::string&
id,
404 static bool parseArrivalLane(
const std::string& val,
const std::string& element,
const std::string&
id,
416 static bool parseArrivalPos(
const std::string& val,
const std::string& element,
const std::string&
id,
428 static bool parseArrivalPosLat(
const std::string& val,
const std::string& element,
const std::string&
id,
441 static bool parseArrivalSpeed(
const std::string& val,
const std::string& element,
const std::string&
id,
462 static bool parsePersonModes(
const std::string& modes,
const std::string& element,
const std::string&
id,
SVCPermissions& modeSet, std::string& error);
646 std::vector<std::tuple<std::string, double, double> >
accessPos;
659 mutable std::vector<std::string>
via;
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons)
int containerNumber
The static number of containers in the vehicle when it departs.
@ ARRIVAL_POS_GIVEN
The arrival position is given.
bool wasSet(int what) const
Returns whether the given parameter was set.
ArrivalPosDefinition
Possible ways to choose the arrival position.
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color)
An upper class for objects with additional parameters.
@ DEPART_POSLAT_RANDOM_FREE
If a fixed number of random choices fails, a free lateral position is chosen.
bool friendlyPos
enable or disable friendly position (used by NETEDIT)
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
@ ARRIVAL_SPEED_DEFAULT
No information given; use default.
std::string lane
The lane to stop at.
RGBColor color
The vehicle's color, TraCI may change this.
@ ARRIVAL_LANE_GIVEN
The arrival lane is given.
std::string getArrivalPos() const
obtain arrival pos parameter in string format
Static storage of an output device and its base (abstract) implementation.
@ ARRIVAL_POS_RANDOM
The arrival position is chosen randomly.
std::string getDepartSpeed() const
obtain depart speed parameter in string format
@ ARRIVAL_POSLAT_GIVEN
The position is given.
double departSpeed
(optional) The initial speed of the vehicle
@ ARRIVAL_LANE_DEFAULT
No information given; use default.
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.
const int VEHPARS_NUMBER_SET
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
@ DEPART_POS_STOP
depart position is endPos of first stop
const int VEHPARS_FORCE_REROUTE
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.
std::string busstop
(Optional) bus stop if one is assigned to the stop
int parametersSet
Information for the output which parameter were set.
@ DEPART_POSLAT_LEFT
At the leftmost side of the lane.
@ DEPART_POS_DEFAULT
No information given; use default.
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.
@ ARRIVAL_SPEED_CURRENT
The current speed is used.
ArrivalPosLatDefinition
Possible ways to choose the departure position.
@ DEPART_LANE_BEST_FREE
The least occupied lane from best lanes.
@ DEPART_POS_LAST
Insert behind the last vehicle as close as possible to still allow the specified departSpeed....
DepartDefinition
Possible ways to depart.
const int VEHPARS_ARRIVALSPEED_SET
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
std::string line
the new line id of the trip within a cyclical public transport route
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.
std::string parkingarea
(Optional) parking area if one is assigned to the stop
Structure representing possible vehicle parameter.
const int STOP_EXTENSION_SET
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_TRIP_ID_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.
bool triggered
whether an arriving person lets the vehicle continue
SUMOVehicleParameter()
Constructor.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ DEPART_POSLAT_RIGHT
At the rightmost side of the lane.
const int VEHPARS_PROB_SET
const int VEHPARS_DEPARTSPEED_SET
@ DEPART_SPEED_LIMIT
The maximum lane speed is used (speedLimit)
SumoXMLTag tag
The vehicle tag.
std::string getDepartPosLat() const
obtain depart pos lat parameter in string format
@ DEPART_LANE_ALLOWED_FREE
The least occupied lane from lanes which allow the continuation.
@ ARRIVAL_POSLAT_DEFAULT
No information given; use default.
const int VEHPARS_ARRIVALLANE_SET
const int VEHPARS_ROUTE_SET
std::string line
The vehicle's line (mainly for public transport)
@ DEPART_POSLAT_FREE
A free lateral position is chosen.
@ DEPART_POSLAT_DEF_MAX
Tag for the last element in the enum for safe int casting.
@ DEPART_LANE_RANDOM
The lane is chosen randomly.
std::string tripId
id of the trip within a cyclical public transport route
@ ARRIVAL_POSLAT_RIGHT
At the rightmost side of the lane.
const int VEHPARS_ARRIVALPOS_SET
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.
@ DEPART_POS_FREE
A free position is chosen.
std::string getArrivalPosLat() const
obtain arrival pos lat parameter in string format
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
@ DEPART_SPEED_DESIRED
The maximum lane speed is used (speedLimit * speedFactor)
std::string getDepart() const
obtain depart parameter in string format
@ ARRIVAL_POSLAT_DEF_MAX
Tag for the last element in the enum for safe int casting.
@ ARRIVAL_POSLAT_LEFT
At the leftmost side of the lane.
const int VEHPARS_COLOR_SET
@ ARRIVAL_POS_DEF_MAX
Tag for the last element in the enum for safe int casting.
@ DEPART_SPEED_GIVEN
The speed is given.
@ DEPART_SPEED_DEF_MAX
Tag for the last element in the enum for safe int casting.
SUMOTime until
The time at which the vehicle may continue its journey.
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.
@ ARRIVAL_POS_DEFAULT
No information given; use default.
@ DEPART_LANE_GIVEN
The lane is given.
std::string id
The vehicle's id.
virtual ~SUMOVehicleParameter()
Destructor.
double repetitionProbability
The probability for emitting a vehicle per second.
const int VEHPARS_VIA_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)
@ ARRIVAL_LANE_DEF_MAX
Tag for the last element in the enum for safe int casting.
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
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.
int repetitionsDone
The number of times the vehicle was already inserted.
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.
void write(OutputDevice &dev) const
Writes the stop as XML.
A storage for options typed value containers)
@ DEPART_TRIGGERED
The departure is person triggered.
double endPos
The stopping position end.
const int VEHPARS_ARRIVALPOSLAT_SET
@ ARRIVAL_LANE_CURRENT
The current lane shall be used.
@ DEPART_SPEED_RANDOM
The speed is chosen randomly.
@ DEPART_POS_RANDOM
The position is chosen randomly.
@ DEPART_DEF_MAX
Tag for the last element in the enum for safe int casting.
std::string routeid
The vehicle's route id.
@ ARRIVAL_SPEED_GIVEN
The speed is given.
std::string getDepartPos() const
obtain depart pos parameter in string format
@ SUMO_TAG_VEHICLE
description of a vehicle
std::string getDepartLane() const
obtain depart lane parameter in string format
@ ARRIVAL_SPEED_DEF_MAX
Tag for the last element in the enum for safe int casting.
const int VEHPARS_VPH_SET
double departPosLat
(optional) The lateral position the vehicle shall depart from
const int VEHPARS_DEPARTLANE_SET
std::string actType
act Type (only used by Persons) (used by NETEDIT)
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.
double startPos
The stopping position start.
DepartLaneDefinition
Possible ways to choose a lane on depart.
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
const int VEHPARS_SPEEDFACTOR_SET
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...
const int VEHPARS_VTYPE_SET
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
bool containerTriggered
whether an arriving container lets the vehicle continue
const int VEHPARS_DEPARTPOSLAT_SET
@ DEPART_LANE_DEF_MAX
Tag for the last element in the enum for safe int casting.
std::vector< std::string > via
List of the via-edges the vehicle must visit.
int index
at which position in the stops list
const int VEHPARS_CONTAINER_NUMBER_SET
const int VEHPARS_DEPARTPOS_SET
@ DEPART_POSLAT_DEFAULT
No information given; use default.
const int VEHPARS_PERSON_NUMBER_SET
const int VEHPARS_FROM_TAZ_SET
@ DEPART_POSLAT_RANDOM
The lateral position is chosen randomly.
@ DEPART_POS_RANDOM_FREE
If a fixed number of random choices fails, a free position is chosen.
SUMOTime extension
The maximum time extension for boarding / loading.
const int STOP_DURATION_SET
DepartPosDefinition
Possible ways to choose the departure position.
@ DEPART_GIVEN
The time is given.
@ ARRIVAL_POSLAT_CENTER
At the center of the lane.
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
const int STOP_EXPECTED_SET
@ DEPART_SPEED_MAX
The maximum safe speed is used.
@ DEPART_LANE_DEFAULT
No information given; use default.
const int VEHPARS_TO_TAZ_SET
const int STOP_TRIGGER_SET
const int STOP_CONTAINER_TRIGGER_SET
@ ARRIVAL_POS_MAX
The maximum arrival position is used.
@ DEPART_POS_BASE
Back-at-zero position.
@ DEPART_SPEED_DEFAULT
No information given; use default.
const int STOP_EXPECTED_CONTAINERS_SET
const int STOP_PARKING_SET
const int VEHPARS_PERSON_CAPACITY_SET
DepartSpeedDefinition
Possible ways to choose the departure speed.
const int VEHPARS_PERIOD_SET
std::string toTaz
The vehicle's destination zone (district)
@ ARRIVAL_POS_CENTER
Half the road length.
@ DEPART_POS_GIVEN
The position is given.
double speedFactor
individual speedFactor (overriding distribution from vType)
double speed
the speed at which this stop counts as reached (waypoint mode)
@ DEPART_POS_DEF_MAX
Tag for the last element in the enum for safe int casting.
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.
SUMOTime duration
The stopping duration.
@ DEPART_POSLAT_CENTER
At the center of the lane.
@ DEPART_CONTAINER_TRIGGERED
The departure is container triggered.
const int VEHPARS_END_SET
std::string getArrivalLane() const
obtain arrival lane parameter in string format
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
bool parking
whether the vehicle is removed from the net while stopping
std::string chargingStation
(Optional) charging station if one is assigned to the stop
std::string getArrivalSpeed() const
obtain arrival speed parameter in string format
std::string containerstop
(Optional) container stop if one is assigned to the stop
@ DEPART_POSLAT_GIVEN
The position is given.
@ DEPART_LANE_FREE
The least occupied lane is used.
const double MIN_STOP_LENGTH
@ DEPART_LANE_FIRST_ALLOWED
The rightmost lane the vehicle may use.
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.
@ DEPART_NOW
The vehicle is discarded if emission fails (not fully implemented yet)
Definition of vehicle stop (position and duration)
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
ArrivalSpeedDefinition
Possible ways to choose the arrival speed.