77 myLaneChangeCompletion(1.0),
78 myLaneChangeDirection(0),
79 myLaneChangeMidpointPassed(false),
80 myAlreadyMoved(false),
83 myCarFollowModel(v.getCarFollowModel()),
84 myLastLaneChangeOffset(0) {
97 if (neighLeader == 0) {
120 if (leader->
getSpeed() < (80.0 / 3.6)) {
218 }
else if (dir < 0) {
MSAbstractLaneChangeModel(MSVehicle &v)
Constructor.
bool myHaveShadow
Wether a vehicle shadow exists.
Representation of a vehicle in the micro simulation.
bool isChangingLanes() const
return true if the vehicle currently performs a lane change maneuver
void endLaneChangeManeuver()
SUMOReal getLength() const
Returns the lane's length.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
std::string time2string(SUMOTime t)
SUMOReal getLength() const
Get vehicle's length [m].
virtual MSVehicle * removeVehicle(MSVehicle *remVehicle, MSMoveReminder::Notification notification, bool notify=true)
SUMOReal getWidth() const
Returns the lane's width.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
The vehicle got vaporized.
void leftByLaneChange(MSVehicle *v)
virtual bool predInteraction(const MSVehicle *const leader)
MSLane * myShadowLane
The lane the vehicle shadow is on during a continuous lane change.
void initLastLaneChangeOffset(int dir)
SUMOReal getPositionOnLane() const
Get the vehicle's position along the lane.
void enterLaneAtLaneChange(MSLane *enteredLane)
Update when the vehicle enters a new lane in the laneChange step.
#define WRITE_WARNING(msg)
A lane change model developed by J. Erdmann.
static bool myAllowOvertakingRight
whether overtaking on the right is permitted
const std::string & getID() const
Returns the id.
The vehicle changes lanes (micro only)
A lane change model developed by D. Krajzewicz, J. Erdmann et al. between 2004 and 2013...
bool cancelRequest(int state)
whether the influencer cancels the given request
void continueLaneChangeManeuver(bool moved)
void removeLaneChangeShadow()
remove the shadow copy of a lane change maneuver
virtual SUMOReal interactionGap(const MSVehicle *const veh, SUMOReal vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
bool myLaneChangeMidpointPassed
whether myLane has already been set to the target of the lane-change maneuver
void enteredByLaneChange(MSVehicle *v)
MSLane * getParallelLane(int offset) const
Returns the lane with the given offset parallel to this one or 0 if it does not exist.
SUMOReal getSpeedLimit() const
Returns the lane's maximum allowed speed.
int myLaneChangeDirection
direction of the lane change maneuver -1 means right, 1 means left
static void initGlobalOptions(const OptionsCont &oc)
init global model parameters
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
bool myAlreadyMoved
whether the vehicle has already moved this step
bool startLaneChangeManeuver(MSLane *source, MSLane *target, int direction)
start the lane change maneuver and return whether it continues
void leaveLane(const MSMoveReminder::Notification reason)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
MSVehicle & myVehicle
The vehicle this lane-changer belongs to.
SUMOTime myLastLaneChangeOffset
bool fixPosition()
repair errors in vehicle position after changing between internal edges
A storage for options typed value containers)
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
SUMOReal getSpeed() const
Returns the vehicle's current speed.
virtual void changed(int dir)=0
A lane change model developed by D. Krajzewicz between 2004 and 2010.
MSLane * getLane() const
Returns the lane the vehicle is on.
SUMOReal myLaneChangeCompletion
progress of the lane change maneuver 0:started, 1:complete
int influenceChangeDecision(int state)
allow TraCI to influence a lane change decision
static SUMOTime gLaneChangeDuration
static MSAbstractLaneChangeModel * build(LaneChangeModel lcm, MSVehicle &vehicle)
Factory method for instantiating new lane changing models.
Representation of a lane in the micro simulation.
const MSCFModel & myCarFollowModel
The vehicle's car following model.
Interface for lane-change models.
const std::string & getID() const
Returns the name of the vehicle.
virtual bool congested(const MSVehicle *const neighLeader)
virtual ~MSAbstractLaneChangeModel()
Destructor.