Eclipse SUMO - Simulation of Urban MObility
MSLCM_SL2015.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2013-2022 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
19// A lane change model for heterogeneous traffic (based on sub-lanes)
20/****************************************************************************/
21#pragma once
22#include <config.h>
23
25#include <vector>
26
27
28// ===========================================================================
29// class definitions
30// ===========================================================================
36public:
37
39
40 virtual ~MSLCM_SL2015();
41
43 LaneChangeModel getModelID() const override {
45 }
46
49
58 int wantsChangeSublane(int laneOffset,
59 LaneChangeAction alternatives,
60 const MSLeaderDistanceInfo& leaders,
61 const MSLeaderDistanceInfo& followers,
62 const MSLeaderDistanceInfo& blockers,
63 const MSLeaderDistanceInfo& neighLeaders,
64 const MSLeaderDistanceInfo& neighFollowers,
65 const MSLeaderDistanceInfo& neighBlockers,
66 const MSLane& neighLane,
67 const std::vector<MSVehicle::LaneQ>& preb,
68 MSVehicle** lastBlocked,
69 MSVehicle** firstBlocked,
70 double& latDist, double& maneuverDist, int& blocked) override;
71
79 int wantsChange(
80 int laneOffset,
81 MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked,
82 const std::pair<MSVehicle*, double>& leader,
83 const std::pair<MSVehicle*, double>& follower,
84 const std::pair<MSVehicle*, double>& neighLead,
85 const std::pair<MSVehicle*, double>& neighFollow,
86 const MSLane& neighLane,
87 const std::vector<MSVehicle::LaneQ>& preb,
88 MSVehicle** lastBlocked,
89 MSVehicle** firstBlocked) override;
90
91 void* inform(void* info, MSVehicle* sender) override;
92
103 double patchSpeed(const double min, const double wanted, const double max,
104 const MSCFModel& cfModel) override;
105
106 void changed() override;
107
108 void resetState() override;
109
110 double getSafetyFactor() const override;
111
112 double getOppositeSafetyFactor() const override;
113
114 void prepareStep() override;
115
116 double getExtraReservation(int bestLaneOffset) const override;
117
119 bool debugVehicle() const override;
120
121 void setOwnState(const int state) override;
122
125 virtual void updateSafeLatDist(const double travelledLatDist) override;
126
128 std::string getParameter(const std::string& key) const override;
129
131 void setParameter(const std::string& key, const std::string& value) override;
132
135 double computeSpeedLat(double latDist, double& maneuverDist, bool urgent) const override;
136
137protected:
139 double _patchSpeed(double min, const double wanted, double max,
140 const MSCFModel& cfModel);
141
144 int laneOffset,
145 LaneChangeAction alternatives,
146 const MSLeaderDistanceInfo& leaders,
147 const MSLeaderDistanceInfo& followers,
148 const MSLeaderDistanceInfo& blockers,
149 const MSLeaderDistanceInfo& neighLeaders,
150 const MSLeaderDistanceInfo& neighFollowers,
151 const MSLeaderDistanceInfo& neighBlockers,
152 const MSLane& neighLane,
153 const std::vector<MSVehicle::LaneQ>& preb,
154 MSVehicle** lastBlocked,
155 MSVehicle** firstBlocked,
156 double& latDist, double& maneuverDist, int& blocked);
157
158
159 /* @brief decide whether we will overtake or follow blocking leaders
160 * and inform them accordingly (see informLeader)
161 * If we decide to follow, myVSafes will be extended
162 * returns the planned speed if following or -1 if overtaking */
163 double informLeaders(int blocked, int dir,
164 const std::vector<CLeaderDist>& blockers,
165 double remainingSeconds);
166
168 void informFollowers(int blocked, int dir,
169 const std::vector<CLeaderDist>& blockers,
170 double remainingSeconds,
171 double plannedSpeed);
172
173 /* @brief decide whether we will overtake or follow a blocking leader
174 * and inform it accordingly
175 * If we decide to follow, myVSafes will be extended
176 * returns the planned speed if following or -1 if overtaking */
177 double informLeader(int blocked, int dir,
178 const CLeaderDist& neighLead,
179 double remainingSeconds);
180
182 void informFollower(int blocked, int dir,
183 const CLeaderDist& neighFollow,
184 double remainingSeconds,
185 double plannedSpeed);
186
187
189 int slowDownForBlocked(MSVehicle** blocked, int state);
190
192 bool saveBlockerLength(double length, double foeLeftSpace) override;
193
194 inline bool amBlockingLeader() {
195 return (myOwnState & LCA_AMBLOCKINGLEADER) != 0;
196 }
197 inline bool amBlockingFollower() {
198 return (myOwnState & LCA_AMBLOCKINGFOLLOWER) != 0;
199 }
200 inline bool amBlockingFollowerNB() {
202 }
205 }
206 inline bool currentDistDisallows(double dist, int laneOffset, double lookForwardDist) {
207 return dist / (abs(laneOffset)) < lookForwardDist;
208 }
209 inline bool currentDistAllows(double dist, int laneOffset, double lookForwardDist) {
210 return dist / abs(laneOffset) > lookForwardDist;
211 }
212
213
215 typedef std::pair<double, int> Info;
216
223 void addLCSpeedAdvice(const double vSafe);
224
226 void updateExpectedSublaneSpeeds(const MSLeaderDistanceInfo& ahead, int sublaneOffset, int laneIndex) override;
227
229 StateAndDist decideDirection(StateAndDist sd1, StateAndDist sd2) const override;
230
232 static int lowest_bit(int changeReason);
233
234protected:
235
237 void msg(const CLeaderDist& cld, double speed, int state);
238
240 int computeSublaneShift(const MSEdge* prevEdge, const MSEdge* curEdge);
241
244
245 bool tieBrakeLeader(const MSVehicle* veh) const;
246
249
251 int checkBlocking(const MSLane& neighLane, double& latDist, double maneuverDist, int laneOffset,
252 const MSLeaderDistanceInfo& leaders,
253 const MSLeaderDistanceInfo& followers,
254 const MSLeaderDistanceInfo& blockers,
255 const MSLeaderDistanceInfo& neighLeaders,
256 const MSLeaderDistanceInfo& neighFollowers,
257 const MSLeaderDistanceInfo& neighBlockers,
258 std::vector<CLeaderDist>* collectLeadBlockers = 0,
259 std::vector<CLeaderDist>* collectFollowBlockers = 0,
260 bool keepLatGapManeuver = false,
261 double gapFactor = 0,
262 int* retBlockedFully = 0);
263
265 int checkBlockingVehicles(const MSVehicle* ego, const MSLeaderDistanceInfo& vehicles,
266 int laneOffset, double latDist, double foeOffset, bool leaders,
267 double& safeLatGapRight, double& safeLatGapLeft,
268 std::vector<CLeaderDist>* collectBlockers = 0) const;
269
271 static bool overlap(double right, double left, double right2, double left2);
272
274 static LaneChangeAction getLCA(int state, double latDist);
275
278 int checkStrategicChange(int ret,
279 const MSLane& neighLane,
280 int laneOffset,
281 const MSLeaderDistanceInfo& leaders,
282 const MSLeaderDistanceInfo& neighLeaders,
283 const MSVehicle::LaneQ& curr,
284 const MSVehicle::LaneQ& neigh,
285 const MSVehicle::LaneQ& best,
286 int bestLaneOffset,
287 bool changeToBest,
288 double currentDist,
289 double neighDist,
290 double laDist,
291 double roundaboutBonus,
292 double latLaneDist,
293 bool checkOpposite,
294 double& latDist
295 );
296
297
298 bool mustOvertakeStopped(const MSLane& neighLane, const MSLeaderDistanceInfo& leaders, const MSLeaderDistanceInfo& neighLead,
299 double posOnLane, double neighDist, bool right, double latLaneDist, double& currentDist, double& latDist);
300
302 int keepLatGap(int state,
303 const MSLeaderDistanceInfo& leaders,
304 const MSLeaderDistanceInfo& followers,
305 const MSLeaderDistanceInfo& blockers,
306 const MSLeaderDistanceInfo& neighLeaders,
307 const MSLeaderDistanceInfo& neighFollowers,
308 const MSLeaderDistanceInfo& neighBlockers,
309 const MSLane& neighLane,
310 int laneOffset,
311 double& latDist,
312 double& maneuverDist,
313 int& blocked);
314
315
317 void updateGaps(const MSLeaderDistanceInfo& others, double foeOffset, double oldCenter, double gapFactor,
318 double& surplusGapRight, double& surplusGapLeft, bool saveMinGap = false, double netOverlap = 0,
319 double latDist = 0,
320 std::vector<CLeaderDist>* collectBlockers = 0);
321
323 double computeGapFactor(int state) const;
324
326 double getWidth() const;
327
329 void updateCFRelated(const MSLeaderDistanceInfo& vehicles, double foeOffset, bool leaders);
330
334 }
335
337 void commitManoeuvre(int blocked, int blockedFully,
338 const MSLeaderDistanceInfo& leaders,
339 const MSLeaderDistanceInfo& neighLeaders,
340 const MSLane& neighLane,
341 double maneuverDist);
342
344 double commitFollowSpeed(double speed, double latDist, double secondsToLeaveLane, const MSLeaderDistanceInfo& leaders, double foeOffset) const;
345
347 double forecastAverageSpeed(double vSafe, double vMax, double gap, double vLeader) const;
348
350 double computeSpeedGain(double latDistSublane, double defaultNextSpeed) const;
351
353 double getPosLat();
354
356 double getLateralDrift();
357
359 double getLeftBorder(bool checkOpposite = true) const;
360
362 double getVehicleCenter() const;
363
365 double getNeighRight(const MSLane& neighLane) const;
366
367 /* @brief check whether vehicle speed is appropriate for the intended maneuver distance
368 * (rather than doing an orthgonal slide) */
369 bool preventSliding(double maneuverDist) const;
370
372 inline bool wantsKeepRight(double keepRightProb) const;
373
375 bool isBidi(const MSLane* lane) const;
376
377protected:
382
383 /* @brief a value for tracking the probability of following the/"Rechtsfahrgebot"
384 * A larger negative value indicates higher probability for moving to the
385 * right (as in mySpeedGainProbability) */
387
390
391 /*@brief the speed to use when computing the look-ahead distance for
392 * determining urgency of strategic lane changes */
394
397 std::vector<double> myLCAccelerationAdvices;
398
400 std::vector<double> myExpectedSublaneSpeeds;
401
404
407
410
414
416 std::set<const MSVehicle*> myCFRelated;
418
420
427 // @brief minimum lateral gap
429 // @brief willingness to encroach on other vehicles laterally (pushing them around)
430 double myPushy;
431 // @brief willingness to undercut longitudinal safe gaps
433 // @brief dynamic component of willingness for longitudinal gap reduction
436 // @brief time to reach maximum impatience in seconds
438 // @brief lateral acceleration
440 // @brief distance to turn at which alignment should be adjusted to the turn direction
442 // @brief the factor by which the lookahead distance to the left differs from the lookahead to the right
444 // @brief the factor by which the speedGain-threshold for the leftdiffers from the threshold for the right
446 // @brief lane discipline factor
448 // @brief lookahead for speedGain in seconds
450 // @brief bounus factor staying on the inside of multi-lane roundabout
452 // @brief factor for cooperative speed adjustment
454 // time for unrestricted driving on the right to accept keepRight change
456 // @brief speed difference factor for overtaking the leader on the neighbor lane before changing to that lane
459
461
462 // @brief threshold value for changing to the right
464 // @brief threshold value for changing to the left
466 // @brief threshold value for accepting speed loss to achieve desired sublane alignment
468
469 // @brief state of lane keeping imperfection
472
473};
std::pair< const MSVehicle *, double > CLeaderDist
Definition: MSLeaderInfo.h:38
LaneChangeAction
The state of a vehicle's lane-change behavior.
@ LCA_AMBLOCKINGLEADER
@ LCA_AMBLOCKINGFOLLOWER_DONTBRAKE
@ LCA_AMBLOCKINGFOLLOWER
LaneChangeModel
A class responsible for exchanging messages between cars involved in lane-change interaction.
Interface for lane-change models.
int myOwnState
The current state of the vehicle.
MSVehicle & myVehicle
The vehicle this lane-changer belongs to.
The car-following model abstraction.
Definition: MSCFModel.h:55
A road/street connecting two junctions.
Definition: MSEdge.h:77
static double gLateralResolution
Definition: MSGlobals.h:97
A lane change model developed by J. Erdmann.
Definition: MSLCM_SL2015.h:35
std::vector< double > myLCAccelerationAdvices
vector of LC-related acceleration recommendations Filled in wantsChange() and applied in patchSpeed()
Definition: MSLCM_SL2015.h:397
double mySafeLatDistRight
the lateral distance the vehicle can safely move in the currently considered direction
Definition: MSLCM_SL2015.h:412
static bool overlap(double right, double left, double right2, double left2)
return whether the given intervals overlap
double _patchSpeed(double min, const double wanted, double max, const MSCFModel &cfModel)
double informLeaders(int blocked, int dir, const std::vector< CLeaderDist > &blockers, double remainingSeconds)
double myRoundaboutBonus
Definition: MSLCM_SL2015.h:451
void commitManoeuvre(int blocked, int blockedFully, const MSLeaderDistanceInfo &leaders, const MSLeaderDistanceInfo &neighLeaders, const MSLane &neighLane, double maneuverDist)
commit to lane change maneuvre potentially overriding safe speed
std::set< const MSVehicle * > myCFRelated
set of vehicles that are in a car-following relationship with ego (leader of followers)
Definition: MSLCM_SL2015.h:416
void prepareStep() override
double myKeepRightProbability
Definition: MSLCM_SL2015.h:386
double myMinImpatience
Definition: MSLCM_SL2015.h:435
double commitFollowSpeed(double speed, double latDist, double secondsToLeaveLane, const MSLeaderDistanceInfo &leaders, double foeOffset) const
compute speed when committing to an urgent change that is safe in regard to leading vehicles
double getLeftBorder(bool checkOpposite=true) const
return current edge width optionally extended by opposite direction lane width
double myChangeProbThresholdRight
Definition: MSLCM_SL2015.h:463
double informLeader(int blocked, int dir, const CLeaderDist &neighLead, double remainingSeconds)
double mySafeLatDistLeft
Definition: MSLCM_SL2015.h:413
double getSublaneWidth()
return the current sublane width (and return a sensible value when running without sublanes)
Definition: MSLCM_SL2015.h:332
MSLCM_SL2015(MSVehicle &v)
int computeSublaneShift(const MSEdge *prevEdge, const MSEdge *curEdge)
compute shift so that prevSublane + shift = newSublane
double patchSpeed(const double min, const double wanted, const double max, const MSCFModel &cfModel) override
Called to adapt the speed in order to allow a lane change. It uses information on LC-related desired ...
double getSafetyFactor() const override
return factor for modifying the safety constraints of the car-following model
double myCooperativeSpeed
Definition: MSLCM_SL2015.h:453
double computeSpeedLat(double latDist, double &maneuverDist, bool urgent) const override
decides the next lateral speed depending on the remaining lane change distance to be covered and upda...
std::vector< double > myExpectedSublaneSpeeds
expected travel speeds on all sublanes on the current edge(!)
Definition: MSLCM_SL2015.h:400
double getWidth() const
return the widht of this vehicle (padded for numerical stability)
bool myCanChangeFully
whether the current lane changing maneuver can be finished in a single step
Definition: MSLCM_SL2015.h:409
void addLCSpeedAdvice(const double vSafe)
Takes a vSafe (speed advice for speed in the next simulation step), converts it into an acceleration ...
void changed() override
int wantsChange(int laneOffset, MSAbstractLaneChangeModel::MSLCMessager &msgPass, int blocked, const std::pair< MSVehicle *, double > &leader, const std::pair< MSVehicle *, double > &follower, const std::pair< MSVehicle *, double > &neighLead, const std::pair< MSVehicle *, double > &neighFollow, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked) override
Called to examine whether the vehicle wants to change using the given laneOffset (this is a wrapper a...
double myLaneDiscipline
Definition: MSLCM_SL2015.h:447
bool myDontBrake
flag to prevent speed adaptation by slowing down
Definition: MSLCM_SL2015.h:406
std::string getParameter(const std::string &key) const override
try to retrieve the given parameter from this device. Throw exception for unsupported key
bool wantsKeepRight(double keepRightProb) const
check against thresholds
bool amBlockingFollower()
Definition: MSLCM_SL2015.h:197
double forecastAverageSpeed(double vSafe, double vMax, double gap, double vLeader) const
estimate average speed over mySpeedGainLookahead time
LaneChangeModel getModelID() const override
Returns the model's id.
Definition: MSLCM_SL2015.h:43
void updateCFRelated(const MSLeaderDistanceInfo &vehicles, double foeOffset, bool leaders)
find leaders/followers that are already in a car-following relationship with ego
bool debugVehicle() const override
whether the current vehicles shall be debugged
double myAccelLat
Definition: MSLCM_SL2015.h:439
int wantsChangeSublane(int laneOffset, LaneChangeAction alternatives, const MSLeaderDistanceInfo &leaders, const MSLeaderDistanceInfo &followers, const MSLeaderDistanceInfo &blockers, const MSLeaderDistanceInfo &neighLeaders, const MSLeaderDistanceInfo &neighFollowers, const MSLeaderDistanceInfo &neighBlockers, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked, double &latDist, double &maneuverDist, int &blocked) override
Called to examine whether the vehicle wants to change with the given laneOffset (using the sublane mo...
double mySpeedGainProbabilityRight
a value for tracking the probability that a change to the right is beneficial
Definition: MSLCM_SL2015.h:379
double myLookAheadSpeed
Definition: MSLCM_SL2015.h:393
int slowDownForBlocked(MSVehicle **blocked, int state)
compute useful slowdowns for blocked vehicles
void initDerivedParameters()
init cached parameters derived directly from model parameters
int keepLatGap(int state, const MSLeaderDistanceInfo &leaders, const MSLeaderDistanceInfo &followers, const MSLeaderDistanceInfo &blockers, const MSLeaderDistanceInfo &neighLeaders, const MSLeaderDistanceInfo &neighFollowers, const MSLeaderDistanceInfo &neighBlockers, const MSLane &neighLane, int laneOffset, double &latDist, double &maneuverDist, int &blocked)
check whether lateral gap requirements are met override the current maneuver if necessary
bool tieBrakeLeader(const MSVehicle *veh) const
bool currentDistAllows(double dist, int laneOffset, double lookForwardDist)
Definition: MSLCM_SL2015.h:209
CLeaderDist getLongest(const MSLeaderDistanceInfo &ldi) const
get the longest vehicle in the given info
double myCooperativeParam
Definition: MSLCM_SL2015.h:422
double getNeighRight(const MSLane &neighLane) const
return the right offset of the neighboring lane relative to the current edge
double computeSpeedGain(double latDistSublane, double defaultNextSpeed) const
compute speedGain when moving by the given amount
double myKeepRightAcceptanceTime
Definition: MSLCM_SL2015.h:455
double mySigmaState
Definition: MSLCM_SL2015.h:470
void updateGaps(const MSLeaderDistanceInfo &others, double foeOffset, double oldCenter, double gapFactor, double &surplusGapRight, double &surplusGapLeft, bool saveMinGap=false, double netOverlap=0, double latDist=0, std::vector< CLeaderDist > *collectBlockers=0)
check remaining lateral gaps for the given foe vehicles and optionally update minimum lateral gaps
double mySpeedGainParam
Definition: MSLCM_SL2015.h:423
virtual void updateSafeLatDist(const double travelledLatDist) override
Updates the value of safe lateral distances (mySafeLatDistLeft and mySafeLatDistRight) during maneuve...
const MSEdge * myLastEdge
expected travel speeds on all sublanes on the current edge(!)
Definition: MSLCM_SL2015.h:403
double getOppositeSafetyFactor() const override
return factor for modifying the safety constraints for opposite-diretction overtaking of the car-foll...
int checkStrategicChange(int ret, const MSLane &neighLane, int laneOffset, const MSLeaderDistanceInfo &leaders, const MSLeaderDistanceInfo &neighLeaders, const MSVehicle::LaneQ &curr, const MSVehicle::LaneQ &neigh, const MSVehicle::LaneQ &best, int bestLaneOffset, bool changeToBest, double currentDist, double neighDist, double laDist, double roundaboutBonus, double latLaneDist, bool checkOpposite, double &latDist)
compute strategic lane change actions TODO: Better documentation, refs #2
StateAndDist decideDirection(StateAndDist sd1, StateAndDist sd2) const override
decide in which direction to move in case both directions are desirable
double myImpatience
Definition: MSLCM_SL2015.h:434
double myOppositeParam
Definition: MSLCM_SL2015.h:425
double myLeftSpace
Definition: MSLCM_SL2015.h:389
std::pair< double, int > Info
information regarding save velocity (unused) and state flags of the ego vehicle
Definition: MSLCM_SL2015.h:215
void msg(const CLeaderDist &cld, double speed, int state)
send a speed recommendation to the given vehicle
double myLookaheadLeft
Definition: MSLCM_SL2015.h:443
int checkBlocking(const MSLane &neighLane, double &latDist, double maneuverDist, int laneOffset, const MSLeaderDistanceInfo &leaders, const MSLeaderDistanceInfo &followers, const MSLeaderDistanceInfo &blockers, const MSLeaderDistanceInfo &neighLeaders, const MSLeaderDistanceInfo &neighFollowers, const MSLeaderDistanceInfo &neighBlockers, std::vector< CLeaderDist > *collectLeadBlockers=0, std::vector< CLeaderDist > *collectFollowBlockers=0, bool keepLatGapManeuver=false, double gapFactor=0, int *retBlockedFully=0)
restrict latDist to permissible speed and determine blocking state depending on that distance
bool amBlockingLeader()
Definition: MSLCM_SL2015.h:194
double myStrategicParam
Definition: MSLCM_SL2015.h:421
double getVehicleCenter() const
return vehicle position relative to the current edge (extend by another virtual lane for opposite-dir...
int _wantsChangeSublane(int laneOffset, LaneChangeAction alternatives, const MSLeaderDistanceInfo &leaders, const MSLeaderDistanceInfo &followers, const MSLeaderDistanceInfo &blockers, const MSLeaderDistanceInfo &neighLeaders, const MSLeaderDistanceInfo &neighFollowers, const MSLeaderDistanceInfo &neighBlockers, const MSLane &neighLane, const std::vector< MSVehicle::LaneQ > &preb, MSVehicle **lastBlocked, MSVehicle **firstBlocked, double &latDist, double &maneuverDist, int &blocked)
helper function for doing the actual work
double getLateralDrift()
get lateral drift for the current step
double computeGapFactor(int state) const
compute the gap factor for the given state
double getPosLat()
get lateral position of this vehicle
bool preventSliding(double maneuverDist) const
bool isBidi(const MSLane *lane) const
check whether lane is an upcoming bidi lane
bool mustOvertakeStopped(const MSLane &neighLane, const MSLeaderDistanceInfo &leaders, const MSLeaderDistanceInfo &neighLead, double posOnLane, double neighDist, bool right, double latLaneDist, double &currentDist, double &latDist)
void * inform(void *info, MSVehicle *sender) override
double myMinGapLat
Definition: MSLCM_SL2015.h:428
void informFollower(int blocked, int dir, const CLeaderDist &neighFollow, double remainingSeconds, double plannedSpeed)
decide whether we will try cut in before the follower or allow to be overtaken
void setParameter(const std::string &key, const std::string &value) override
try to set the given parameter for this laneChangeModel. Throw exception for unsupported key
bool saveBlockerLength(double length, double foeLeftSpace) override
reserve space at the end of the lane to avoid dead locks
double myOvertakeDeltaSpeedFactor
Definition: MSLCM_SL2015.h:457
double myTurnAlignmentDist
Definition: MSLCM_SL2015.h:441
double myLeadingBlockerLength
Definition: MSLCM_SL2015.h:388
void setOwnState(const int state) override
int checkBlockingVehicles(const MSVehicle *ego, const MSLeaderDistanceInfo &vehicles, int laneOffset, double latDist, double foeOffset, bool leaders, double &safeLatGapRight, double &safeLatGapLeft, std::vector< CLeaderDist > *collectBlockers=0) const
check whether any of the vehicles overlaps with ego
void informFollowers(int blocked, int dir, const std::vector< CLeaderDist > &blockers, double remainingSeconds, double plannedSpeed)
call informFollower for multiple followers
double mySpeedGainLookahead
Definition: MSLCM_SL2015.h:449
virtual ~MSLCM_SL2015()
double mySpeedLossProbThreshold
Definition: MSLCM_SL2015.h:467
void resetState() override
bool myCFRelatedReady
Definition: MSLCM_SL2015.h:417
double mySpeedGainProbabilityLeft
a value for tracking the probability that a change to the left is beneficial
Definition: MSLCM_SL2015.h:381
bool amBlockingFollowerNB()
Definition: MSLCM_SL2015.h:200
double myAssertive
Definition: MSLCM_SL2015.h:432
double mySpeedGainRight
Definition: MSLCM_SL2015.h:445
static LaneChangeAction getLCA(int state, double latDist)
compute lane change action from desired lateral distance
double myChangeProbThresholdLeft
Definition: MSLCM_SL2015.h:465
void updateExpectedSublaneSpeeds(const MSLeaderDistanceInfo &ahead, int sublaneOffset, int laneIndex) override
update expected speeds for each sublane of the current edge
bool currentDistDisallows(double dist, int laneOffset, double lookForwardDist)
Definition: MSLCM_SL2015.h:206
double getExtraReservation(int bestLaneOffset) const override
reserve extra space for unseen blockers when more tnan one lane change is required
double myTimeToImpatience
Definition: MSLCM_SL2015.h:437
static int lowest_bit(int changeReason)
return the most important change reason
static CLeaderDist getSlowest(const MSLeaderDistanceInfo &ldi)
get the slowest vehicle in the given info
double myPushy
Definition: MSLCM_SL2015.h:430
bool amBlockingFollowerPlusNB()
Definition: MSLCM_SL2015.h:203
double myKeepRightParam
Definition: MSLCM_SL2015.h:424
double mySublaneParam
Definition: MSLCM_SL2015.h:426
Representation of a lane in the micro simulation.
Definition: MSLane.h:84
double getWidth() const
Returns the lane's width.
Definition: MSLane.h:590
saves leader/follower vehicles and their distances relative to an ego vehicle
Definition: MSLeaderInfo.h:144
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:77
const MSLane * getLane() const
Returns the lane the vehicle is on.
Definition: MSVehicle.h:577
A structure representing the best lanes for continuing the current route starting at 'lane'.
Definition: MSVehicle.h:857