 |
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.
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.
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.
No information given; use default.
std::string lane
The lane to stop at.
RGBColor color
The vehicle's color, TraCI may change this.
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.
The arrival position is chosen randomly.
std::string getDepartSpeed() const
obtain depart speed parameter in string format
double departSpeed
(optional) The initial speed of the vehicle
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 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.
At the leftmost side of the lane.
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.
The current speed is used.
ArrivalPosLatDefinition
Possible ways to choose the departure position.
The least occupied lane from best lanes.
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.
At the rightmost side of the lane.
const int VEHPARS_PROB_SET
const int VEHPARS_DEPARTSPEED_SET
The maximum lane speed is used (speedLimit)
SumoXMLTag tag
The vehicle tag.
std::string getDepartPosLat() const
obtain depart pos lat parameter in string format
The least occupied lane from lanes which allow the continuation.
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)
A free lateral position is chosen.
Tag for the last element in the enum for safe int casting.
The lane is chosen randomly.
std::string tripId
id of the trip within a cyclical public transport route
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.
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
The maximum lane speed is used (speedLimit * speedFactor)
std::string getDepart() const
obtain depart parameter in string format
Tag for the last element in the enum for safe int casting.
At the leftmost side of the lane.
const int VEHPARS_COLOR_SET
Tag for the last element in the enum for safe int casting.
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.
No information given; use default.
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)
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)
The departure is person triggered.
double endPos
The stopping position end.
const int VEHPARS_ARRIVALPOSLAT_SET
The current lane shall be used.
The speed is chosen randomly.
The position is chosen randomly.
Tag for the last element in the enum for safe int casting.
std::string routeid
The vehicle's route id.
std::string getDepartPos() const
obtain depart pos parameter in string format
std::string getDepartLane() const
obtain depart lane parameter in string format
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
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
No information given; use default.
const int VEHPARS_PERSON_NUMBER_SET
const int VEHPARS_FROM_TAZ_SET
The lateral position is chosen randomly.
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.
At the center of the lane.
ArrivalPosLatDefinition arrivalPosLatProcedure
Information how the vehicle shall choose the lateral arrival position.
const int STOP_EXPECTED_SET
The maximum safe speed is used.
No information given; use default.
const int VEHPARS_TO_TAZ_SET
const int STOP_TRIGGER_SET
const int STOP_CONTAINER_TRIGGER_SET
The maximum arrival position is used.
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)
double speedFactor
individual speedFactor (overriding distribution from vType)
double speed
the speed at which this stop counts as reached (waypoint mode)
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.
At the center of the lane.
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
The least occupied lane is used.
const double MIN_STOP_LENGTH
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.
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.