97 if (neighLeader == 0) {
120 if (leader->
getSpeed() < (80.0 / 3.6)) {
137 for (
int i = 0; i < (int)further.size(); i++) {
262 }
else if (dir < 0) {
MSAbstractLaneChangeModel(MSVehicle &v)
Constructor.
std::vector< MSLane * > myPartiallyOccupatedByShadow
list of lanes where the shadow vehicle is partial occupator
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
The vehicle arrived at a junction.
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)
Notification
Definition of a vehicle state.
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.
SUMOReal setPartialOccupation(MSVehicle *v, SUMOReal leftVehicleLength)
Sets the information about a vehicle lapping into this lane.
#define WRITE_WARNING(msg)
A lane change model developed by J. Erdmann.
Right blinker lights are switched on.
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...
Left blinker lights are switched on.
MSLane * getLogicalPredecessorLane() const
get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached ...
bool cancelRequest(int state)
whether the influencer cancels the given request
void continueLaneChangeManeuver(bool moved)
std::vector< MSLane * > myNoPartiallyOccupatedByShadow
void resetPartialOccupation(MSVehicle *v)
Removes the information about a vehicle lapping into this lane.
void setShadowPartialOccupator(MSLane *lane)
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
MSLane * getShadowLane() const
Returns the lane the vehicles shadow is on during continuouss lane change.
int myOwnState
The current state of the vehicle.
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.
const std::vector< MSLane * > & getFurtherLanes() const
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.
void switchOffSignal(int signal)
Switches the given signal off.
void switchOnSignal(int signal)
Switches the given signal on.
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
void removeLaneChangeShadow(const MSMoveReminder::Notification reason, bool notify=true)
remove the shadow copy of a lane change maneuver
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)
void endLaneChangeManeuver(const MSMoveReminder::Notification reason=MSMoveReminder::NOTIFICATION_LANE_CHANGE)
virtual ~MSAbstractLaneChangeModel()
Destructor.