42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 51 #define LOOK_FORWARD_SPEED_DIVIDER (SUMOReal)14. 53 #define LOOK_FORWARD_RIGHT (SUMOReal)10. 54 #define LOOK_FORWARD_LEFT (SUMOReal)20. 56 #define JAM_FACTOR (SUMOReal)1. 58 #define LCA_RIGHT_IMPATIENCE (SUMOReal)-1. 59 #define CUT_IN_LEFT_SPEED_THRESHOLD (SUMOReal)27. 61 #define LOOK_AHEAD_MIN_SPEED (SUMOReal)0.0 62 #define LOOK_AHEAD_SPEED_MEMORY (SUMOReal)0.9 63 #define LOOK_AHEAD_SPEED_DECREMENT 6. 65 #define HELP_DECEL_FACTOR (SUMOReal)1.0 67 #define HELP_OVERTAKE (SUMOReal)(10.0 / 3.6) 68 #define MIN_FALLBEHIND (SUMOReal)(7.0 / 3.6) 70 #define RELGAIN_NORMALIZATION_MIN_SPEED (SUMOReal)10.0 71 #define URGENCY (SUMOReal)2.0 73 #define KEEP_RIGHT_TIME (SUMOReal)5.0 // the number of seconds after which a vehicle should move to the right lane 74 #define KEEP_RIGHT_ACCEPTANCE (SUMOReal)2.0 // calibration factor for determining the desire to keep right 75 #define ROUNDABOUT_DIST_BONUS (SUMOReal)80.0 89 #define DEBUG_COND (myVehicle.getID() == "disabled") 96 mySpeedGainProbability(0),
97 myKeepRightProbability(0),
98 myLeadingBlockerLength(0),
105 myChangeProbThresholdRight(2.0 * myKeepRightParam /
MAX2(
NUMERICAL_EPS, mySpeedGainParam)),
107 #ifdef DEBUG_CONSTRUCTOR 136 const std::pair<MSVehicle*, SUMOReal>& leader,
137 const std::pair<MSVehicle*, SUMOReal>& neighLead,
138 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
140 const std::vector<MSVehicle::LaneQ>& preb,
144 #ifdef DEBUG_WANTS_CHANGE 153 <<
" considerChangeTo=" << (laneOffset == -1 ?
"right" :
"left")
158 const int result =
_wantsChange(laneOffset, msgPass, blocked, leader, neighLead, neighFollow, neighLane, preb, lastBlocked, firstBlocked);
160 #ifdef DEBUG_WANTS_CHANGE 165 <<
" wantsChangeTo=" << (laneOffset == -1 ?
"right" :
"left")
172 << ((result &
LCA_TRACI) ?
" (traci)" :
"")
188 #ifdef DEBUG_PATCH_SPEED 190 const std::string patched = (wanted != newSpeed ?
" patched=" +
toString(newSpeed) :
"");
196 <<
" wanted=" << wanted
209 #ifdef DEBUG_PATCH_SPEED 219 #ifdef DEBUG_PATCH_SPEED 230 #ifdef DEBUG_PATCH_SPEED 232 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" slowing down for leading blocker, safe=" << safe << (safe +
NUMERICAL_EPS < min ?
" (not enough)" :
"") <<
"\n";
235 return MAX2(min, safe);
242 for (std::vector<SUMOReal>::const_iterator i =
myVSafes.begin(); i !=
myVSafes.end(); ++i) {
244 if (v >= min && v <= max) {
247 #ifdef DEBUG_PATCH_SPEED 249 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" got nVSafe=" << nVSafe <<
"\n";
257 #ifdef DEBUG_PATCH_SPEED 259 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" got vSafe\n";
270 #ifdef DEBUG_PATCH_SPEED 272 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" LCA_WANTS_LANECHANGE (strat, no vSafe)\n";
275 return (max + wanted) / (
SUMOReal) 2.0;
279 #ifdef DEBUG_PATCH_SPEED 281 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" LCA_BLOCKED_BY_LEADER (coop)\n";
284 return (min + wanted) / (
SUMOReal) 2.0;
287 #ifdef DEBUG_PATCH_SPEED 289 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" LCA_BLOCKED_BY_FOLLOWER (coop)\n";
292 return (max + wanted) / (
SUMOReal) 2.0;
300 #ifdef DEBUG_PATCH_SPEED 302 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" LCA_AMBLOCKINGLEADER\n";
305 return (max + wanted) / (
SUMOReal) 2.0;
309 #ifdef DEBUG_PATCH_SPEED 311 std::cout << time <<
" veh=" <<
myVehicle.
getID() <<
" LCA_AMBLOCKINGFOLLOWER_DONTBRAKE\n";
329 #ifdef DEBUG_INFORMED 333 <<
" informedBy=" << sender->
getID()
334 <<
" info=" << pinfo->second
335 <<
" vSafe=" << pinfo->first
348 const std::pair<MSVehicle*, SUMOReal>& neighLead,
352 for (std::vector<SUMOReal>::const_iterator i =
myVSafes.begin(); i !=
myVSafes.end(); ++i) {
355 plannedSpeed =
MIN2(plannedSpeed, v);
358 #ifdef DEBUG_INFORMER 360 std::cout <<
" informLeader speed=" <<
myVehicle.
getSpeed() <<
" planned=" << plannedSpeed <<
"\n";
364 assert(neighLead.first != 0);
366 #ifdef DEBUG_INFORMER 368 std::cout <<
" blocked by leader nv=" << nv->
getID() <<
" nvSpeed=" << nv->
getSpeed() <<
" needGap=" 374 const SUMOReal overtakeDist = (neighLead.second
386 || dv * remainingSeconds < overtakeDist) {
397 #ifdef DEBUG_INFORMER 400 <<
" cannot overtake leader nv=" << nv->
getID()
402 <<
" remainingSeconds=" << remainingSeconds
403 <<
" targetSpeed=" << targetSpeed
404 <<
" nextSpeed=" << nextSpeed
412 #ifdef DEBUG_INFORMER 415 <<
" cannot overtake fast leader nv=" << nv->
getID()
417 <<
" remainingSeconds=" << remainingSeconds
418 <<
" targetSpeed=" << targetSpeed
427 #ifdef DEBUG_INFORMER 430 <<
" wants to overtake leader nv=" << nv->
getID()
432 <<
" remainingSeconds=" << remainingSeconds
433 <<
" currentGap=" << neighLead.second
435 <<
" overtakeDist=" << overtakeDist
442 }
else if (neighLead.first != 0) {
450 #ifdef DEBUG_INFORMER 452 std::cout <<
" not blocked by leader nv=" << nv->
getID()
454 <<
" gap=" << neighLead.second
455 <<
" nextGap=" << neighLead.second - dv
457 <<
" targetSpeed=" << targetSpeed
461 return MIN2(targetSpeed, plannedSpeed);
473 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
477 assert(neighFollow.first != 0);
479 #ifdef DEBUG_INFORMER 481 std::cout <<
" blocked by follower nv=" << nv->
getID() <<
" nvSpeed=" << nv->
getSpeed() <<
" needGap=" 489 if ((neededGap - neighFollow.second) / remainingSeconds < (plannedSpeed - nv->
getSpeed())) {
490 #ifdef DEBUG_INFORMER 492 std::cout <<
" wants to cut in before nv=" << nv->
getID() <<
" without any help." <<
"\nneededGap = " << neededGap <<
"\n";
512 const SUMOReal dv = plannedSpeed - neighNewSpeed1s;
514 const SUMOReal decelGap = neighFollow.second + dv;
516 #ifdef DEBUG_INFORMER 520 <<
" egoNV=" << plannedSpeed
521 <<
" nvNewSpeed=" << neighNewSpeed
522 <<
" nvNewSpeed1s=" << neighNewSpeed1s
523 <<
" deltaGap=" << dv
524 <<
" decelGap=" << decelGap
525 <<
" secGap=" << secureGap
529 if (decelGap > 0 && decelGap >= secureGap) {
542 #ifdef DEBUG_INFORMER 544 std::cout <<
" wants to cut in before nv=" << nv->
getID()
545 <<
" vsafe1=" << vsafe1
546 <<
" vsafe=" << vsafe
551 }
else if (dv > 0 && dv * remainingSeconds > (secureGap - decelGap +
POSITION_EPS)) {
554 #ifdef DEBUG_INFORMER 556 std::cout <<
" wants to cut in before nv=" << nv->
getID() <<
" (eventually)\n";
570 #ifdef DEBUG_INFORMER 572 std::cout <<
" wants right follower to slow down a bit\n";
576 #ifdef DEBUG_INFORMER 578 std::cout <<
" wants to cut in before right follower nv=" << nv->
getID() <<
" (eventually)\n";
587 const SUMOReal overtakeDist = (neighFollow.second
593 const SUMOReal needDV = overtakeDist / remainingSeconds;
596 #ifdef DEBUG_INFORMER 600 <<
" wants to be overtaken by=" << nv->
getID()
601 <<
" overtakeDist=" << overtakeDist
603 <<
" vhelp=" << vhelp
604 <<
" needDV=" << needDV
650 const std::pair<MSVehicle*, SUMOReal>& leader,
651 const std::pair<MSVehicle*, SUMOReal>& neighLead,
652 const std::pair<MSVehicle*, SUMOReal>& neighFollow,
654 const std::vector<MSVehicle::LaneQ>& preb,
657 assert(laneOffset == 1 || laneOffset == -1);
661 int bestLaneOffset = 0;
671 const int prebOffset = (checkOpposite ? 0 : laneOffset);
672 for (
int p = 0; p < (int) preb.size(); ++p) {
673 if (preb[p].lane == prebLane && p + laneOffset >= 0) {
674 assert(p + prebOffset < (
int)preb.size());
676 neigh = preb[p + prebOffset];
677 currentDist = curr.
length;
679 bestLaneOffset = curr.bestLaneOffset;
680 if (bestLaneOffset == 0 && preb[p + prebOffset].bestLaneOffset == 0) {
681 #ifdef DEBUG_WANTS_CHANGE 685 <<
" bestLaneOffsetOld=" << bestLaneOffset
686 <<
" bestLaneOffsetNew=" << laneOffset
690 bestLaneOffset = prebOffset;
692 best = preb[p + bestLaneOffset];
698 const bool right = (laneOffset == -1);
700 neigh = preb[preb.size() - 1];
706 currentDist = curr.
length;
712 const bool changeToBest = (right && bestLaneOffset < 0) || (!right && bestLaneOffset > 0);
718 if (lastBlocked != firstBlocked) {
722 #ifdef DEBUG_WANTS_CHANGE 731 <<
" leaderGap=" << leader.second
733 <<
" neighLeadGap=" << neighLead.second
735 <<
" neighFollowGap=" << neighFollow.second
757 assert(memoryFactor > 0.);
765 if (bestLaneOffset == 0 && leader.first != 0 && leader.first->isStopped()) {
768 + leader.first->getVehicleType().getLengthWithGap());
778 int roundaboutEdgesAhead = 0;
780 if ((*it) != 0 && (*it)->getEdge().isRoundabout()) {
781 roundaboutEdgesAhead += 1;
782 }
else if (roundaboutEdgesAhead > 0) {
787 int roundaboutEdgesAheadNeigh = 0;
789 if ((*it) != 0 && (*it)->getEdge().isRoundabout()) {
790 roundaboutEdgesAheadNeigh += 1;
791 }
else if (roundaboutEdgesAheadNeigh > 0) {
796 if (roundaboutEdgesAhead > 1) {
800 #ifdef DEBUG_WANTS_CHANGE 802 if (roundaboutEdgesAhead > 0) {
803 std::cout <<
" roundaboutEdgesAhead=" << roundaboutEdgesAhead <<
" roundaboutEdgesAheadNeigh=" << roundaboutEdgesAheadNeigh <<
"\n";
809 const SUMOReal maxJam =
MAX2(preb[currIdx + prebOffset].occupation, preb[currIdx].occupation);
812 #ifdef DEBUG_WANTS_CHANGE 817 <<
" laDist=" << laDist
818 <<
" currentDist=" << currentDist
819 <<
" usableDist=" << usableDist
820 <<
" bestLaneOffset=" << bestLaneOffset
822 <<
" best.length=" << best.
length 823 <<
" maxJam=" << maxJam
824 <<
" neighLeftPlace=" << neighLeftPlace
846 #ifdef DEBUG_WANTS_CHANGE 849 <<
" avoid overtaking on the right nv=" << nv->
getID()
852 <<
" plannedSpeed=" <<
myVSafes.back()
866 #ifdef DEBUG_WANTS_CHANGE 868 std::cout <<
" veh=" <<
myVehicle.
getID() <<
" could not change back and forth in time (1) neighLeftPlace=" << neighLeftPlace <<
"\n";
872 }
else if (bestLaneOffset == 0 && (neighLeftPlace * 2. < laDist)) {
877 #ifdef DEBUG_WANTS_CHANGE 879 std::cout <<
" veh=" <<
myVehicle.
getID() <<
" could not change back and forth in time (2) neighLeftPlace=" << neighLeftPlace <<
"\n";
886 #ifdef DEBUG_WANTS_CHANGE 892 if ((ret & lcaCounter) != 0) {
896 #ifdef DEBUG_WANTS_CHANGE 898 std::cout <<
" retAfterInfluence=" << ret <<
"\n";
909 if (changeToBest &&
abs(bestLaneOffset) > 1) {
911 #ifdef DEBUG_WANTS_CHANGE 913 std::cout <<
" reserving space for unseen blockers\n";
922 if (*firstBlocked != neighLead.first) {
929 const SUMOReal plannedSpeed =
informLeader(msgPass, blocked, myLca, neighLead, remainingSeconds);
930 if (plannedSpeed >= 0) {
932 informFollower(msgPass, blocked, myLca, neighFollow, remainingSeconds, plannedSpeed);
934 #ifdef DEBUG_WANTS_CHANGE 939 <<
" remainingSeconds=" << remainingSeconds
940 <<
" plannedSpeed=" << plannedSpeed
948 if (roundaboutEdgesAhead > 1) {
965 #ifdef DEBUG_WANTS_CHANGE 967 std::cout <<
" veh=" <<
myVehicle.
getID() <<
" does not want to get stranded on the on-ramp of a highway\n";
993 #ifdef DEBUG_WANTS_CHANGE 997 <<
" wantsChangeToHelp=" << (right ?
"right" :
"left")
1025 if (neighLead.first == 0) {
1030 &
myVehicle,
myVehicle.
getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()));
1032 if (leader.first == 0) {
1038 #ifdef DEBUG_WANTS_CHANGE 1042 <<
" currentDist=" << currentDist
1043 <<
" neighDist=" << neighDist
1049 thisLaneVSafe =
MIN2(thisLaneVSafe, vMax);
1050 neighLaneVSafe =
MIN2(neighLaneVSafe, vMax);
1051 const SUMOReal relativeGain = (neighLaneVSafe - thisLaneVSafe) /
MAX2(neighLaneVSafe,
1056 if (thisLaneVSafe - 5 / 3.6 > neighLaneVSafe) {
1068 if (mySpeedGainProbability < 0 || relativeGain > 0) {
1077 SUMOReal fullSpeedDrivingSeconds =
MIN2(acceptanceTime, fullSpeedGap / vMax);
1078 if (neighLead.first != 0 && neighLead.first->getSpeed() < vMax) {
1081 vMax, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())));
1082 fullSpeedDrivingSeconds =
MIN2(fullSpeedDrivingSeconds, fullSpeedGap / (vMax - neighLead.first->getSpeed()));
1089 #ifdef DEBUG_WANTS_CHANGE 1094 <<
" neighDist=" << neighDist
1096 <<
" leaderSpeed=" << (neighLead.first == 0 ? -1 : neighLead.first->getSpeed())
1098 myVehicle.
getSpeed(), neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()))
1099 <<
" acceptanceTime=" << acceptanceTime
1100 <<
" fullSpeedGap=" << fullSpeedGap
1101 <<
" fullSpeedDrivingSeconds=" << fullSpeedDrivingSeconds
1102 <<
" dProb=" << deltaProb
1115 #ifdef DEBUG_WANTS_CHANGE 1121 <<
" thisLaneVSafe=" << thisLaneVSafe
1122 <<
" neighLaneVSafe=" << neighLaneVSafe
1123 <<
" relativeGain=" << relativeGain
1124 <<
" blocked=" << blocked
1138 if (thisLaneVSafe > neighLaneVSafe) {
1148 #ifdef DEBUG_WANTS_CHANGE 1154 <<
" thisLaneVSafe=" << thisLaneVSafe
1155 <<
" neighLaneVSafe=" << neighLaneVSafe
1156 <<
" relativeGain=" << relativeGain
1157 <<
" blocked=" << blocked
1171 && (right ? mySpeedGainProbability < 0 : mySpeedGainProbability > 0)) {
1178 #ifdef DEBUG_WANTS_CHANGE 1184 <<
" thisLaneVSafe=" << thisLaneVSafe
1185 <<
" neighLaneVSafe=" << neighLaneVSafe
1197 if ((*blocked) != 0) {
1200 #ifdef DEBUG_SLOW_DOWN 1219 (*blocked)->getCarFollowModel().getMaxDecel()));
1229 #ifdef DEBUG_SAVE_BLOCKER_LENGTH 1245 #ifdef DEBUG_SAVE_BLOCKER_LENGTH 1257 #ifdef DEBUG_SAVE_BLOCKER_LENGTH 1263 <<
" potential=" << potential
bool debugVehicle() const
whether the current vehicles shall be debugged
void saveBlockerLength(MSVehicle *blocker, int lcaCounter)
save space for vehicles which need to counter-lane-change
MSEdge & getEdge() const
Returns the lane's edge.
Representation of a vehicle in the micro simulation.
SUMOReal getMaxSpeed() const
Get vehicle's maximum speed [m/s].
MSLCM_LC2013(MSVehicle &v)
The action is due to the default of keeping right "Rechtsfahrgebot".
The action is done to help someone else.
int wantsChange(int laneOffset, MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, const std::pair< MSVehicle *, SUMOReal > &leader, const std::pair< MSVehicle *, SUMOReal > &neighLead, const std::pair< MSVehicle *, SUMOReal > &neighFollow, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked)
Called to examine whether the vehicle wants to change using the given laneOffset. This method gets th...
const MSCFModel & getCarFollowModel() const
Returns the vehicle's car following model definition.
SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel &cfModel)
Called to adapt the speed in order to allow a lane change.
#define LOOK_FORWARD_RIGHT
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
SUMOReal getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
int bestLaneOffset
The (signed) number of lanes to be crossed to get to the lane which allows to continue the drive...
const SUMOReal myChangeProbThresholdRight
virtual SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const =0
Computes the vehicle's follow speed (no dawdling)
SUMOReal getLength() const
Returns the lane's length.
#define KEEP_RIGHT_ACCEPTANCE
The car-following model abstraction.
SUMOReal myKeepRightProbability
void * informNeighFollower(void *info, MSVehicle *sender)
Informs the follower on the desired lane.
SUMOReal getLength() const
Get vehicle's length [m].
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
const SUMOReal myKeepRightParam
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
const SUMOReal myChangeProbThresholdLeft
SUMOReal getSecureGap(const SUMOReal speed, const SUMOReal leaderSpeed, const SUMOReal leaderMaxDecel) const
Returns the minimum gap to reserve if the leader is braking at maximum.
SUMOReal getPositionOnLane() const
Get the vehicle's position along the lane.
std::vector< SUMOReal > myVSafes
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
The action is due to the wish to be faster (tactical lc)
SUMOReal length
The overall length which may be driven when using this lane without a lane change.
const SUMOReal myCooperativeParam
#define UNUSED_PARAMETER(x)
void informFollower(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, int dir, const std::pair< MSVehicle *, SUMOReal > &neighFollow, SUMOReal remainingSeconds, SUMOReal plannedSpeed)
decide whether we will try cut in before the follower or allow to be overtaken
MSAbstractLaneChangeModel & getLaneChangeModel()
SUMOReal getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
Needs to stay on the current lane.
const SUMOReal myStrategicParam
#define ROUNDABOUT_DIST_BONUS
static bool myAllowOvertakingRight
whether overtaking on the right is permitted
A class responsible for exchanging messages between cars involved in lane-change interaction.
const std::string & getID() const
Returns the id.
bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist)
bool currentDistAllows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist)
bool cancelRequest(int state)
whether the influencer cancels the given request
SUMOReal brakeGap(const SUMOReal speed) const
Returns the distance the vehicle needs to halt including driver's reaction time.
The action is urgent (to be defined by lc-model)
SUMOReal myLeadingBlockerLength
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
#define CUT_IN_LEFT_SPEED_THRESHOLD
SUMOReal myLookAheadSpeed
#define LOOK_AHEAD_SPEED_MEMORY
int slowDownForBlocked(MSVehicle **blocked, int state)
compute useful slowdowns for blocked vehicles
#define RELGAIN_NORMALIZATION_MIN_SPEED
The action is needed to follow the route (navigational lc)
virtual SUMOReal stopSpeed(const MSVehicle *const veh, const SUMOReal speed, SUMOReal gap2pred) const =0
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) ...
SUMOReal getSpeedLimit() const
Returns the lane's maximum allowed speed.
A structure representing the best lanes for continuing the route.
SUMOReal getMaxDecel() const
Get the vehicle type's maximum deceleration [m/s^2].
SUMOReal changeRequestRemainingSeconds(const SUMOTime currentTime) const
Return the remaining number of seconds of the current laneTimeLine assuming one exists.
int myOwnState
The current state of the vehicle.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
SUMOReal informLeader(MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, int dir, const std::pair< MSVehicle *, SUMOReal > &neighLead, SUMOReal remainingSeconds)
virtual void saveBlockerLength(SUMOReal length)
reserve space at the end of the lane to avoid dead locks
std::pair< SUMOReal, int > Info
information regarding save velocity (unused) and state flags of the ego vehicle
int _wantsChange(int laneOffset, MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, const std::pair< MSVehicle *, SUMOReal > &leader, const std::pair< MSVehicle *, SUMOReal > &neighLead, const std::pair< MSVehicle *, SUMOReal > &neighFollow, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked)
helper function for doing the actual work
MSVehicle & myVehicle
The vehicle this lane-changer belongs to.
void * informNeighLeader(void *info, MSVehicle *sender)
Informs the leader on the desired lane.
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
Influencer & getInfluencer()
Returns the velocity/lane influencer.
SUMOReal occupation
The overall vehicle sum on consecutive lanes which can be passed without a lane change.
std::vector< MSLane * > bestContinuations
Consecutive lane that can be followed without a lane change (contribute to length and occupation) ...
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
const SUMOReal SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
SUMOReal getSpeed() const
Returns the vehicle's current speed.
SUMOReal getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
#define LOOK_FORWARD_LEFT
SUMOReal mySpeedGainProbability
a value for tracking the probability that a change to the offset with the same sign is beneficial ...
The action is due to a TraCI request.
bool amBlockingFollowerPlusNB()
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
SUMOReal _patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel &cfModel)
#define LOOK_AHEAD_MIN_SPEED
#define LCA_RIGHT_IMPATIENCE
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
MSLane * getLane() const
Returns the lane the vehicle is on.
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
The edge is an internal edge.
void * inform(void *info, MSVehicle *sender)
Representation of a lane in the micro simulation.
const MSCFModel & myCarFollowModel
The vehicle's car following model.
const SUMOReal mySpeedGainParam
Interface for lane-change models.
int getBestLaneOffset() const
returns the current offset from the best lane
#define HELP_DECEL_FACTOR
const std::string & getID() const
Returns the name of the vehicle.