23 #ifndef SUMOVehicleParameter_h 24 #define SUMOVehicleParameter_h 283 static bool parseDepart(
const std::string& val,
const std::string& element,
const std::string&
id,
296 static bool parseDepartLane(
const std::string& val,
const std::string& element,
const std::string&
id,
309 static bool parseDepartPos(
const std::string& val,
const std::string& element,
const std::string&
id,
322 static bool parseDepartSpeed(
const std::string& val,
const std::string& element,
const std::string&
id,
335 static bool parseArrivalLane(
const std::string& val,
const std::string& element,
const std::string&
id,
348 static bool parseArrivalPos(
const std::string& val,
const std::string& element,
const std::string&
id,
361 static bool parseArrivalSpeed(
const std::string& val,
const std::string& element,
const std::string&
id,
The departure is person triggered.
const int VEHPARS_TO_TAZ_SET
The current lane shall be used.
const int STOP_CONTAINER_TRIGGER_SET
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
No information given; use default.
SUMOReal repetitionProbability
The probability for emitting a vehicle per second.
SumoXMLTag
Numbers representing SUMO-XML - element names.
RGBColor color
The vehicle's color.
const int VEHPARS_FORCE_REROUTE
static bool parseDepartSpeed(const std::string &val, const std::string &element, const std::string &id, SUMOReal &speed, DepartSpeedDefinition &dsd, std::string &error)
Validates a given departSpeed value.
std::string containerstop
(Optional) container stop if one is assigned to the stop
The vehicle is discarded if emission fails (not fully implemented yet)
int repetitionNumber
The number of times the vehicle shall be repeatedly inserted.
std::string vtypeid
The vehicle's type id.
bool parking
whether the vehicle is removed from the net while stopping
static bool parseArrivalPos(const std::string &val, const std::string &element, const std::string &id, SUMOReal &pos, ArrivalPosDefinition &apd, std::string &error)
Validates a given arrivalPos value.
ArrivalLaneDefinition
Possible ways to choose the arrival lane.
SUMOTime duration
The stopping duration.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
The departure is container triggered.
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
SUMOReal departSpeed
(optional) The initial speed of the vehicle
Tag for the last element in the enum for safe int casting.
SUMOReal arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
The least occupied lane is used.
int repetitionsDone
The number of times the vehicle was already inserted.
const int VEHPARS_PERIODNUM_SET
SUMOReal arrivalPos
(optional) The position the vehicle shall arrive on
const int VEHPARS_ARRIVALLANE_SET
The speed is chosen randomly.
Tag for the last element in the enum for safe int casting.
SUMOTime until
The time at which the vehicle may continue its journey.
void write(OutputDevice &dev) const
Writes the stop as XML.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
The lane is chosen randomly.
unsigned int personNumber
The static number of persons in the vehicle when it departs (not including boarding persons) ...
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
The arrival position is given.
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.
std::string toTaz
The vehicle's destination zone (district)
std::vector< Stop > stops
List of the stops the vehicle will make.
const int VEHPARS_ARRIVALSPEED_SET
static SUMOReal interpretEdgePos(SUMOReal pos, SUMOReal maximumValue, SumoXMLAttr attr, const std::string &id)
Interprets negative edge positions and fits them onto a given edge.
std::string busstop
(Optional) bus stop if one is assigned to the stop
SUMOVehicleParameter()
Constructor.
bool defaultOptionOverrides(const OptionsCont &oc, const std::string &optionName) const
Returns whether the defaults shall be used.
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
SUMOReal startPos
The stopping position start.
DepartLaneDefinition
Possible ways to choose a lane on depart.
std::string routeid
The vehicle's route id.
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
The least occupied lane from lanes which allow the continuation.
bool wasSet(int what) const
Returns whether the given parameter was set.
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
const int VEHPARS_DEPARTSPEED_SET
std::string chargingStation
(Optional) charging station if one is assigned to the stop
SUMOReal endPos
The stopping position end.
The current speed is used.
bool triggered
whether an arriving person lets the vehicle continue
int arrivalLane
(optional) The lane the vehicle shall arrive on (not used yet)
SUMOTime depart
The vehicle's departure time.
The maximum 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
Writes the parameters as a beginning element.
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.
An upper class for objects with additional parameters.
const int VEHPARS_COLOR_SET
If a fixed number of random choices fails, a free position is chosen.
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, SUMOReal &pos, DepartPosDefinition &dpd, std::string &error)
Validates a given departPos value.
const int VEHPARS_FROM_TAZ_SET
The rightmost lane the vehicle may use.
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
std::string line
The vehicle's line (mainly for public transport)
DepartSpeedDefinition
Possible ways to choose the departure speed.
std::string lane
The lane to stop at.
const int VEHPARS_LINE_SET
static bool parseArrivalSpeed(const std::string &val, const std::string &element, const std::string &id, SUMOReal &speed, ArrivalSpeedDefinition &asd, std::string &error)
Validates a given arrivalSpeed value.
const int VEHPARS_ARRIVALPOS_SET
No information given; use default.
const int STOP_PARKING_SET
const int STOP_TRIGGER_SET
Structure representing possible vehicle parameter.
const int VEHPARS_PERIODFREQ_SET
const int STOP_EXPECTED_CONTAINERS_SET
int setParameter
Information for the router which parameter were set.
Definition of vehicle stop (position and duration)
A storage for options typed value containers)
Tag for the last element in the enum for safe int casting.
const int VEHPARS_DEPARTLANE_SET
int index
at which position in the stops list
No information given; use default.
The arrival lane is given.
int setParameter
Information for the output which parameter were set.
SUMOReal departPos
(optional) The position the vehicle shall depart from
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.
No information given; use default.
A free position is chosen.
std::multimap< std::string, SUMOReal > accessPos
lanes and positions connected to this stop
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
unsigned int containerNumber
The static number of containers in the vehicle when it departs.
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.
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.
std::string id
The vehicle's id.
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.