33#define DEBUG_COND (myVehicle.isSelected())
66#define LC_ASSUMED_DECEL 1.0
117 myAccelerationLat(0),
119 myPreviousAngleOffset(0),
121 myLaneChangeCompletion(1.0),
122 myLaneChangeDirection(0),
123 myAlreadyChanged(false),
124 myShadowLane(nullptr),
125 myTargetLane(nullptr),
127 myLastLateralGapLeft(0.),
128 myLastLateralGapRight(0.),
130 myLastFollowerGap(0.),
131 myLastLeaderSecureGap(0.),
132 myLastFollowerSecureGap(0.),
133 myLastOrigLeaderGap(0.),
134 myLastOrigLeaderSecureGap(0.),
135 myLastLeaderSpeed(0),
136 myLastFollowerSpeed(0),
137 myLastOrigLeaderSpeed(0),
138 myDontResetLCGaps(false),
150 myLastLaneChangeOffset(0),
153 myPreviousManeuverDist(0.) {
206 myLeftLeaders = std::make_shared<MSLeaderDistanceInfo>(leaders);
207 }
else if (dir == 1) {
222 }
else if (dir == 1) {
241const std::shared_ptr<MSLeaderDistanceInfo>
245 }
else if (dir == 1) {
254const std::shared_ptr<MSLeaderDistanceInfo>
258 }
else if (dir == 1) {
270 if (neighLeader ==
nullptr) {
293 (neighLeader !=
nullptr && neighLeader->
isStopped()
294 && neighLeader->
getStops().front().busstop !=
nullptr
300 if (leader.first == 0) {
304 if (leader.first->getSpeed() < (80.0 / 3.6)) {
357 std::cout <<
SIMTIME <<
" veh=" <<
myVehicle.
getID() <<
" primaryLaneChanged source=" << source->
getID() <<
" target=" << target->
getID() <<
" stayOpposite\n";
407 if (maneuverDist != 0) {
427 return DIST2SPEED(maneuverDist / stepsToChange);
495#ifdef DEBUG_SHADOWLANE
497 std::cout <<
SIMTIME <<
" veh=" <<
myVehicle.
getID() <<
" posLat=" << posLat <<
" overlap=" << overlap <<
"\n";
503 }
else if (overlap > NUMERICAL_EPS) {
504 const int shadowDirection = posLat < 0 ? -1 : 1;
528 std::cout <<
SIMTIME <<
" cleanupShadowLane\n";
535 std::cout <<
SIMTIME <<
" cleanupShadowLane2\n";
547 std::cout <<
SIMTIME <<
" cleanupTargetLane\n";
554 std::cout <<
SIMTIME <<
" cleanupTargetLane\n";
556 if (*it !=
nullptr) {
582 }
else if (dir < 0) {
594#ifdef DEBUG_SHADOWLANE
596 std::cout <<
SIMTIME <<
" updateShadowLane()\n";
602 std::vector<MSLane*> passed;
607 assert(further.size() == 0);
610 assert(further.size() == furtherPosLat.size());
612 for (
int i = 0; i < (int)further.size(); ++i) {
614#ifdef DEBUG_SHADOWLANE
616 std::cout <<
SIMTIME <<
" further=" << further[i]->getID() <<
" (posLat=" << furtherPosLat[i] <<
") shadowFurther=" <<
Named::getIDSecure(shadowFurther) <<
"\n";
619 if (shadowFurther !=
nullptr && shadowFurther->
getLinkTo(passed.back()) !=
nullptr) {
620 passed.push_back(shadowFurther);
623 std::reverse(passed.begin(), passed.end());
632#ifdef DEBUG_SHADOWLANE
637 std::cout << std::endl;
641#ifdef DEBUG_SHADOWLANE
672#ifdef DEBUG_TARGET_LANE
677 <<
"\n oldTarget: " << (oldTarget ==
nullptr ?
"NULL" : oldTarget->
getID())
678 <<
" oldFurtherTargets: " <<
toString(oldFurtherTargets);
686 if (oldTargetLane !=
nullptr) {
687 oldTargetLane->resetManeuverReservation(&
myVehicle);
702 if (furtherTargetLane !=
nullptr) {
707#ifdef DEBUG_TARGET_LANE
736 if (targetDir == 0) {
779 if (remainingManeuverDist == 0) {
785 assert(remainingManeuverDist >= 0);
792 const double v0 = speed;
793 const double D = remainingManeuverDist;
794 const double b = decel;
811 const double vm = (wmax - wmin) / f;
812 double distSoFar = 0.;
813 double timeSoFar = 0.;
816 const double wmaxTime = (v0 - vm) / b;
817 const double d1 = wmax * wmaxTime;
822 timeSoFar += wmaxTime;
833 const double t = v / b;
834 const double d2 = (wmin + 0.5 * f * v) * t;
836 if (distSoFar + d2 >= D) {
838 const double x = 0.5 * f * b;
839 const double y = wmin + f * v;
843 const double p = 0.5 * y / x;
844 const double q = (D - distSoFar) / x;
845 assert(p * p - q > 0);
846 const double t2 = p + sqrt(p * p - q);
847 return timeSoFar + t2;
857 double maneuverDist = remainingManeuverDist;
858 const double vModel =
computeSpeedLat(maneuverDist, maneuverDist, urgent);
859 double result = D / vModel;
869 return timeSoFar + (D - distSoFar) / wmin;
917 const int dir = (newstate &
LCA_RIGHT) != 0 ? -1 : ((newstate &
LCA_LEFT) != 0 ? 1 : 0);
923 }
else if (((newstate &
LCA_RIGHT) != 0 && dir < 0)
924 || ((newstate &
LCA_LEFT) != 0 && dir > 0)) {
946 std::cout <<
" traci influenced maneuverDist=" << maneuverDist <<
"\n";
963 if (follower.first != 0) {
964 myLastFollowerGap = follower.second + follower.first->getVehicleType().getMinGap();
972 if (leader.first != 0) {
981 if (leader.first != 0) {
1017 for (
int i = rightmost; i <= leftmost; ++i) {
1019 if (vehDist.first != 0) {
1021 const MSVehicle* follower = vehDist.first;
1023 if (netGap < myLastFollowerGap && netGap >= 0) {
1037 for (
int i = rightmost; i <= leftmost; ++i) {
1039 if (vehDist.first != 0) {
1040 const MSVehicle* leader = vehDist.first;
1043 if (netGap < myLastLeaderGap && netGap >= 0) {
1057 for (
int i = rightmost; i <= leftmost; ++i) {
1059 if (vehDist.first != 0) {
1060 const MSVehicle* leader = vehDist.first;
1063 if (netGap < myLastOrigLeaderGap && netGap >= 0) {
1122 const double vStayBehind = nv->
getSpeed() - helpOvertakeSpeed;
1123 if (vSafeFollow >= vMaxDecel) {
1124 vSafe = vSafeFollow;
1126 vSafe =
MAX2(vMaxDecel, vStayBehind);
1136 std::vector<double> lcState;
1139 lcState.push_back(item.first);
1140 lcState.push_back((
double)item.second);
1156 double prev = std::numeric_limits<double>::max();
1157 while (bis >> token) {
1158 if (prev != std::numeric_limits<double>::max()) {
1160 prev = std::numeric_limits<double>::max();
1179 if (bestLaneOffset < -1) {
1181 }
else if (bestLaneOffset > 1) {
1194 if (backAndWaiting.first < 0) {
1218 return std::numeric_limits<double>::max();
std::pair< const MSVehicle *, double > CLeaderDist
#define WRITE_WARNING(msg)
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
const long long int VTYPEPARS_MAXSPEED_LAT_SET
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_MOTORCYCLE
vehicle is a motorcycle
@ SVC_EMERGENCY
public emergency vehicles
@ SVC_MOPED
vehicle is a moped
LaneChangeAction
The state of a vehicle's lane-change behavior.
@ LCA_UNKNOWN
The action has not been determined.
@ LCA_BLOCKED
blocked in all directions
@ LCA_URGENT
The action is urgent (to be defined by lc-model)
@ LCA_STAY
Needs to stay on the current lane.
@ LCA_LEFT
Wants go to the left.
@ LCA_STRATEGIC
The action is needed to follow the route (navigational lc)
@ LCA_AMBACKBLOCKER_STANDING
@ LCA_TRACI
The action is due to a TraCI request.
@ LCA_RIGHT
Wants go to the right.
@ SUMO_ATTR_LCA_ASSERTIVE
@ SUMO_ATTR_LCA_MAXDISTLATSTANDING
@ SUMO_ATTR_LCA_COOPERATIVE_HELPTIME
@ SUMO_ATTR_LCA_MAXSPEEDLATFACTOR
@ SUMO_ATTR_LCA_MAXSPEEDLATSTANDING
@ SUMO_ATTR_LCA_STRATEGIC_LOOKAHEAD
@ SUMO_ATTR_LCSTATE
The state of the lanechange model.
@ SUMO_ATTR_LCA_OVERTAKE_RIGHT
@ SUMO_ATTR_DIR
The abstract direction of a link.
@ SUMO_ATTR_TIME
trigger: the time of the step
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Interface for lane-change models.
bool isStrategicBlocked() const
double getForwardPos() const
get vehicle position relative to the forward direction lane
double myAccelerationLat
the current lateral acceleration
void setFollowerGaps(CLeaderDist follower, double secGap)
virtual double getExtraReservation(int bestLaneOffset, double neighExtraDist=0) const
std::vector< MSLane * > myFurtherTargetLanes
MSLane * updateTargetLane()
bool myAlreadyChanged
whether the vehicle has already moved this step
bool myAmOpposite
whether the vehicle is driving in the opposite direction
double getPreviousManeuverDist() const
std::shared_ptr< MSLeaderDistanceInfo > myRightFollowers
std::shared_ptr< MSLeaderDistanceInfo > myRightLeaders
virtual void setOwnState(const int state)
bool pastMidpoint() const
return whether the vehicle passed the midpoint of a continuous lane change maneuver
double myPreviousAngleOffset
the angle offset of the previous time step resulting from lane change and sigma
virtual double getAssumedDecelForLaneChangeDuration() const
Returns a deceleration value which is used for the estimation of the duration of a lane change.
virtual double computeSpeedLat(double latDist, double &maneuverDist, bool urgent) const
decides the next lateral speed depending on the remaining lane change distance to be covered and upda...
virtual double estimateLCDuration(const double speed, const double remainingManeuverDist, const double decel, bool urgent) const
Calculates the maximal time needed to complete a lane change maneuver if lcMaxSpeedLatFactor and lcMa...
virtual void resetSpeedLat()
std::shared_ptr< MSLeaderDistanceInfo > myLeftLeaders
int myPreviousState
lane changing state from the previous simulation step
double getManeuverDist() const
Returns the remaining unblocked distance for the current maneuver. (only used by sublane model)
int myOwnState
The current state of the vehicle.
double myLastOrigLeaderGap
acutal and secure distance to closest leader vehicle on the original when performing lane change
virtual bool predInteraction(const std::pair< MSVehicle *, double > &leader)
void laneChangeOutput(const std::string &tag, MSLane *source, MSLane *target, int direction, double maneuverDist=0)
called once the vehicle ends a lane change manoeuvre (non-instant)
virtual void prepareStep()
bool myDontResetLCGaps
Flag to prevent resetting the memorized values for LC relevant gaps until the LC output is triggered ...
int myPreviousState2
lane changing state from step before the previous simulation step
MSLane * getShadowLane() const
Returns the lane the vehicle's shadow is on during continuous/sublane lane change.
const std::shared_ptr< MSLeaderDistanceInfo > getFollowers(const int dir)
Returns the neighboring, lc-relevant followers for the last step in the requested direction.
double myLastLateralGapRight
double myCommittedSpeed
the speed when committing to a change maneuver
std::pair< int, int > mySavedStateLeft
void initLastLaneChangeOffset(int dir)
std::shared_ptr< MSLeaderDistanceInfo > myLeftFollowers
Cached info on lc-relevant neighboring vehicles.
static bool myLCOutput
whether to record lane-changing
bool startLaneChangeManeuver(MSLane *source, MSLane *target, int direction)
start the lane change maneuver and return whether it continues
virtual void saveState(OutputDevice &out) const
Save the state of the laneChangeModel.
std::pair< int, int > mySavedStateRight
double myLastLeaderSecureGap
the minimum longitudinal distances to vehicles on the target lane that would be necessary for stringe...
void endLaneChangeManeuver(const MSMoveReminder::Notification reason=MSMoveReminder::NOTIFICATION_LANE_CHANGE)
static const double NO_NEIGHBOR
void saveLCState(const int dir, int stateWithoutTraCI, const int state)
static bool myAllowOvertakingRight
whether overtaking on the right is permitted
std::vector< MSLink * > myApproachedByShadow
links which are approached by the shadow vehicle
bool canOvertakeRight(const MSVehicle *const nv, const double dist, const double maxSpeedDiff, const double helpOvertakeSpeed, double &vSafe, double &deltaV) const
void addLCSpeedAdvice(const double vSafe, bool ownAdvice=true)
Takes a vSafe (speed advice for speed in the next simulation step), converts it into an acceleration ...
static bool myLCStartedOutput
void setLeaderGaps(CLeaderDist, double secGap)
const std::shared_ptr< MSLeaderDistanceInfo > getLeaders(const int dir)
Returns the neighboring, lc-relevant leaders for the last step in the requested direction.
std::vector< MSLane * > myNoPartiallyOccupatedByShadow
int & getCanceledState(const int dir)
double myLastFollowerSpeed
double myMaxSpeedLatFactor
bool cancelRequest(int state, int laneOffset)
whether the influencer cancels the given request
double myLastLeaderGap
the actual minimum longitudinal distances to vehicles on the target lane
SUMOTime remainingTime() const
Compute the remaining time until LC completion.
void setOrigLeaderGaps(CLeaderDist, double secGap)
void setManeuverDist(const double dist)
Updates the remaining distance for the current maneuver while it is continued within non-action steps...
std::vector< std::pair< double, bool > > myLCAccelerationAdvices
void setShadowApproachingInformation(MSLink *link) const
set approach information for the shadow vehicle
double getCooperativeHelpSpeed(const MSLane *lane, double distToLaneEnd) const
return speed for helping a vehicle that is blocked from changing
virtual bool avoidOvertakeRight(const MSVehicle *const neighLeader, const bool allowProb=false) const
int getNormalizedLaneIndex()
brief return lane index that treats opposite lanes like normal lanes to the left of the forward lanes
static MSAbstractLaneChangeModel * build(LaneChangeModel lcm, MSVehicle &vehicle)
Factory method for instantiating new lane changing models.
void changedToOpposite()
called when a vehicle changes between lanes in opposite directions
void setSpeedLat(double speedLat)
set the lateral speed and update lateral acceleraton
MSLane * myTargetLane
The target lane for the vehicle's current maneuver.
MSLane * determineTargetLane(int &targetDir) const
double myPreviousManeuverDist
Maneuver distance from the previous simulation step.
double myOvertakeRightParam
static bool myLCEndedOutput
double getMaxSpeedLat2() const
return the max of maxSpeedLat and lcMaxSpeedLatStanding
std::vector< double > myShadowFurtherLanesPosLat
double myLastFollowerSecureGap
const MSCFModel & getCarFollowModel() const
The vehicle's car following model.
double myLastOrigLeaderSecureGap
double myLastOrigLeaderSpeed
MSLane * myShadowLane
A lane that is partially occupied by the front of the vehicle but that is not the primary lane.
double mySpeedLat
the current lateral speed
virtual void updateSafeLatDist(const double travelledLatDist)
Updates the value of safe lateral distances (in SL2015) during maneuver continuation in non-action st...
void checkTraCICommands()
Check for commands issued for the vehicle via TraCI and apply the appropriate state changes For the s...
double myManeuverDist
The complete lateral distance the vehicle wants to travel to finish its maneuver Only used by sublane...
int myLaneChangeDirection
direction of the lane change maneuver -1 means right, 1 means left
void primaryLaneChanged(MSLane *source, MSLane *target, int direction)
called once when the vehicles primary lane changes
int getShadowDirection() const
return the direction in which the current shadow lane lies
double myMaxSpeedLatStanding
double myLastLeaderSpeed
speeds of surrounding vehicles at the time of lane change
virtual void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the laneChangeModel from the given attributes.
MSAbstractLaneChangeModel(MSVehicle &v, const LaneChangeModel model)
Constructor.
MSVehicle & myVehicle
The vehicle this lane-changer belongs to.
double calcAngleOffset()
return the angle offset during a continuous change maneuver
SUMOTime myCooperativeHelpTime
double myAngleOffset
the current angle offset resulting from lane change and sigma
static const double UNDEFINED_LOOKAHEAD
double myLastLateralGapLeft
the minimum lateral gaps to other vehicles that were found when last changing to the left and right
SUMOTime myLastLaneChangeOffset
virtual ~MSAbstractLaneChangeModel()
Destructor.
static void initGlobalOptions(const OptionsCont &oc)
init global model parameters
void memorizeGapsAtLCInit()
Control for resetting the memorized values for LC relevant gaps until the LC output is triggered in t...
double myLaneChangeCompletion
progress of the lane change maneuver 0:started, 1:complete
virtual bool debugVehicle() const
whether the current vehicles shall be debugged
bool isChangingLanes() const
return true if the vehicle currently performs a lane change maneuver
std::vector< MSLane * > myShadowFurtherLanes
virtual bool congested(const MSVehicle *const neighLeader)
void clearNeighbors()
Clear info on neighboring vehicle from previous step.
void saveNeighbors(const int dir, const MSLeaderDistanceInfo &followers, const MSLeaderDistanceInfo &leaders)
Saves the lane change relevant vehicles, which are currently on neighboring lanes in the given direct...
void removeShadowApproachingInformation() const
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
double getLength() const
Returns the vehicle's length.
double getWidth() const
Returns the vehicle's width.
const std::list< MSStop > & getStops() const
const MSStop & getNextStop() const
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
bool isStopped() const
Returns whether the vehicle is at a stop.
virtual double interactionGap(const MSVehicle *const veh, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
virtual double minNextSpeed(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed given the current speed (depends on the numerical update scheme and its ste...
virtual double getSecureGap(const MSVehicle *const veh, const MSVehicle *const, const double speed, const double leaderSpeed, const double leaderMaxDecel) const
Returns the minimum gap to reserve if the leader is braking at maximum (>=0)
double getMaxDecel() const
Get the vehicle type's maximal comfortable deceleration [m/s^2].
virtual double getSpeedAfterMaxDecel(double v) const
Returns the velocity after maximum deceleration.
virtual double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const =0
Computes the vehicle's follow speed (no dawdling)
double stopSpeed(const MSVehicle *const veh, const double speed, double gap, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
A device which collects info on the vehicle trip (mainly on departure and arrival)
std::pair< double, SUMOTime > getLastBlocked(int index) const
retrieve properties of a blocked vehicle that wants to chane to the lane with the given index
static double gLateralResolution
static bool gLefthand
Whether lefthand-drive is being simulated.
static bool gSublane
whether sublane simulation is enabled (sublane model or continuous lanechanging)
static SUMOTime gLaneChangeDuration
A lane change model developed by D. Krajzewicz between 2004 and 2010.
A lane change model developed by D. Krajzewicz, J. Erdmann et al. between 2004 and 2013,...
A lane change model developed by D. Krajzewicz, J. Erdmann et al. between 2004 and 2013.
A lane change model developed by J. Erdmann.
Representation of a lane in the micro simulation.
MSLane * getParallelLane(int offset, bool includeOpposite=true) const
Returns the lane with the given offset parallel to this one or 0 if it does not exist.
virtual void resetManeuverReservation(MSVehicle *v)
Unregisters a vehicle, which previously registered for maneuvering into this lane.
const MSLink * getLinkTo(const MSLane *const) const
returns the link to the given lane or nullptr, if it is not connected
void forceVehicleInsertion(MSVehicle *veh, double pos, MSMoveReminder::Notification notification, double posLat=0)
Inserts the given vehicle at the given position.
double getSpeedLimit() const
Returns the lane's maximum allowed speed.
void enteredByLaneChange(MSVehicle *v)
const MSJunction * getToJunction() const
double getLength() const
Returns the lane's length.
const MSJunction * getFromJunction() const
virtual double setPartialOccupation(MSVehicle *v)
Sets the information about a vehicle lapping into this lane.
int getIndex() const
Returns the lane's index.
void leftByLaneChange(MSVehicle *v)
double getOppositePos(double pos) const
return the corresponding position on the opposite lane
virtual void resetPartialOccupation(MSVehicle *v)
Removes the information about a vehicle lapping into this lane.
virtual void setManeuverReservation(MSVehicle *v)
Registers the lane change intentions (towards this lane) for the given vehicle.
MSLane * getParallelOpposite() const
return the opposite direction lane of this lanes edge or nullptr
MSEdge & getEdge() const
Returns the lane's edge.
double getWidth() const
Returns the lane's width.
saves leader/follower vehicles and their distances relative to an ego vehicle
void getSubLanes(const MSVehicle *veh, double latOffset, int &rightmost, int &leftmost) const
Notification
Definition of a vehicle state.
@ NOTIFICATION_LANE_CHANGE
The vehicle changes lanes (micro only)
@ NOTIFICATION_PARKING
The vehicle starts or ends parking.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
bool isOpposite
whether this an opposite-direction stop
double getLatDist() const
Representation of a vehicle in the micro simulation.
const std::vector< double > & getFurtherLanesPosLat() const
void setTentativeLaneAndPosition(MSLane *lane, double pos, double posLat=0)
set tentative lane and position during insertion to ensure that all cfmodels work (some of them requi...
MSAbstractLaneChangeModel & getLaneChangeModel()
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
void fixPosition()
repair errors in vehicle position after changing between internal edges
double getAcceleration() const
Returns the vehicle's acceleration in m/s (this is computed as the last step's mean acceleration in c...
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
double lateralDistanceToLane(const int offset) const
Get the minimal lateral distance required to move fully onto the lane at given offset.
void leaveLane(const MSMoveReminder::Notification reason, const MSLane *approachedLane=0)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
void switchOffSignal(int signal)
Switches the given signal off.
@ VEH_SIGNAL_BLINKER_RIGHT
Right blinker lights are switched on.
@ VEH_SIGNAL_BLINKER_LEFT
Left blinker lights are switched on.
const MSLane * getLane() const
Returns the lane the vehicle is on.
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
Influencer & getInfluencer()
double updateFurtherLanes(std::vector< MSLane * > &furtherLanes, std::vector< double > &furtherLanesPosLat, const std::vector< MSLane * > &passedLanes)
update a vector of further lanes and return the new backPos
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
double getSpeed() const
Returns the vehicle's current speed.
const std::vector< MSLane * > & getFurtherLanes() const
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
double getPositionOnLane() const
Get the vehicle's position along the lane.
double getLateralOverlap() const
return the amount by which the vehicle extends laterally outside it's primary lane
bool hasInfluencer() const
whether the vehicle is individually influenced (via TraCI or special parameters)
void switchOnSignal(int signal)
Switches the given signal on.
void updateDriveItems()
Check whether the drive items (myLFLinkLanes) are up to date, and update them if required.
double getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
const std::string & getID() const
Returns the name of the vehicle type.
double getMinGap() const
Get the free space in front of vehicles of this class.
bool wasSet(long long int what) const
Returns whether the given parameter was set.
double getMaxSpeedLat() const
Get vehicle's maximum lateral speed [m/s].
const SUMOVTypeParameter & getParameter() const
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
const std::string & getID() const
Returns the id.
A storage for options typed value containers)
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
Static storage of an output device and its base (abstract) implementation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const ATTR_TYPE &attr, const T &val, const bool isNull=false)
writes a named attribute
static OutputDevice & getDeviceByOption(const std::string &name)
Returns the device described by the option.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
double x() const
Returns the x-position.
double y() const
Returns the y-position.
static double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)
Encapsulated SAX-Attributes.
virtual std::string getString(int id, bool *isPresent=nullptr) const =0
Returns the string-value of the named (by its enum-value) attribute.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
std::map< SumoXMLAttr, std::string > SubParams
sub-model parameters
const SubParams & getLCParams() const
Returns the LC parameter.
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
#define UNUSED_PARAMETER(x)