SUMO - Simulation of Urban MObility
|
A lane change model developed by D. Krajzewicz between 2004 and 2010. More...
#include <MSLCM_DK2004.h>
Public Member Functions | |
virtual void | changed () |
virtual void | fulfillChangeRequest (MSVehicle::ChangeRequest request) |
SUMOReal | getChangeProbability () const |
int | getOwnState () const |
SUMOReal | getProb () const |
virtual void * | inform (void *info, MSVehicle *sender) |
MSLCM_DK2004 (MSVehicle &v) | |
virtual 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. More... | |
virtual void | prepareStep () |
virtual void | requestLaneChange (MSVehicle::ChangeRequest request) |
void | setOwnState (int state) |
virtual int | wantsChangeToLeft (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) |
Called to examine whether the vehicle wants to change to left This method gets the information about the surrounding vehicles and whether another lane may be more preferable. More... | |
virtual int | wantsChangeToRight (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) |
Called to examine whether the vehicle wants to change to right This method gets the information about the surrounding vehicles and whether another lane may be more preferable. More... | |
virtual | ~MSLCM_DK2004 () |
Protected Types | |
typedef std::pair< SUMOReal, int > | Info |
Protected Member Functions | |
bool | amBlockingFollower () |
bool | amBlockingFollowerNB () |
bool | amBlockingFollowerPlusNB () |
bool | amBlockingLeader () |
virtual bool | congested (const MSVehicle *const neighLeader) |
bool | currentDistAllows (SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) |
bool | currentDistDisallows (SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) |
void | informBlocker (MSAbstractLaneChangeModel::MSLCMessager &msgPass, int &blocked, int dir, const std::pair< MSVehicle *, SUMOReal > &neighLead, const std::pair< MSVehicle *, SUMOReal > &neighFollow) |
virtual bool | predInteraction (const MSVehicle *const leader) |
Protected Attributes | |
const MSCFModel & | myCarFollowModel |
The vehicle's car following model. More... | |
SUMOReal | myChangeProbability |
MSVehicle::ChangeRequest | myChangeRequest |
bool | myDontBrake |
SUMOReal | myLeadingBlockerLength |
SUMOReal | myLeftSpace |
int | myOwnState |
The current state of the vehicle. More... | |
MSVehicle & | myVehicle |
The vehicle this lane-changer belongs to. More... | |
std::vector< SUMOReal > | myVSafes |
A lane change model developed by D. Krajzewicz between 2004 and 2010.
Definition at line 64 of file MSLCM_DK2004.h.
|
protected |
Definition at line 142 of file MSLCM_DK2004.h.
MSLCM_DK2004::MSLCM_DK2004 | ( | MSVehicle & | v | ) |
Definition at line 70 of file MSLCM_DK2004.cpp.
|
virtual |
Definition at line 75 of file MSLCM_DK2004.cpp.
References changed().
|
inlineprotected |
Definition at line 126 of file MSLCM_DK2004.h.
References LCA_AMBLOCKINGFOLLOWER, and MSAbstractLaneChangeModel::myOwnState.
|
inlineprotected |
Definition at line 129 of file MSLCM_DK2004.h.
References LCA_AMBLOCKINGFOLLOWER_DONTBRAKE, and MSAbstractLaneChangeModel::myOwnState.
|
inlineprotected |
Definition at line 132 of file MSLCM_DK2004.h.
References LCA_AMBLOCKINGFOLLOWER, LCA_AMBLOCKINGFOLLOWER_DONTBRAKE, and MSAbstractLaneChangeModel::myOwnState.
Referenced by wantsChangeToLeft(), and wantsChangeToRight().
|
inlineprotected |
Definition at line 123 of file MSLCM_DK2004.h.
References LCA_AMBLOCKINGLEADER, and MSAbstractLaneChangeModel::myOwnState.
|
virtual |
Implements MSAbstractLaneChangeModel.
Definition at line 611 of file MSLCM_DK2004.cpp.
References myChangeProbability, myDontBrake, myLeadingBlockerLength, myLeftSpace, MSAbstractLaneChangeModel::myOwnState, and myVSafes.
Referenced by patchSpeed(), and ~MSLCM_DK2004().
|
inlineprotectedvirtualinherited |
Definition at line 263 of file MSAbstractLaneChangeModel.h.
References MSVehicle::congested(), MSVehicle::getLane(), MSLane::getSpeedLimit(), and MSAbstractLaneChangeModel::myVehicle.
Referenced by wantsChangeToLeft(), and wantsChangeToRight().
|
inlineprotected |
Definition at line 138 of file MSLCM_DK2004.h.
References abs.
Referenced by wantsChangeToLeft(), and wantsChangeToRight().
|
inlineprotected |
Definition at line 135 of file MSLCM_DK2004.h.
References abs.
Referenced by wantsChangeToLeft(), and wantsChangeToRight().
|
inlinevirtualinherited |
Inform the model that a certain lane change request has been fulfilled by the lane changer, so the request won't be taken into account the next time.
request | indicates the request that was fulfilled |
Definition at line 255 of file MSAbstractLaneChangeModel.h.
References MSAbstractLaneChangeModel::myChangeRequest, and MSVehicle::REQUEST_NONE.
Referenced by MSLaneChanger::change().
|
inline |
Definition at line 112 of file MSLCM_DK2004.h.
References myChangeProbability.
|
inlineinherited |
Definition at line 186 of file MSAbstractLaneChangeModel.h.
References MSAbstractLaneChangeModel::myOwnState.
Referenced by MSLaneChanger::change(), and MSVehicle::setBlinkerInformation().
SUMOReal MSLCM_DK2004::getProb | ( | ) | const |
Definition at line 660 of file MSLCM_DK2004.cpp.
References myChangeProbability.
|
virtual |
Implements MSAbstractLaneChangeModel.
Definition at line 601 of file MSLCM_DK2004.cpp.
References MSAbstractLaneChangeModel::myOwnState.
|
protected |
Definition at line 622 of file MSLCM_DK2004.cpp.
References ACCEL2DIST, MSCFModel::followSpeed(), MSVehicle::getCarFollowModel(), MSCFModel::getMaxDecel(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSAbstractLaneChangeModel::MSLCMessager::informNeighFollower(), MSAbstractLaneChangeModel::MSLCMessager::informNeighLeader(), LCA_AMBLOCKINGFOLLOWER, LCA_AMBLOCKINGFOLLOWER_DONTBRAKE, LCA_AMBLOCKINGLEADER, LCA_BLOCKED_BY_FOLLOWER, LCA_BLOCKED_BY_LEADER, MAX2(), MSAbstractLaneChangeModel::myCarFollowModel, MSAbstractLaneChangeModel::myVehicle, SPEED2DIST, and SUMOReal.
Referenced by wantsChangeToLeft(), and wantsChangeToRight().
|
virtual |
Called to adapt the speed in order to allow a lane change.
min | The minimum resulting speed |
wanted | The aspired speed of the car following model |
max | The maximum resulting speed |
cfModel | The model used |
Implements MSAbstractLaneChangeModel.
Definition at line 507 of file MSLCM_DK2004.cpp.
References bla, changed(), MSVehicle::getCarFollowModel(), MSLane::getEdge(), MSVehicle::getLane(), MSEdge::getLanes(), MSVehicleType::getMinGap(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), GLO_VEHICLE, gSelected, GUISelectedStorage::isSelected(), LCA_AMBACKBLOCKER, LCA_AMBACKBLOCKER_STANDING, LCA_AMBLOCKINGFOLLOWER, LCA_AMBLOCKINGFOLLOWER_DONTBRAKE, LCA_AMBLOCKINGLEADER, LCA_BLOCKED, LCA_BLOCKED_BY_FOLLOWER, LCA_BLOCKED_BY_LEADER, LCA_WANTS_LANECHANGE, MAX2(), MSCFModel::maxNextSpeed(), min, MIN2(), myDontBrake, myLeadingBlockerLength, myLeftSpace, MSAbstractLaneChangeModel::myOwnState, MSAbstractLaneChangeModel::myVehicle, myVSafes, MSCFModel::stopSpeed(), and SUMOReal.
|
inlineprotectedvirtualinherited |
Definition at line 280 of file MSAbstractLaneChangeModel.h.
References MSVehicleType::getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSCFModel::interactionGap(), MSAbstractLaneChangeModel::myCarFollowModel, MSAbstractLaneChangeModel::myVehicle, and SUMOReal.
Referenced by wantsChangeToLeft(), and wantsChangeToRight().
|
virtual |
Reimplemented from MSAbstractLaneChangeModel.
Definition at line 651 of file MSLCM_DK2004.cpp.
References myDontBrake, myLeadingBlockerLength, myLeftSpace, and myVSafes.
|
inlinevirtualinherited |
The vehicle is requested to change the lane as soon as possible without violating any directives defined by this lane change model
request | indicates the requested change |
Definition at line 245 of file MSAbstractLaneChangeModel.h.
References MSAbstractLaneChangeModel::myChangeRequest.
Referenced by MSVehicle::enterLaneAtLaneChange(), MSVehicle::enterLaneAtMove(), and TraCIServerAPI_Vehicle::processSet().
|
inlineinherited |
Definition at line 190 of file MSAbstractLaneChangeModel.h.
References MSAbstractLaneChangeModel::myOwnState.
Referenced by MSLaneChanger::change().
|
virtual |
Called to examine whether the vehicle wants to change to left This method gets the information about the surrounding vehicles and whether another lane may be more preferable.
!!
Implements MSAbstractLaneChangeModel.
Definition at line 298 of file MSLCM_DK2004.cpp.
References ACCEL2SPEED, amBlockingFollowerPlusNB(), MSVehicle::LaneQ::bestLaneOffset, bla, MSAbstractLaneChangeModel::congested(), currentDistAllows(), currentDistDisallows(), MSCFModel::followSpeed(), MSVehicle::getCarFollowModel(), MSVehicle::getLane(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), MSVehicleType::getMaxSpeed(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), GLO_VEHICLE, gSelected, informBlocker(), GUISelectedStorage::isSelected(), JAM_FACTOR2, MSVehicle::LaneQ::lane, LCA_AMBACKBLOCKER, LCA_AMBACKBLOCKER_STANDING, LCA_AMBLOCKINGFOLLOWER_DONTBRAKE, LCA_BLOCKED, LCA_LEFT, LCA_MLEFT, LCA_RIGHT, LCA_SPEEDGAIN, LCA_URGENT, MSVehicle::LaneQ::length, LOOK_FORWARD_FAR, LOOK_FORWARD_NEAR, LOOK_FORWARD_SPEED_DIVIDER, MAX2(), MIN2(), MSAbstractLaneChangeModel::myCarFollowModel, myChangeProbability, MSAbstractLaneChangeModel::myChangeRequest, myDontBrake, myLeadingBlockerLength, myLeftSpace, MSAbstractLaneChangeModel::myOwnState, MSAbstractLaneChangeModel::myVehicle, myVSafes, MSVehicle::LaneQ::occupation, MSAbstractLaneChangeModel::predInteraction(), MSVehicle::REQUEST_LEFT, and SUMOReal.
|
virtual |
Called to examine whether the vehicle wants to change to right This method gets the information about the surrounding vehicles and whether another lane may be more preferable.
!!
Implements MSAbstractLaneChangeModel.
Definition at line 81 of file MSLCM_DK2004.cpp.
References ACCEL2SPEED, amBlockingFollowerPlusNB(), MSVehicle::LaneQ::bestLaneOffset, bla, MSAbstractLaneChangeModel::congested(), currentDistAllows(), currentDistDisallows(), MSCFModel::followSpeed(), MSVehicle::getCarFollowModel(), MSVehicle::getLane(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), MSVehicleType::getMaxSpeed(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSLane::getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), GLO_VEHICLE, gSelected, informBlocker(), GUISelectedStorage::isSelected(), JAM_FACTOR2, MSVehicle::LaneQ::lane, LCA_AMBACKBLOCKER, LCA_AMBACKBLOCKER_STANDING, LCA_AMBLOCKINGFOLLOWER_DONTBRAKE, LCA_BLOCKED, LCA_LEFT, LCA_MRIGHT, LCA_RIGHT, LCA_SPEEDGAIN, LCA_URGENT, MSVehicle::LaneQ::length, LOOK_FORWARD_FAR, LOOK_FORWARD_NEAR, LOOK_FORWARD_SPEED_DIVIDER, MAX2(), MIN2(), MSAbstractLaneChangeModel::myCarFollowModel, myChangeProbability, MSAbstractLaneChangeModel::myChangeRequest, myDontBrake, myLeadingBlockerLength, myLeftSpace, MSAbstractLaneChangeModel::myOwnState, MSAbstractLaneChangeModel::myVehicle, myVSafes, MSVehicle::LaneQ::occupation, MSAbstractLaneChangeModel::predInteraction(), MSVehicle::REQUEST_HOLD, MSVehicle::REQUEST_RIGHT, and SUMOReal.
|
protectedinherited |
The vehicle's car following model.
Definition at line 307 of file MSAbstractLaneChangeModel.h.
Referenced by informBlocker(), MSAbstractLaneChangeModel::predInteraction(), wantsChangeToLeft(), and wantsChangeToRight().
|
protected |
Definition at line 147 of file MSLCM_DK2004.h.
Referenced by changed(), getChangeProbability(), getProb(), wantsChangeToLeft(), and wantsChangeToRight().
|
protectedinherited |
Definition at line 303 of file MSAbstractLaneChangeModel.h.
Referenced by MSAbstractLaneChangeModel::fulfillChangeRequest(), MSAbstractLaneChangeModel::requestLaneChange(), wantsChangeToLeft(), and wantsChangeToRight().
|
protected |
Definition at line 153 of file MSLCM_DK2004.h.
Referenced by changed(), patchSpeed(), prepareStep(), wantsChangeToLeft(), and wantsChangeToRight().
|
protected |
Definition at line 149 of file MSLCM_DK2004.h.
Referenced by changed(), patchSpeed(), prepareStep(), wantsChangeToLeft(), and wantsChangeToRight().
|
protected |
Definition at line 150 of file MSLCM_DK2004.h.
Referenced by changed(), patchSpeed(), prepareStep(), wantsChangeToLeft(), and wantsChangeToRight().
|
protectedinherited |
The current state of the vehicle.
Definition at line 299 of file MSAbstractLaneChangeModel.h.
Referenced by amBlockingFollower(), amBlockingFollowerNB(), amBlockingFollowerPlusNB(), amBlockingLeader(), changed(), MSAbstractLaneChangeModel::getOwnState(), inform(), patchSpeed(), MSAbstractLaneChangeModel::setOwnState(), wantsChangeToLeft(), and wantsChangeToRight().
|
protectedinherited |
The vehicle this lane-changer belongs to.
Definition at line 296 of file MSAbstractLaneChangeModel.h.
Referenced by MSAbstractLaneChangeModel::congested(), informBlocker(), patchSpeed(), MSAbstractLaneChangeModel::predInteraction(), wantsChangeToLeft(), and wantsChangeToRight().
|
protected |
Definition at line 152 of file MSLCM_DK2004.h.
Referenced by changed(), patchSpeed(), prepareStep(), wantsChangeToLeft(), and wantsChangeToRight().