Eclipse SUMO - Simulation of Urban MObility
MSLane Class Reference

Representation of a lane in the micro simulation. More...

#include <MSLane.h>

Inheritance diagram for MSLane:
Collaboration diagram for MSLane:

Data Structures

class  AnyVehicleIterator
 AnyVehicleIterator is a structure, which manages the iteration through all vehicles on the lane, that may be of importance for the car-following dynamics along that lane. The relevant types of vehicles are: 1) vehicles with their front on the lane (myVehicles), 2) vehicles intersecting the lane but with front on another lane (myPartialVehicles) More...
 
class  by_connections_to_sorter
 Sorts edges by their angle relative to the given edge (straight comes first) More...
 
class  edge_finder
 
class  incoming_lane_priority_sorter
 Sorts lanes (IncomingLaneInfos) by their priority or, if this doesn't apply, wrt. the angle difference magnitude relative to the target lane's angle (straight comes first) More...
 
struct  IncomingLaneInfo
 
class  outgoing_lane_priority_sorter
 Sorts lanes (their origin link) by the priority of their noninternal target edges or, if this doesn't yield an unambiguous result, wrt. the angle difference magnitude relative to the target lane's angle (straight comes first) More...
 
class  vehicle_natural_position_sorter
 
class  vehicle_position_sorter
 Sorts vehicles by their position (descending) More...
 
struct  VehPosition
 

Public Types

enum  CollisionAction { COLLISION_ACTION_NONE, COLLISION_ACTION_WARN, COLLISION_ACTION_TELEPORT, COLLISION_ACTION_REMOVE }
 
typedef std::vector< MSVehicle * > VehCont
 Container for vehicles. More...
 

Public Member Functions

void addApproachingLane (MSLane *lane, bool warnMultiCon)
 
void addIncomingLane (MSLane *lane, MSLink *viaLink)
 
void addParking (MSVehicle *veh)
 add parking vehicle. This should only used during state loading More...
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
bool allowsVehicleClass (SUMOVehicleClass vclass) const
 
virtual bool appropriate (const MSVehicle *veh)
 
void changeLanes (const SUMOTime time)
 
void checkBufferType ()
 
void clearParameter ()
 Clears the parameter map. More...
 
virtual void detectCollisions (SUMOTime timestep, const std::string &stage)
 Check if vehicles are too close. More...
 
bool empty () const
 Returns true if there is not a single vehicle on the lane. More...
 
void enteredByLaneChange (MSVehicle *v)
 
MSLanegetBidiLane () const
 retrieve bidirectional lane or nullptr More...
 
MSLanegetCanonicalPredecessorLane () const
 
MSLanegetCanonicalSuccessorLane () const
 
double getCenterOnEdge () const
 
std::pair< MSVehicle *const, double > getCriticalLeader (double dist, double seen, double speed, const MSVehicle &veh) const
 Returns the most dangerous leader and the distance to him. More...
 
int getCrossingIndex () const
 return the index of the link to the next crossing if this is walkingArea, else -1 More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
MSEdgegetEdge () const
 Returns the lane's edge. More...
 
MSLinkgetEntryLink () const
 Returns the entry link if this is an internal lane, else 0. More...
 
MSVehiclegetFirstAnyVehicle () const
 returns the first vehicle that is fully or partially on this lane More...
 
MSVehiclegetFirstFullVehicle () const
 returns the first vehicle for which this lane is responsible or 0 More...
 
const MSLanegetFirstInternalInConnection (double &offset) const
 Returns 0 if the lane is not internal. Otherwise the first part of the connection (sequence of internal lanes along junction) corresponding to the lane is returned and the offset is set to the distance of the begin of this lane to the begin of the returned. More...
 
std::pair< MSVehicle *const, double > getFollower (const MSVehicle *ego, double egoPos, double dist, bool ignoreMinorLinks) const
 Find follower vehicle for the given ego vehicle (which may be on the opposite direction lane) More...
 
MSLeaderDistanceInfo getFollowersOnConsecutive (const MSVehicle *ego, double backOffset, bool allSublanes, double searchDist=-1, bool ignoreMinorLinks=false) const
 return the sublane followers with the largest missing rear gap among all predecessor lanes (within dist) More...
 
const std::string & getID () const
 Returns the id. More...
 
const std::vector< IncomingLaneInfo > & getIncomingLanes () const
 
LinkState getIncomingLinkState () const
 get the state of the link from the logical predecessor to this lane More...
 
MSVehiclegetLastAnyVehicle () const
 returns the last vehicle that is fully or partially on this lane More...
 
MSVehiclegetLastFullVehicle () const
 returns the last vehicle for which this lane is responsible or 0 More...
 
std::pair< MSVehicle *const, double > getLeader (const MSVehicle *veh, const double vehPos, const std::vector< MSLane * > &bestLaneConts, double dist=-1, bool checkTmpVehicles=false) const
 Returns the immediate leader of veh and the distance to veh starting on this lane. More...
 
std::pair< MSVehicle *const, double > getLeaderOnConsecutive (double dist, double seen, double speed, const MSVehicle &veh, const std::vector< MSLane * > &bestLaneConts) const
 Returns the immediate leader and the distance to him. More...
 
void getLeadersOnConsecutive (double dist, double seen, double speed, const MSVehicle *ego, const std::vector< MSLane * > &bestLaneConts, MSLeaderDistanceInfo &result) const
 Returns the immediate leaders and the distance to them (as getLeaderOnConsecutive but for the sublane case) More...
 
const MSLinkContgetLinkCont () const
 returns the container with all links !!! More...
 
MSLinkgetLinkTo (const MSLane *) const
 returns the link to the given lane or 0, if it is not connected More...
 
MSLanegetLogicalPredecessorLane () const
 get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached in myLogicalPredecessorLane More...
 
MSLanegetLogicalPredecessorLane (const MSEdge &fromEdge) const
 return the (first) predecessor lane from the given edge More...
 
double getMissingRearGap (const MSVehicle *leader, double backOffset, double leaderSpeed) const
 return by how much further the leader must be inserted to avoid rear end collisions More...
 
const MSEdgegetNextNormal () const
 Returns the lane's follower if it is an internal lane, the edge of the lane otherwise. More...
 
const MSLanegetNormalPredecessorLane () const
 get normal lane leading to this internal lane, for normal lanes, the lane itself is returned More...
 
MSLanegetOpposite () const
 return the opposite direction lane for lane changing or 0 More...
 
std::pair< MSVehicle *const, double > getOppositeFollower (const MSVehicle *ego) const
 
std::pair< MSVehicle *const, double > getOppositeLeader (const MSVehicle *ego, double dist, bool oppositeDir) const
 
double getOppositePos (double pos) const
 return the corresponding position on the opposite lane More...
 
const std::vector< std::pair< const MSLane *, const MSEdge * > > getOutgoingViaLanes () const
 get the list of outgoing lanes More...
 
MSLanegetParallelLane (int offset, bool includeOpposite=true) const
 Returns the lane with the given offset parallel to this one or 0 if it does not exist. More...
 
const std::string getParameter (const std::string &key, const std::string &defaultValue="") const
 Returns the value for a given key. More...
 
const std::map< std::string, std::string > & getParametersMap () const
 Returns the inner key/value map. More...
 
const std::set< const MSVehicle * > & getParkingVehicles () const
 retrieve the parking vehicles (see GUIParkingArea) More...
 
MSVehiclegetPartialBehind (const MSVehicle *ego) const
 
MSLeaderInfo getPartialBeyond () const
 get all vehicles that are inlapping from consecutive edges More...
 
int getRightmostSublane () const
 
double getRightSideOnEdge () const
 
std::mt19937 * getRNG () const
 return the associated RNG More...
 
int getRNGIndex () const
 returns the associated RNG index More...
 
double getStopOffset (const MSVehicle *veh) const
 Returns vehicle class specific stopOffset for the vehicle. More...
 
const std::map< SVCPermissions, double > & getStopOffsets () const
 Returns vehicle class specific stopOffsets. More...
 
std::set< MSVehicle * > getSurroundingVehicles (double startPos, double downstreamDist, double upstreamDist, std::shared_ptr< LaneCoverageInfo > checkedLanes) const
 Returns all vehicles closer than downstreamDist along the along the road network starting on the given position. Predecessor lanes are searched upstream for the given upstreamDistance. More...
 
std::vector< const MSJunction * > getUpcomingJunctions (double pos, double range, const std::vector< MSLane * > &contLanes) const
 Returns all upcoming junctions within given range along the given (non-internal) continuation lanes measured from given position. More...
 
std::vector< const MSLink * > getUpcomingLinks (double pos, double range, const std::vector< MSLane * > &contLanes) const
 Returns all upcoming junctions within given range along the given (non-internal) continuation lanes measured from given position. More...
 
std::set< MSVehicle * > getVehiclesInRange (const double a, const double b) const
 Returns all vehicles on the lane overlapping with the interval [a,b]. More...
 
void initRestrictions ()
 initialized vClass-specific speed limits More...
 
bool isApproachedFrom (MSEdge *const edge)
 
bool isApproachedFrom (MSEdge *const edge, MSLane *const lane)
 
bool isEmpty () const
 
bool isInternal () const
 
bool isLinkEnd (MSLinkCont::const_iterator &i) const
 
bool isLinkEnd (MSLinkCont::iterator &i)
 
virtual bool isSelected () const
 whether this lane is selected in the GUI More...
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
void leftByLaneChange (MSVehicle *v)
 
 MSLane (const std::string &id, double maxSpeed, double length, MSEdge *const edge, int numericalID, const PositionVector &shape, double width, SVCPermissions permissions, int index, bool isRampAccel, const std::string &type)
 Constructor. More...
 
bool mustCheckJunctionCollisions () const
 whether this lane must check for junction collisions More...
 
bool needsCollisionCheck () const
 short-circut collision check if nothing changed since the last check More...
 
virtual void removeParking (MSVehicle *veh)
 remove parking vehicle. This must be syncrhonized when running with GUI More...
 
virtual MSVehicleremoveVehicle (MSVehicle *remVehicle, MSMoveReminder::Notification notification, bool notify=true)
 
void requireCollisionCheck ()
 require another collision check due to relevant changes in the simulation More...
 
void resetPermissions (long long transientID)
 
void setID (const std::string &newID)
 resets the id More...
 
void setLength (double val)
 Sets a new length for the lane (used by TraCI only) More...
 
void setMaxSpeed (double val)
 Sets a new maximum speed for the lane (used by TraCI and MSCalibrator) More...
 
void setParameter (const std::string &key, const std::string &value)
 Sets a parameter. More...
 
void setPermissions (SVCPermissions permissions, long long transientID)
 Sets the permissions to the given value. If a transientID is given, the permissions are recored as temporary. More...
 
void setRightSideOnEdge (double value, int rightmostSublane)
 
void setRNGIndex (const int rngIndex)
 sets the associated RNG index More...
 
void setStopOffsets (std::map< SVCPermissions, double > stopOffsets)
 Set vehicle class specific stopOffsets. More...
 
void sortManeuverReservations ()
 sorts myManeuverReservations More...
 
void sortPartialVehicles ()
 sorts myPartialVehicles More...
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameter (const std::map< std::string, std::string > &mapArg)
 Adds or updates all given parameters from the map. More...
 
void visit (const LaneStoringVisitor &cont) const
 Callback for visiting the lane when traversing an RTree. More...
 
void writeParams (OutputDevice &device) const
 write Params in the given outputdevice More...
 
virtual ~MSLane ()
 Destructor. More...
 
Additional initialisation
void addLink (MSLink *link)
 Delayed initialization. More...
 
void addNeigh (const std::string &id)
 Adds a neighbor to this lane. More...
 
interaction with MSMoveReminder
virtual void addMoveReminder (MSMoveReminder *rem)
 Add a move-reminder to move-reminder container. More...
 
const std::vector< MSMoveReminder * > & getMoveReminders () const
 Return the list of this lane's move reminders. More...
 
Vehicle insertion
bool insertVehicle (MSVehicle &v)
 Tries to insert the given vehicle. More...
 
bool isInsertionSuccess (MSVehicle *vehicle, double speed, double pos, double posLat, bool recheckNextLanes, MSMoveReminder::Notification notification)
 Tries to insert the given vehicle with the given state (speed and pos) More...
 
bool checkFailure (const MSVehicle *aVehicle, double &speed, double &dist, const double nspeed, const bool patchSpeed, const std::string errorMsg) const
 
bool lastInsertion (MSVehicle &veh, double mspeed, double posLat, bool patchSpeed)
 inserts vehicle as close as possible to the last vehicle on this lane (or at the end of the lane if there is no leader) More...
 
bool freeInsertion (MSVehicle &veh, double speed, double posLat, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
 Tries to insert the given vehicle on any place. More...
 
void forceVehicleInsertion (MSVehicle *veh, double pos, MSMoveReminder::Notification notification, double posLat=0)
 Inserts the given vehicle at the given position. More...
 
Handling vehicles lapping into several lanes (-> partial occupation)

or which committed a maneuver that will lead them into another (sublane case -> maneuver reservations)

virtual double setPartialOccupation (MSVehicle *v)
 Sets the information about a vehicle lapping into this lane. More...
 
virtual void resetPartialOccupation (MSVehicle *v)
 Removes the information about a vehicle lapping into this lane. More...
 
virtual void setManeuverReservation (MSVehicle *v)
 Registers the lane change intentions (towards this lane) for the given vehicle. More...
 
virtual void resetManeuverReservation (MSVehicle *v)
 Unregisters a vehicle, which previously registered for maneuvering into this lane. More...
 
const MSLeaderInfo getLastVehicleInformation (const MSVehicle *ego, double latOffset, double minPos=0, bool allowCached=true) const
 Returns the last vehicles on the lane. More...
 
const MSLeaderInfo getFirstVehicleInformation (const MSVehicle *ego, double latOffset, bool onlyFrontOnLane, double maxPos=std::numeric_limits< double >::max(), bool allowCached=true) const
 analogue to getLastVehicleInformation but in the upstream direction More...
 
Access to vehicles
int getVehicleNumber () const
 Returns the number of vehicles on this lane (for which this lane is responsible) More...
 
int getVehicleNumberWithPartials () const
 Returns the number of vehicles on this lane (including partial occupators) More...
 
int getPartialVehicleNumber () const
 Returns the number of vehicles partially on this lane (for which this lane is not responsible) More...
 
virtual const VehContgetVehiclesSecure () const
 Returns the vehicles container; locks it for microsimulation. More...
 
AnyVehicleIterator anyVehiclesBegin () const
 begin iterator for iterating over all vehicles touching this lane in downstream direction More...
 
AnyVehicleIterator anyVehiclesEnd () const
 end iterator for iterating over all vehicles touching this lane in downstream direction More...
 
AnyVehicleIterator anyVehiclesUpstreamBegin () const
 begin iterator for iterating over all vehicles touching this lane in upstream direction More...
 
AnyVehicleIterator anyVehiclesUpstreamEnd () const
 end iterator for iterating over all vehicles touching this lane in upstream direction More...
 
virtual void releaseVehicles () const
 Allows to use the container for microsimulation again. More...
 
Atomar value getter
int getNumericalID () const
 Returns this lane's numerical id. More...
 
const PositionVectorgetShape () const
 Returns this lane's shape. More...
 
double getLengthGeometryFactor () const
 return shape.length() / myLength More...
 
bool isAccelLane () const
 return whether this lane is an acceleration lane More...
 
const std::string & getLaneType () const
 return the type of this lane More...
 
double interpolateLanePosToGeometryPos (double lanePos) const
 
const Position geometryPositionAtOffset (double offset, double lateralOffset=0) const
 
double interpolateGeometryPosToLanePos (double geometryPos) const
 
double getVehicleMaxSpeed (const SUMOTrafficObject *const veh) const
 Returns the lane's maximum speed, given a vehicle's speed limit adaptation. More...
 
double getSpeedLimit () const
 Returns the lane's maximum allowed speed. More...
 
double getLength () const
 Returns the lane's length. More...
 
SVCPermissions getPermissions () const
 Returns the vehicle class permissions for this lane. More...
 
double getWidth () const
 Returns the lane's width. More...
 
int getIndex () const
 Returns the lane's index. More...
 
Vehicle movement (longitudinal)
virtual void planMovements (const SUMOTime t)
 Compute safe velocities for all vehicles based on positions and speeds from the last time step. Also registers ApproachingVehicleInformation for all links. More...
 
virtual void setJunctionApproaches (const SUMOTime t) const
 Register junction approaches for all vehicles after velocities have been planned. More...
 
void updateLeaderInfo (const MSVehicle *veh, VehCont::reverse_iterator &vehPart, VehCont::reverse_iterator &vehRes, MSLeaderInfo &ahead) const
 This updates the MSLeaderInfo argument with respect to the given MSVehicle. All leader-vehicles on the same edge, which are relevant for the vehicle (i.e. with position > vehicle's position) and not already integrated into the LeaderInfo, are integrated. The given iterators vehPart and vehRes give access to these vehicles which are either partial occupators or have issued a maneuver reservation for the lane (the latter occurs only for the sublane model). More...
 
virtual void executeMovements (const SUMOTime t)
 Executes planned vehicle movements with regards to right-of-way. More...
 
virtual void integrateNewVehicles ()
 Insert buffered vehicle into the real lane. More...
 
void updateLengthSum ()
 updated current vehicle length sum (delayed to avoid lane-order-dependency) More...
 
Current state retrieval
double getMeanSpeed () const
 Returns the mean speed on this lane. More...
 
double getWaitingSeconds () const
 Returns the overall waiting time on this lane. More...
 
double getBruttoOccupancy () const
 Returns the brutto (including minGaps) occupancy of this lane during the last step. More...
 
double getNettoOccupancy () const
 Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps) More...
 
double getBruttoVehLenSum () const
 Returns the sum of lengths of vehicles, including their minGaps, which were on the lane during the last step. More...
 
double getCO2Emissions () const
 Returns the sum of last step CO2 emissions. More...
 
double getCOEmissions () const
 Returns the sum of last step CO emissions. More...
 
double getPMxEmissions () const
 Returns the sum of last step PMx emissions. More...
 
double getNOxEmissions () const
 Returns the sum of last step NOx emissions. More...
 
double getHCEmissions () const
 Returns the sum of last step HC emissions. More...
 
double getFuelConsumption () const
 Returns the sum of last step fuel consumption. More...
 
double getElectricityConsumption () const
 Returns the sum of last step electricity consumption. More...
 
double getHarmonoise_NoiseEmissions () const
 Returns the sum of last step noise emissions. More...
 
State saving/loading
void saveState (OutputDevice &out)
 Saves the state of this lane into the given stream. More...
 
void loadState (const std::vector< std::string > &vehIDs, MSVehicleControl &vc)
 Loads the state of this segment with the given parameters. More...
 

Static Public Member Functions

static void clear ()
 Clears the dictionary. More...
 
static MSLanedictionary (const std::string &id)
 Returns the MSLane associated to the key id. More...
 
static bool dictionary (const std::string &id, MSLane *lane)
 Static (sic!) container methods {. More...
 
static int dictSize ()
 Returns the number of stored lanes. More...
 
template<class RTREE >
static void fill (RTREE &into)
 Fills the given RTree with lane instances. More...
 
static CollisionAction getCollisionAction ()
 
template<class T >
static std::string getIDSecure (const T *obj, const std::string &fallBack="NULL")
 get an identifier for Named-like object which may be Null More...
 
static int getNumRNGs ()
 return the number of RNGs More...
 
static void initCollisionOptions (const OptionsCont &oc)
 
static void initRNGs (const OptionsCont &oc)
 initialize rngs More...
 
static void insertIDs (std::vector< std::string > &into)
 Adds the ids of all stored lanes into the given vector. More...
 
static MSLinkCont::const_iterator succLinkSec (const SUMOVehicle &veh, int nRouteSuccs, const MSLane &succLinkSource, const std::vector< MSLane * > &conts)
 
static bool teleportOnCollision ()
 

Static Public Attributes

static const long CHANGE_PERMISSIONS_GUI = 1
 
static const long CHANGE_PERMISSIONS_PERMANENT = 0
 

Protected Types

typedef std::map< std::string, MSLane * > DictType
 definition of the static dictionary type More...
 

Protected Member Functions

bool checkForPedestrians (const MSVehicle *aVehicle, double &speed, double &dist, double pos, bool patchSpeed) const
 check whether pedestrians on this lane interfere with vehicle insertion More...
 
bool detectCollisionBetween (SUMOTime timestep, const std::string &stage, MSVehicle *collider, MSVehicle *victim, std::set< const MSVehicle *, ComparatorNumericalIdLess > &toRemove, std::set< const MSVehicle * > &toTeleport) const
 detect whether there is a collision between the two vehicles More...
 
void detectPedestrianJunctionCollision (const MSVehicle *collider, const PositionVector &colliderBoundary, const MSLane *foeLane, SUMOTime timestep, const std::string &stage)
 detect whether a vehicle collids with pedestrians on the junction More...
 
double getDepartPosLat (const MSVehicle &veh)
 
double getDepartSpeed (const MSVehicle &veh, bool &patchSpeed)
 
double getMaximumBrakeDist () const
 compute maximum braking distance on this lane More...
 
void handleCollisionBetween (SUMOTime timestep, const std::string &stage, MSVehicle *collider, MSVehicle *victim, double gap, double latGap, std::set< const MSVehicle *, ComparatorNumericalIdLess > &toRemove, std::set< const MSVehicle * > &toTeleport) const
 take action upon collision More...
 
virtual void incorporateVehicle (MSVehicle *veh, double pos, double speed, double posLat, const MSLane::VehCont::iterator &at, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
 Inserts the vehicle into this lane, and informs it about entering the network. More...
 
double safeInsertionSpeed (const MSVehicle *veh, double seen, const MSLeaderInfo &leaders, double speed)
 return the maximum safe speed for insertion behind leaders (a negative value indicates that safe insertion is impossible) More...
 
virtual void swapAfterLaneChange (SUMOTime t)
 moves myTmpVehicles int myVehicles after a lane change procedure More...
 

Protected Attributes

std::map< MSEdge *, std::vector< MSLane * > > myApproachingLanes
 All direct internal and direct (disregarding internal predecessors) non-internal predecessor lanes of this lane. More...
 
double myBruttoVehicleLengthSum
 The current length of all vehicles on this lane, including their minGaps. More...
 
double myBruttoVehicleLengthSumToRemove
 The length of all vehicles that have left this lane in the current step (this lane, including their minGaps) More...
 
MSLanemyCanonicalPredecessorLane
 Similar to LogicalPredecessorLane,. More...
 
MSLanemyCanonicalSuccessorLane
 Main successor lane,. More...
 
MSEdge *const myEdge
 The lane's edge, for routing only. More...
 
MSLeaderInfo myFollowerInfo
 followers on all sublanes as seen by vehicles on consecutive lanes (cached) More...
 
SUMOTime myFollowerInfoTime
 time step for which myFollowerInfo was last updated More...
 
std::string myID
 The name of the object. More...
 
std::vector< IncomingLaneInfomyIncomingLanes
 All direct predecessor lanes. More...
 
int myIndex
 The lane index. More...
 
const bool myIsRampAccel
 whether this lane is an acceleration lane More...
 
const std::string myLaneType
 the type of this lane More...
 
MSLeaderInfo myLeaderInfo
 leaders on all sublanes as seen by approaching vehicles (cached) More...
 
SUMOTime myLeaderInfoTime
 time step for which myLeaderInfo was last updated More...
 
double myLength
 Lane length [m]. More...
 
const double myLengthGeometryFactor
 precomputed myShape.length / myLength More...
 
MSLinkCont myLinks
 
MSLanemyLogicalPredecessorLane
 
VehCont myManeuverReservations
 The vehicles which registered maneuvering into the lane within their current action step. This is currently only relevant for sublane simulation, since continuous lanechanging uses the partial vehicle mechanism. More...
 
double myMaxSpeed
 Lane-wide speedlimit [m/s]. More...
 
bool myNeedsCollisionCheck
 whether a collision check is currently needed More...
 
std::vector< std::string > myNeighs
 
double myNettoVehicleLengthSum
 The current length of all vehicles on this lane, excluding their minGaps. More...
 
double myNettoVehicleLengthSumToRemove
 The length of all vehicles that have left this lane in the current step (this lane, excluding their minGaps) More...
 
int myNumericalID
 Unique numerical ID (set on reading by netload) More...
 
SVCPermissions myOriginalPermissions
 The original vClass permissions for this lane (before temporary modifications) More...
 
std::set< const MSVehicle * > myParkingVehicles
 
VehCont myPartialVehicles
 The lane's partial vehicles. This container holds all vehicles that are partially on this lane but which are in myVehicles of another lane. Reasons for partial occupancies include the following. More...
 
std::map< long long, SVCPermissionsmyPermissionChanges
 
SVCPermissions myPermissions
 The vClass permissions for this lane. More...
 
const std::map< SUMOVehicleClass, double > * myRestrictions
 The vClass speed restrictions for this lane. More...
 
int myRightmostSublane
 the index of the rightmost sublane of this lane on myEdge More...
 
double myRightSideOnEdge
 the combined width of all lanes with lower index on myEdge More...
 
int myRNGIndex
 
PositionVector myShape
 The shape of the lane. More...
 
std::map< SVCPermissions, double > myStopOffsets
 
VehCont myTmpVehicles
 Container for lane-changing vehicles. After completion of lane-change- process, the containers will be swapped with myVehicles. More...
 
FXSynchQue< MSVehicle *, std::vector< MSVehicle * > > myVehBuffer
 Buffer for vehicles that moved from their previous lane onto this one. Integrated after all vehicles executed their moves. More...
 
VehCont myVehicles
 The lane's vehicles. This container holds all vehicles that have their front (longitudinally) and their center (laterally) on this lane. These are the vehicles that this lane is 'responsibly' for (i.e. when executing movements) More...
 
const double myWidth
 Lane width [m]. More...
 

Static Protected Attributes

static DictType myDict
 Static dictionary to associate string-ids with objects. More...
 
static std::vector< std::mt19937 > myRNGs
 

Private Member Functions

 MSLane (const MSLane &)
 invalidated copy constructor More...
 
MSLaneoperator= (const MSLane &)
 invalidated assignment operator More...
 

Private Attributes

std::map< std::string, std::string > myMap
 The key->value map. More...
 
std::vector< MSMoveReminder * > myMoveReminders
 This lane's move reminder. More...
 

Static Private Attributes

static bool myCheckJunctionCollisions
 
static CollisionAction myCollisionAction
 the action to take on collisions More...
 
static double myCollisionMinGapFactor
 
static SUMOTime myCollisionStopTime
 

Friends

class AnyVehicleIterator
 
class MSLaneChanger
 needs access to myTmpVehicles (this maybe should be done via double-buffering!!!) More...
 
class MSLaneChangerSublane
 
class MSQueueExport
 

Detailed Description

Representation of a lane in the micro simulation.

Class which represents a single lane. Somekind of the main class of the simulation. Allows moving vehicles.

Definition at line 83 of file MSLane.h.

Member Typedef Documentation

◆ DictType

typedef std::map< std::string, MSLane* > MSLane::DictType
protected

definition of the static dictionary type

Definition at line 1415 of file MSLane.h.

◆ VehCont

typedef std::vector<MSVehicle*> MSLane::VehCont

Container for vehicles.

Definition at line 93 of file MSLane.h.

Member Enumeration Documentation

◆ CollisionAction

Enumerator
COLLISION_ACTION_NONE 
COLLISION_ACTION_WARN 
COLLISION_ACTION_TELEPORT 
COLLISION_ACTION_REMOVE 

Definition at line 182 of file MSLane.h.

Constructor & Destructor Documentation

◆ MSLane() [1/2]

MSLane::MSLane ( const std::string &  id,
double  maxSpeed,
double  length,
MSEdge *const  edge,
int  numericalID,
const PositionVector shape,
double  width,
SVCPermissions  permissions,
int  index,
bool  isRampAccel,
const std::string &  type 
)

Constructor.

Parameters
[in]idThe lane's id
[in]maxSpeedThe speed allowed on this lane
[in]lengthThe lane's length
[in]edgeThe edge this lane belongs to
[in]numericalIDThe numerical id of the lane
[in]shapeThe shape of the lane
[in]widthThe width of the lane
[in]permissionsEncoding of the Vehicle classes that may drive on this lane
[in]indexThe index of this lane within its parent edge
[in]isRampAccelWhether this lane is an acceleration lane
See also
SUMOVehicleClass

Definition at line 179 of file MSLane.cpp.

References initRestrictions(), myRNGIndex, and myRNGs.

◆ ~MSLane()

MSLane::~MSLane ( )
virtual

Destructor.

Definition at line 216 of file MSLane.cpp.

References myLinks.

◆ MSLane() [2/2]

MSLane::MSLane ( const MSLane )
private

invalidated copy constructor

Member Function Documentation

◆ addApproachingLane()

void MSLane::addApproachingLane ( MSLane lane,
bool  warnMultiCon 
)

◆ addIncomingLane()

void MSLane::addIncomingLane ( MSLane lane,
MSLink viaLink 
)

◆ addLink()

void MSLane::addLink ( MSLink link)

Delayed initialization.

Not all lane-members are known at the time the lane is born, above all the pointers to other lanes, so we have to add them later.

Parameters
[in]linkAn outgoing link

Definition at line 240 of file MSLane.cpp.

References myLinks.

Referenced by NLHandler::addConnection().

◆ addMoveReminder()

void MSLane::addMoveReminder ( MSMoveReminder rem)
virtual

Add a move-reminder to move-reminder container.

The move reminder will not be deleted by the lane.

Parameters
[in]remThe move reminder to add

Definition at line 258 of file MSLane.cpp.

References myMoveReminders, and myVehicles.

Referenced by MSMoveReminder::MSMoveReminder().

◆ addNeigh()

void MSLane::addNeigh ( const std::string &  id)

Adds a neighbor to this lane.

Parameters
[in]idThe lane's id

Definition at line 246 of file MSLane.cpp.

References Named::getID(), getLength(), getOpposite(), myNeighs, toString(), and WRITE_WARNING.

◆ addParking()

void MSLane::addParking ( MSVehicle veh)

add parking vehicle. This should only used during state loading

Definition at line 3006 of file MSLane.cpp.

References myParkingVehicles.

Referenced by MSVehicleTransfer::loadState().

◆ addTo()

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters
[in,filled]cont The container to add this item to

Definition at line 127 of file Named.h.

References Named::StoringVisitor::add().

◆ allowsVehicleClass()

◆ anyVehiclesBegin()

AnyVehicleIterator MSLane::anyVehiclesBegin ( ) const
inline

begin iterator for iterating over all vehicles touching this lane in downstream direction

Definition at line 434 of file MSLane.h.

References AnyVehicleIterator, myPartialVehicles, myTmpVehicles, and myVehicles.

Referenced by detectCollisions(), getFollowersOnConsecutive(), getLastVehicleInformation(), getLeader(), MSLink::getLeaderInfo(), MSPModel_Striping::getVehicleObstacles(), and MSPModel_Striping::moveInDirection().

◆ anyVehiclesEnd()

AnyVehicleIterator MSLane::anyVehiclesEnd ( ) const
inline

end iterator for iterating over all vehicles touching this lane in downstream direction

Definition at line 440 of file MSLane.h.

References AnyVehicleIterator, myPartialVehicles, myTmpVehicles, and myVehicles.

Referenced by detectCollisions(), getFollowersOnConsecutive(), getLeader(), MSLink::getLeaderInfo(), MSPModel_Striping::getVehicleObstacles(), and MSPModel_Striping::moveInDirection().

◆ anyVehiclesUpstreamBegin()

AnyVehicleIterator MSLane::anyVehiclesUpstreamBegin ( ) const
inline

begin iterator for iterating over all vehicles touching this lane in upstream direction

Definition at line 446 of file MSLane.h.

References AnyVehicleIterator, myPartialVehicles, myTmpVehicles, and myVehicles.

Referenced by getFirstVehicleInformation(), getFollower(), and MSPModel_Striping::getVehicleObstacles().

◆ anyVehiclesUpstreamEnd()

AnyVehicleIterator MSLane::anyVehiclesUpstreamEnd ( ) const
inline

end iterator for iterating over all vehicles touching this lane in upstream direction

Definition at line 452 of file MSLane.h.

References AnyVehicleIterator.

Referenced by getFollower(), and MSPModel_Striping::getVehicleObstacles().

◆ appropriate()

bool MSLane::appropriate ( const MSVehicle veh)
virtual

Returns the information whether this lane may be used to continue the current route

Definition at line 1911 of file MSLane.cpp.

References MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getLaneIndex(), MSEdge::isInternal(), myEdge, myLinks, MSBaseVehicle::succEdge(), and succLinkSec().

Referenced by executeMovements().

◆ changeLanes()

void MSLane::changeLanes ( const SUMOTime  time)

Definition at line 1821 of file MSLane.cpp.

References MSEdge::changeLanes(), and myEdge.

◆ checkBufferType()

void MSLane::checkBufferType ( )

◆ checkFailure()

bool MSLane::checkFailure ( const MSVehicle aVehicle,
double &  speed,
double &  dist,
const double  nspeed,
const bool  patchSpeed,
const std::string  errorMsg 
) const

◆ checkForPedestrians()

bool MSLane::checkForPedestrians ( const MSVehicle aVehicle,
double &  speed,
double &  dist,
double  pos,
bool  patchSpeed 
) const
protected

◆ clear()

void MSLane::clear ( )
static

Clears the dictionary.

Definition at line 1878 of file MSLane.cpp.

References myDict.

Referenced by MSNet::clearAll().

◆ clearParameter()

◆ detectCollisionBetween()

◆ detectCollisions()

void MSLane::detectCollisions ( SUMOTime  timestep,
const std::string &  stage 
)
virtual

Check if vehicles are too close.

Reimplemented in GUILane.

Definition at line 1260 of file MSLane.cpp.

References MSVehicleTransfer::add(), anyVehiclesBegin(), anyVehiclesEnd(), COLLISION_ACTION_NONE, DEBUG_COND, DEBUG_COND2, detectCollisionBetween(), detectPedestrianJunctionCollision(), MSVehicle::getBackPositionOnLane(), MSEdge::getBidiEdge(), getBidiLane(), MSVehicle::getBoundingBox(), MSVehicle::getBoundingPoly(), Named::getID(), MSBaseVehicle::getID(), Named::getIDSecure(), MSVehicleTransfer::getInstance(), MSNet::getInstance(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), getLastVehicleInformation(), MSVehicleType::getLength(), MSPModel::getModel(), MSEdge::getPersons(), MSVehicle::getPositionOnLane(), MSVehicle::getRightSideOnEdge(), getRightSideOnEdge(), MSAbstractLaneChangeModel::getShadowLane(), MSVehicle::getSpeed(), MSNet::getVehicleControl(), getVehicleNumberWithPartials(), MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), handleCollisionBetween(), MSPModel::hasPedestrians(), MSAbstractLaneChangeModel::haveLateralDynamics(), mustCheckJunctionCollisions(), myCollisionAction, myEdge, myLength, myLinks, myNeedsCollisionCheck, myPartialVehicles, myVehicles, MSPModel::nextBlocking(), MSMoveReminder::NOTIFICATION_TELEPORT, MSMoveReminder::NOTIFICATION_VAPORIZED, MSLeaderInfo::numSublanes(), MSVehicle::onRemovalFromNet(), PositionVector::overlapsWith(), MSVehicleControl::registerCollision(), removeVehicle(), MSVehicleControl::scheduleVehicleRemoval(), SIMTIME, time2string(), toString(), and WRITE_WARNING.

Referenced by GUILane::detectCollisions().

◆ detectPedestrianJunctionCollision()

void MSLane::detectPedestrianJunctionCollision ( const MSVehicle collider,
const PositionVector colliderBoundary,
const MSLane foeLane,
SUMOTime  timestep,
const std::string &  stage 
)
protected

◆ dictionary() [1/2]

MSLane * MSLane::dictionary ( const std::string &  id)
static

Returns the MSLane associated to the key id.

The lane is returned if exists, otherwise 0 is returned.

Parameters
[in]idThe id of the lane
Returns
The lane

Definition at line 1867 of file MSLane.cpp.

References myDict.

◆ dictionary() [2/2]

bool MSLane::dictionary ( const std::string &  id,
MSLane lane 
)
static

◆ dictSize()

static int MSLane::dictSize ( )
inlinestatic

Returns the number of stored lanes.

Returns
The number of stored lanes

Definition at line 721 of file MSLane.h.

References myDict.

◆ empty()

bool MSLane::empty ( ) const
inline

Returns true if there is not a single vehicle on the lane.

Definition at line 652 of file MSLane.h.

References myVehBuffer, myVehicles, and FXSynchQue< T, Container >::size().

Referenced by MSQueueExport::writeLane().

◆ enteredByLaneChange()

◆ executeMovements()

void MSLane::executeMovements ( const SUMOTime  t)
virtual

Executes planned vehicle movements with regards to right-of-way.

This method goes through all vehicles calling their executeMove method which causes vehicles to update their positions and speeds. Vehicles wich move to the next lane are stored in the targets lane buffer

Returns
Returns true, if all vehicles left the lane.
See also
MSVehicle::executeMove

Reimplemented in GUILane.

Definition at line 1703 of file MSLane.cpp.

References MSVehicleTransfer::add(), appropriate(), COLLISION_ACTION_REMOVE, COLLISION_ACTION_TELEPORT, MSVehicle::collisionStopTime(), DEBUG_COND2, MSVehicle::executeMove(), MSVehicle::getBestLanesContinuation(), getCollisionAction(), getEdge(), MSNet::getEdgeControl(), Named::getID(), MSBaseVehicle::getID(), MSVehicleTransfer::getInstance(), MSNet::getInstance(), MSVehicle::getLane(), MSVehicleType::getLength(), getLength(), MSVehicleType::getLengthWithGap(), MSVehicle::getPositionOnLane(), getSpeedLimit(), MSNet::getVehicleControl(), MSBaseVehicle::getVehicleType(), MSVehicle::getWaitingTime(), MSGlobals::gLateralResolution, MSGlobals::gTimeToGridlock, MSGlobals::gTimeToGridlockHighways, MSVehicle::hasArrived(), MSVehicle::isParking(), MSVehicle::isStopped(), MSEdge::isVaporizing(), myBruttoVehicleLengthSumToRemove, myLinks, myNeedsCollisionCheck, myNettoVehicleLengthSumToRemove, myParkingVehicles, myVehBuffer, myVehicles, MSEdgeControl::needsVehicleIntegration(), MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_VAPORIZED, MSVehicle::onRemovalFromNet(), FXSynchQue< T, Container >::push_back(), MSVehicleControl::registerCollision(), MSVehicleControl::registerTeleportJam(), MSVehicleControl::registerTeleportWrongLane(), MSVehicleControl::registerTeleportYield(), MSVehicle::resumeFromStopping(), MSVehicleControl::scheduleVehicleRemoval(), SIMTIME, succLinkSec(), time2string(), and WRITE_WARNING.

Referenced by GUILane::executeMovements().

◆ fill()

template<class RTREE >
template void MSLane::fill< LANE_RTREE_QUAL > ( RTREE &  into)
static

Fills the given RTree with lane instances.

Parameters
[in,filled]into The RTree to fill
See also
TraCILaneRTree

Definition at line 1895 of file MSLane.cpp.

References PositionVector::getBoxBoundary(), getShape(), Boundary::grow(), myDict, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by libsumo::Helper::collectObjectsInRange().

◆ forceVehicleInsertion()

void MSLane::forceVehicleInsertion ( MSVehicle veh,
double  pos,
MSMoveReminder::Notification  notification,
double  posLat = 0 
)

Inserts the given vehicle at the given position.

No checks are done, vehicle insertion using this method may generate collisions (possibly delayed).

Parameters
[in]vehThe vehicle to insert
[in]posThe position at which the vehicle shall be inserted
[in]notificationThe cause of insertion (i.e. departure, teleport, parking) defaults to departure
[in]posLatThe lateral position at which the vehicle shall be inserted

Definition at line 1013 of file MSLane.cpp.

References getDepartSpeed(), MSVehicle::getSpeed(), MSBaseVehicle::hasDeparted(), incorporateVehicle(), myVehicles, and MSVehicle::updateBestLanes().

Referenced by libsumo::Vehicle::moveTo(), and MSAbstractLaneChangeModel::primaryLaneChanged().

◆ freeInsertion()

bool MSLane::freeInsertion ( MSVehicle veh,
double  speed,
double  posLat,
MSMoveReminder::Notification  notification = MSMoveReminder::NOTIFICATION_DEPARTED 
)

Tries to insert the given vehicle on any place.

Parameters
[in]vehThe vehicle to insert
[in]speedThe maximum insertion speed
[in]notificationThe cause of insertion (i.e. departure, teleport, parking) defaults to departure
Returns
Whether the vehicle could be inserted

Definition at line 386 of file MSLane.cpp.

References MSVehicle::getBackPositionOnLane(), MSVehicle::getCarFollowModel(), getFirstFullVehicle(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), getMissingRearGap(), MSVehicle::getPositionOnLane(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSCFModel::insertionFollowSpeed(), isInsertionSuccess(), MIN2(), myLength, myPartialVehicles, myVehicles, MSMoveReminder::NOTIFICATION_TELEPORT, POSITION_EPS, and MSVehicle::setTentativeLaneAndPosition().

Referenced by MSVehicleTransfer::checkInsertions(), and insertVehicle().

◆ geometryPositionAtOffset()

◆ getBidiLane()

MSLane * MSLane::getBidiLane ( ) const

retrieve bidirectional lane or nullptr

XXX multi-lane edges are not considered

Definition at line 3684 of file MSLane.cpp.

References MSEdge::getBidiEdge(), MSEdge::getLanes(), and myEdge.

Referenced by MSRailSignal::LinkInfo::buildDriveWay(), MSRailSignal::DriveWay::buildRoute(), detectCollisions(), MSVehicle::enterLaneAtInsertion(), and isInsertionSuccess().

◆ getBruttoOccupancy()

double MSLane::getBruttoOccupancy ( ) const

Returns the brutto (including minGaps) occupancy of this lane during the last step.

Returns
The occupancy during the last step

Definition at line 2666 of file MSLane.cpp.

References MSVehicleType::getLength(), MSVehicle::getPositionOnLane(), getVehiclesSecure(), MSBaseVehicle::getVehicleType(), MIN2(), myBruttoVehicleLengthSum, myLength, myPartialVehicles, myVehicles, and releaseVehicles().

Referenced by MSLCM_LC2013::_wantsChange(), GUILane::getColorValue(), GUILane::getParameterWindow(), GUILane::getScaleValue(), and MSEdge::insertVehicle().

◆ getBruttoVehLenSum()

double MSLane::getBruttoVehLenSum ( ) const
inline

Returns the sum of lengths of vehicles, including their minGaps, which were on the lane during the last step.

Returns
The sum of vehicle lengths of vehicles in the last step

Definition at line 1005 of file MSLane.h.

References myBruttoVehicleLengthSum.

Referenced by MSVehicle::checkRewindLinkLanes(), and MSLCM_LC2013::getRoundaboutDistBonus().

◆ getCanonicalPredecessorLane()

MSLane * MSLane::getCanonicalPredecessorLane ( ) const

Return the main predecessor lane for the current. If there are several incoming lanes, the first attempt is to return the priorized. If this does not yield an unambiguous lane, the one with the least angle difference to the current is selected.

Definition at line 2578 of file MSLane.cpp.

References myCanonicalPredecessorLane, Named::myID, and myIncomingLanes.

Referenced by getEntryLink(), getFirstInternalInConnection(), and MSE2Collector::selectLanes().

◆ getCanonicalSuccessorLane()

MSLane * MSLane::getCanonicalSuccessorLane ( ) const

Return the main successor lane for the current. If there are several outgoing lanes, the first attempt is to return the priorized. If this does not yield an unambiguous lane, the one with the least angle difference to the current is selected.

Definition at line 2598 of file MSLane.cpp.

References myCanonicalSuccessorLane, Named::myID, and myLinks.

Referenced by MSDevice_SSM::classifyEncounter(), MSPModel_Striping::getNextLane(), and MSE2Collector::selectLanes().

◆ getCenterOnEdge()

double MSLane::getCenterOnEdge ( ) const
inline

Definition at line 1076 of file MSLane.h.

References myRightSideOnEdge, and myWidth.

Referenced by MSVehicle::getCenterOnEdge().

◆ getCO2Emissions()

double MSLane::getCO2Emissions ( ) const

Returns the sum of last step CO2 emissions.

Returns
CO2 emissions of vehicles on this lane during the last step

Definition at line 2725 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by libsumo::Lane::getCO2Emission(), GUILane::getColorValue(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getCOEmissions()

double MSLane::getCOEmissions ( ) const

Returns the sum of last step CO emissions.

Returns
CO emissions of vehicles on this lane during the last step

Definition at line 2737 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by libsumo::Lane::getCOEmission(), GUILane::getColorValue(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getCollisionAction()

static CollisionAction MSLane::getCollisionAction ( )
inlinestatic

Definition at line 1202 of file MSLane.h.

References myCollisionAction.

Referenced by executeMovements(), and MSVehicle::resumeFromStopping().

◆ getCriticalLeader()

std::pair< MSVehicle *const, double > MSLane::getCriticalLeader ( double  dist,
double  seen,
double  speed,
const MSVehicle veh 
) const

Returns the most dangerous leader and the distance to him.

Goes along the vehicle's estimated used lanes (bestLaneConts). For each link, it is determined whether the ego vehicle will pass it. If so, the subsequent lane is investigated. Check all lanes up to the stopping distance of ego. Return the leader vehicle (and the gap) which puts the biggest speed constraint on ego.

If no leading vehicle was found, <0, -1> is returned.

Pretty slow, as it has to go along lanes.

Parameters
[in]distThe distance to investigate
[in]seenThe already seen place (normally the place in front on own lane)
[in]speedThe speed of the vehicle used for determining whether a subsequent link will be opened at arrival time
[in]vehThe (ego) vehicle for which the information shall be computed
Returns

Definition at line 2459 of file MSLane.cpp.

References MSCFModel::brakeGap(), DEBUG_COND2, MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), Named::getID(), MSBaseVehicle::getID(), MSBaseVehicle::getImpatience(), MSNet::getInstance(), getLastAnyVehicle(), MSVehicle::getLateralPositionOnLane(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), MSVehicle::getSafeFollowSpeed(), MSVehicle::getSpeed(), getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), MSCFModel::insertionFollowSpeed(), isInternal(), isLinkEnd(), MAX2(), NUMERICAL_EPS, SIMTIME, succLinkSec(), and TIME2STEPS.

Referenced by MSLaneChanger::checkChange().

◆ getCrossingIndex()

int MSLane::getCrossingIndex ( ) const

return the index of the link to the next crossing if this is walkingArea, else -1

Definition at line 2655 of file MSLane.cpp.

References myLinks.

◆ getDepartPosLat()

◆ getDepartSpeed()

◆ getDouble()

◆ getEdge()

MSEdge& MSLane::getEdge ( ) const
inline

Returns the lane's edge.

Returns
This lane's edge

Definition at line 670 of file MSLane.h.

References myEdge.

Referenced by MSLCM_LC2013::_patchSpeed(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), LaneStoringVisitor::add(), addApproachingLane(), MSRouteHandler::addPersonTrip(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSSwarmTrafficLightLogic::allowLine(), libsumo::Helper::applySubscriptionFilters(), MSRailSignal::DriveWay::buildRoute(), MSSOTLE2Sensors::buildSensorForLane(), MSVehicle::canReverse(), MSLaneChanger::checkChange(), MSLink::checkContOff(), checkForPedestrians(), MSVehicle::checkLinkLeader(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSLink::checkWalkingAreaFoe(), MSDevice_SSM::classifyEncounter(), MSEdge::closeBuilding(), GUILane::closeTraffic(), MSLCM_SL2015::computeSpeedGain(), MSLaneChanger::continueChange(), GUIDetectorBuilder::createInductLoop(), NLDetectorBuilder::createInductLoop(), detectPedestrianJunctionCollision(), GUILane::drawLane2LaneConnections(), GUILane::drawLinkNo(), GUILane::drawLinkRules(), GUILane::drawTLSLinkNo(), MSVehicle::enterLaneAtMove(), MSVehicle::executeMove(), executeMovements(), MSDevice_SSM::findFoeConflictLane(), MSDevice_SSM::findSurroundingVehicles(), MSStoppingPlace::getAccessDistance(), MSStoppingPlace::getAccessPos(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCenterOnEdge(), MSLaneChanger::getColumnleader(), libsumo::Vehicle::getDistance(), libsumo::Vehicle::getDrivingDistance(), libsumo::Lane::getEdgeID(), getFollowersOnConsecutive(), MSLinkContHelper::getInternalFollowingEdge(), MSVehicle::getLaneIndex(), MSVehicle::getLatOffset(), GUIVehicle::getLeftSublaneOnEdge(), getLogicalPredecessorLane(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), libsumo::Vehicle::getNextTLS(), MSCFModel_CC::getParameter(), GUILane::getParentName(), MSVehicle::getPosition(), GUIVehicle::getRightSublaneOnEdge(), libsumo::Vehicle::getRoadID(), MSLCM_LC2013::getRoundaboutDistBonus(), MSAbstractLaneChangeModel::getShadowDirection(), MSVehicle::getSpaceTillLastStanding(), handleCollisionBetween(), MSPModel_Remote::handlePedestrianLane(), MSRailSignal::hasOncomingRailTraffic(), MSVehicle::influenceChangeDecision(), MSActuatedTrafficLightLogic::init(), isInsertionSuccess(), MSVehicle::isLeader(), MSLCM_SL2015::keepLatGap(), MSLink::lastWasContMajor(), MSVehicle::leaveLane(), MESegment::limitedControlOverride(), MSRailSignal::LinkInfo::LinkInfo(), MSPedestrianPushButton::loadPushButtons(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), libsumo::Vehicle::moveTo(), MSPModel_Striping::PState::moveToXY(), libsumo::Helper::moveToXYMap(), MSTriggeredRerouter::myEndElement(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), GUIViewTraffic::onCmdAddRerouter(), GUIViewTraffic::onCmdCloseEdge(), MSLane::outgoing_lane_priority_sorter::operator()(), MSLane::edge_finder::operator()(), NLTriggerBuilder::parseAndBuildCalibrator(), MSRouteHandler::parseWalkPositions(), MSVehicle::passingMinor(), MSLCM_DK2008::patchSpeed(), MSVehicle::planMoveInternal(), MSInternalJunction::postloadInit(), MSLCM_SL2015::prepareStep(), MSAbstractLaneChangeModel::primaryLaneChanged(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkApproaches(), MSVehicle::processNextStop(), MSPModel_Striping::PState::PState(), MSVehicle::replaceRoute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSTransportable::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), MSVehicle::resumeFromStopping(), libsumo::Lane::setAllowed(), libsumo::Lane::setDisallowed(), MSLink::setRequestInformation(), MSVehicle::unsafeLinkAhead(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), MSVehicle::willStop(), and MSFCDExport::write().

◆ getElectricityConsumption()

double MSLane::getElectricityConsumption ( ) const

Returns the sum of last step electricity consumption.

Returns
electricity consumption of vehicles on this lane during the last step

Definition at line 2797 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by GUILane::getColorValue(), libsumo::Lane::getElectricityConsumption(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getEntryLink()

MSLink * MSLane::getEntryLink ( ) const

Returns the entry link if this is an internal lane, else 0.

Definition at line 2127 of file MSLane.cpp.

References getCanonicalPredecessorLane(), getLinkTo(), and isInternal().

Referenced by MSDevice_SSM::classifyEncounter(), MSLink::getLengthBeforeCrossing(), and getUpcomingLinks().

◆ getFirstAnyVehicle()

MSVehicle * MSLane::getFirstAnyVehicle ( ) const

returns the first vehicle that is fully or partially on this lane

Definition at line 2036 of file MSLane.cpp.

References MSVehicle::getPositionOnLane(), myPartialVehicles, and myVehicles.

Referenced by MSRailSignal::hasOncomingRailTraffic().

◆ getFirstFullVehicle()

MSVehicle * MSLane::getFirstFullVehicle ( ) const

returns the first vehicle for which this lane is responsible or 0

Definition at line 2013 of file MSLane.cpp.

References myVehicles.

Referenced by freeInsertion().

◆ getFirstInternalInConnection()

const MSLane * MSLane::getFirstInternalInConnection ( double &  offset) const

Returns 0 if the lane is not internal. Otherwise the first part of the connection (sequence of internal lanes along junction) corresponding to the lane is returned and the offset is set to the distance of the begin of this lane to the begin of the returned.

Definition at line 1837 of file MSLane.cpp.

References getCanonicalPredecessorLane(), getLength(), and isInternal().

Referenced by MSDevice_SSM::classifyEncounter().

◆ getFirstVehicleInformation()

const MSLeaderInfo MSLane::getFirstVehicleInformation ( const MSVehicle ego,
double  latOffset,
bool  onlyFrontOnLane,
double  maxPos = std::numeric_limits<double>::max(),
bool  allowCached = true 
) const

◆ getFollower()

std::pair< MSVehicle *const, double > MSLane::getFollower ( const MSVehicle ego,
double  egoPos,
double  dist,
bool  ignoreMinorLinks 
) const

Find follower vehicle for the given ego vehicle (which may be on the opposite direction lane)

Parameters
[in]egoThe ego vehicle
[in]egoPosThe ego position mapped to the current lane
[in]distThe look-back distance when looking at consecutive lanes
[in]ignoreMinorLinksWhether backward search should stop at minor links
Returns
the follower vehicle and it's gap to ego

Definition at line 3520 of file MSLane.cpp.

References anyVehiclesUpstreamBegin(), anyVehiclesUpstreamEnd(), DEBUG_COND2, getFollowersOnConsecutive(), Named::getID(), MSBaseVehicle::getID(), MSVehicleType::getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), and MSBaseVehicle::getVehicleType().

Referenced by libsumo::Helper::applySubscriptionFilters(), getOppositeFollower(), and getOppositeLeader().

◆ getFollowersOnConsecutive()

◆ getFuelConsumption()

double MSLane::getFuelConsumption ( ) const

Returns the sum of last step fuel consumption.

Returns
fuel consumption of vehicles on this lane during the last step

Definition at line 2785 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by GUILane::getColorValue(), libsumo::Lane::getFuelConsumption(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getHarmonoise_NoiseEmissions()

double MSLane::getHarmonoise_NoiseEmissions ( ) const

Returns the sum of last step noise emissions.

Returns
noise emissions of vehicles on this lane during the last step

Definition at line 2809 of file MSLane.cpp.

References getVehiclesSecure(), releaseVehicles(), and HelpersHarmonoise::sum().

Referenced by GUILane::getColorValue(), libsumo::Lane::getNoiseEmission(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getHCEmissions()

double MSLane::getHCEmissions ( ) const

Returns the sum of last step HC emissions.

Returns
HC emissions of vehicles on this lane during the last step

Definition at line 2773 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by GUILane::getColorValue(), libsumo::Lane::getHCEmission(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getID()

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 77 of file Named.h.

References Named::myID.

Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), MSPModel_Remote::add(), MSPModel_Striping::add(), LaneStoringVisitor::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), addNeigh(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), RONet::addRouteDef(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), libsumo::Helper::applySubscriptionFilters(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), MSRailSignal::LinkInfo::buildDriveWay(), NLDetectorBuilder::buildE2Detector(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSRailSignal::DriveWay::buildRoute(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSVehicle::canReverse(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSRailSignal::DriveWay::checkCrossingFlanks(), checkForPedestrians(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), ShapeContainer::clearHighlights(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), IntermodalRouter< E, L, N, V >::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBNode::computeLanes2Lanes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBOwnTLDef::corridorLike(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), detectCollisionBetween(), detectCollisions(), detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), NIVissimDistrictConnection::dict_BuildDistricts(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), libsumo::Helper::findCloserLane(), MSRailSignal::DriveWay::findFlankProtection(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBNodeCont::generateNodeClusters(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), MSRailSignal::getClickableTLLinkID(), GUILane::getColorValue(), libsumo::TrafficLight::getControlledLinks(), getCriticalLeader(), NBNodeShapeComputer::getDefaultRadius(), NBTrafficLightDefinition::getDescription(), MSLink::getDescription(), GUIPerson::getDestinationEdgeID(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), GUIMEVehicle::getEdgeID(), GUIPerson::getEdgeID(), MSMeanData::getEdgeID(), MSPModel_Remote::getFirstPedestrianLane(), getFollower(), getFollowersOnConsecutive(), GUIPerson::getFromEdgeID(), MSCalibrator::getID(), NBEdge::getID(), libsumo::LaneArea::getLaneID(), libsumo::InductionLoop::getLaneID(), libsumo::Vehicle::getLaneID(), MSParkingArea::getLastFreePosWithReservation(), getLastVehicleInformation(), MSVehicle::getLatOffset(), getLeader(), MSLink::getLeaderInfo(), getLeaderOnConsecutive(), getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), getLinkTo(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), getOppositeFollower(), getOppositeLeader(), getOppositePos(), libsumo::Simulation::getParameter(), GUITrafficLightLogicWrapper::getParameterWindow(), GUILane::getParameterWindow(), GUILane::getParentName(), getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), PolygonDynamics::getPolygonID(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), MSLCM_LC2013::getRoundaboutDistBonus(), libsumo::Vehicle::getRouteID(), MSVehicle::getSafeFollowSpeed(), libsumo::Person::getStage(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSNet::getStoppingPlaceID(), getSurroundingVehicles(), MSRailSignal::getTLLinkID(), getUpcomingLinks(), MSDevice_SSM::getUpstreamVehicles(), MSPModel_Striping::getVehicleObstacles(), MSDevice_SSM::getVehiclesOnJunction(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), MSEdge::insertVehicle(), integrateNewVehicles(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), isInsertionSuccess(), MSVehicle::isLeader(), MESegment::isOpen(), RODFNet::isSource(), NIImporter_VISUM::isSplitEdge(), MSSOTLTrafficLightLogic::isThresholdPassed(), MESegment::jamThresholdForSpeed(), NBNodeShapeComputer::joinSameDirectionEdges(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), MSSOTLE2Sensors::meanVehiclesSpeed(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIImporter_SUMO::myEndElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), MSPModel_Striping::nextBlocking(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSE3Collector::MSE3LeaveReminder::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_Bluelight::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), GUIViewTraffic::onGamingClick(), MSLink::opened(), RORouteHandler::openRoute(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Turns(), NLTriggerBuilder::parseAndBuildCalibrator(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkApproaches(), MSVehicle::processNextStop(), NIXMLNodesHandler::processNodeType(), TraCIServerAPI_Vehicle::processSet(), MEVehicle::processStop(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSDelayBasedTrafficLightLogic::proposeProlongation(), NBNodeCont::pruneClusterFringe(), MSPModel_Striping::PState::PState(), MSOffTrafficLightLogic::rebuildPhase(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), MSLink::removeApproaching(), MSVehicle::removePassedDriveItems(), GNEJunction::removeTLSConnections(), NBNodeCont::rename(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), GNEJunction::replaceIncomingConnections(), MSVehicle::replaceParkingArea(), MSVehicle::replaceRoute(), MSBaseVehicle::replaceRouteEdges(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NLEdgeControlBuilder::reportCurrentEdgeOrLane(), MSBaseVehicle::reroute(), MSRailSignal::LinkInfo::reroute(), GUIVehicle::rerouteDRTStop(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), resetManeuverReservation(), resetPartialOccupation(), RODFNet::revalidateFlows(), NBRailwayTopologyAnalyzer::reverseEdges(), RONet::saveAndRemoveRoutesUntil(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), MSTransportableDevice_Routing::saveState(), MSDevice_Routing::saveState(), MSDevice::saveState(), MSDevice_Vehroutes::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NLEdgeControlBuilder::setDefaultStopOffsets(), MSChargingStation::setEfficency(), setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), NIImporter_OpenDrive::setNodeSecure(), setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), sortManeuverReservations(), IntermodalNetwork< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), MSSOTLTrafficLightLogic::trySwitch(), PolygonDynamics::update(), MSDevice_SSM::update(), MSDevice_SSM::updateAndWriteOutput(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), NLEdgeControlBuilder::updateCurrentLaneStopOffsets(), MSVehicle::updateDriveItems(), GNETLSEditorFrame::TLSJunction::updateJunctionDescription(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), NBNodeTypeComputer::validateRailCrossings(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), MSRailSignal::writeBlocks(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), MSXMLRawOut::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMOPolygon::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

template<class T >
static std::string Named::getIDSecure ( const T *  obj,
const std::string &  fallBack = "NULL" 
)
inlinestaticinherited

get an identifier for Named-like object which may be Null

Definition at line 70 of file Named.h.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), DijkstraRouter< E, V, BASE >::compute(), AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > >::compute(), NBEdge::computeEdge2Edges(), NBEdge::computeLanes2Edges(), NBOwnTLDef::computeLogicAndConts(), MSLaneChanger::continueChange(), detectCollisions(), MSRailSignal::DriveWay::findProtection(), MSCFModel_W99::followSpeed(), MSCFModel_CACC::followSpeed(), MSVehicle::getBackPositionOnLane(), NBOwnTLDef::getBestCombination(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSLaneChanger::getColumnleader(), NBEdge::Connection::getDescription(), getFollowersOnConsecutive(), GUIVehicle::getLaneID(), MSVehicle::getLatOffset(), getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), GUIVehicle::getShadowLaneID(), GUIVehicle::getTargetLaneID(), NBEdge::init(), isInsertionSuccess(), MESegment::isOpen(), joinNamedToString(), joinNamedToStringSorting(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), operator<<(), NBEdge::recheckLanes(), MSTriggeredRerouter::rerouteParkingArea(), MSLCM_LC2013::saveBlockerLength(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLaneChangerSublane::startChangeSublane(), toString(), MSLeaderInfo::toString(), MSLeaderDistanceInfo::toString(), MSCriticalFollowerDistanceInfo::toString(), MSVehicle::updateBestLanes(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ getIncomingLanes()

◆ getIncomingLinkState()

LinkState MSLane::getIncomingLinkState ( ) const

get the state of the link from the logical predecessor to this lane

Definition at line 2619 of file MSLane.cpp.

References MSLinkContHelper::getConnectingLink(), getLogicalPredecessorLane(), MSLink::getState(), and LINKSTATE_DEADEND.

◆ getIndex()

◆ getLaneType()

const std::string& MSLane::getLaneType ( ) const
inline

return the type of this lane

Definition at line 493 of file MSLane.h.

References myLaneType.

◆ getLastAnyVehicle()

MSVehicle * MSLane::getLastAnyVehicle ( ) const

returns the last vehicle that is fully or partially on this lane

Definition at line 2022 of file MSLane.cpp.

References myPartialVehicles, and myVehicles.

Referenced by MSVehicle::checkRewindLinkLanes(), MSLaneChanger::getColumnleader(), getCriticalLeader(), getLeaderOnConsecutive(), lastInsertion(), and MSLink::maybeOccupied().

◆ getLastFullVehicle()

MSVehicle * MSLane::getLastFullVehicle ( ) const

returns the last vehicle for which this lane is responsible or 0

Definition at line 2004 of file MSLane.cpp.

References myVehicles.

◆ getLastVehicleInformation()

const MSLeaderInfo MSLane::getLastVehicleInformation ( const MSVehicle ego,
double  latOffset,
double  minPos = 0,
bool  allowCached = true 
) const

Returns the last vehicles on the lane.

The information about the last vehicles in this lanes in all sublanes occupied by ego are returned. Partial occupators are included

Parameters
[in]egoThe vehicle for which to restrict the returned leaderInfo
[in]minPosThe minimum position from which to start search for leaders
[in]allowCachedWhether the cached value may be used
Returns
Information about the last vehicles

Definition at line 1051 of file MSLane.cpp.

References MSLeaderInfo::addLeader(), anyVehiclesBegin(), DEBUG_COND2, gDebugFlag1, MSNet::getCurrentTimeStep(), Named::getID(), MSBaseVehicle::getID(), MSNet::getInstance(), MSVehicle::getLatOffset(), MSVehicle::getPositionOnLane(), MSGlobals::gNumSimThreads, myLeaderInfo, myLeaderInfoTime, and MSLeaderInfo::toString().

Referenced by detectCollisions(), getLeadersOnConsecutive(), isInsertionSuccess(), and MSVehicle::planMoveInternal().

◆ getLeader()

std::pair< MSVehicle *const, double > MSLane::getLeader ( const MSVehicle veh,
const double  vehPos,
const std::vector< MSLane * > &  bestLaneConts,
double  dist = -1,
bool  checkTmpVehicles = false 
) const

Returns the immediate leader of veh and the distance to veh starting on this lane.

Iterates over the current lane to find a leader and then uses getLeaderOnConsecutive()

Parameters
[in]vehThe vehicle for which the information shall be computed
[in]vehPosThe vehicle position relative to this lane (may be negative)
[in]bestLaneContsThe succeding lanes that shall be checked (if any)
[in]distOptional distance to override default (ego stopDist)
[in]checkTmpVehiclesWhether myTmpVehicles should be used instead of myVehicles
Returns

Definition at line 2268 of file MSLane.cpp.

References anyVehiclesBegin(), anyVehiclesEnd(), MSCFModel::brakeGap(), DEBUG_COND2, MSVehicle::getBackPositionOnLane(), MSVehicle::getCarFollowModel(), Named::getID(), MSBaseVehicle::getID(), getLeaderOnConsecutive(), getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), gPrecision, myTmpVehicles, myVehicles, and toString().

Referenced by libsumo::Helper::applySubscriptionFilters(), MSLaneChanger::checkChange(), getOppositeFollower(), getOppositeLeader(), and lastInsertion().

◆ getLeaderOnConsecutive()

std::pair< MSVehicle *const, double > MSLane::getLeaderOnConsecutive ( double  dist,
double  seen,
double  speed,
const MSVehicle veh,
const std::vector< MSLane * > &  bestLaneConts 
) const

Returns the immediate leader and the distance to him.

Goes along the vehicle's estimated used lanes (bestLaneConts). For each link, it is determined whether the vehicle will pass it. If so, the subsequent lane is investigated. If a vehicle (leader) is found, it is returned, together with the length of the investigated lanes until this vehicle's end, including the already seen place (seen).

If no leading vehicle was found, <0, -1> is returned.

Pretty slow, as it has to go along lanes.

Todo:
: There are some oddities:
  • what about crossing a link at red, or if a link is closed? Has a following vehicle to be regarded or not?
Parameters
[in]distThe distance to investigate
[in]seenThe already seen place (normally the place in front on own lane)
[in]speedThe speed of the vehicle used for determining whether a subsequent link will be opened at arrival time
[in]vehThe vehicle for which the information shall be computed
[in]bestLaneContsThe lanes the vehicle will use in future
Returns

Definition at line 2333 of file MSLane.cpp.

References MSCFModel::brakeGap(), DEBUG_COND2, gDebugFlag1, MSVehicle::getBackPositionOnLane(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), Named::getID(), MSBaseVehicle::getID(), Named::getIDSecure(), MSBaseVehicle::getImpatience(), MSNet::getInstance(), MSVehicle::getLane(), getLastAnyVehicle(), MSVehicle::getLateralPositionOnLane(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), MSVehicle::getSpeed(), getVehicleMaxSpeed(), getVehiclesSecure(), MSBaseVehicle::getVehicleType(), isInternal(), MSVehicle::isLeader(), isLinkEnd(), MAX2(), myPartialVehicles, NUMERICAL_EPS, releaseVehicles(), succLinkSec(), TIME2STEPS, and toString().

Referenced by getLeader(), and MSVehicle::getLeader().

◆ getLeadersOnConsecutive()

◆ getLength()

double MSLane::getLength ( ) const
inline

Returns the lane's length.

Returns
This lane's length

Definition at line 541 of file MSLane.h.

References myLength.

Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), MSVehicle::adaptToLeaders(), NLTriggerBuilder::addAccess(), NLHandler::addConnection(), MSPModel_Striping::addCrossingVehs(), NLHandler::addE2Detector(), addIncomingLane(), addNeigh(), MSVehicle::addStop(), libsumo::Helper::applySubscriptionFilters(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NLDetectorBuilder::buildE2Detector(), MSRailSignal::DriveWay::buildRoute(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), MSVehicle::canReverse(), MSLaneChanger::changeOpposite(), MSLaneChanger::checkChange(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSLCM_SL2015::checkStrategicChange(), MSDevice_SSM::classifyEncounter(), GUILane::debugDrawFoeIntersections(), GUIVehicle::drawAction_drawCarriageClass(), MSVehicle::executeMove(), executeMovements(), MSRailSignal::DriveWay::findFlankProtection(), MSDevice_SSM::findFoeConflictLane(), MSDevice_SSM::findSurroundingVehicles(), freeInsertion(), GUILane::getColorValue(), MSLaneChanger::getColumnleader(), getCriticalLeader(), MSVehicle::getDistanceToPosition(), MSE2Collector::getEstimateQueueLength(), getFirstInternalInConnection(), getFollowersOnConsecutive(), MSLink::getInternalLengthsAfter(), MSLink::getInternalLengthsBefore(), libsumo::Helper::getLaneChecking(), NLShapeHandler::getLanePos(), getLeader(), MSVehicle::getLeader(), MSLink::getLeaderInfo(), getLeaderOnConsecutive(), MSLaneChangerSublane::getLeaders(), getLeadersOnConsecutive(), libsumo::Lane::getLength(), MSLink::getLengthBeforeCrossing(), MSLink::getLengthsBeforeCrossing(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), libsumo::Vehicle::getNextTLS(), getOppositePos(), NLTriggerBuilder::getPosition(), MSVehicle::getPositionAlongBestLanes(), NLDetectorBuilder::getPositionChecking(), MSLaneChanger::getRealLeader(), MSVehicle::getRerouteOrigin(), MSLCM_LC2013::getRoundaboutDistBonus(), MSVehicle::getSafeFollowSpeed(), MSVehicle::getSpaceTillLastStanding(), getSurroundingVehicles(), libsumo::Lane::getTraveltime(), getUpcomingLinks(), MSPModel_Striping::getVehicleObstacles(), handleCollisionBetween(), MSLCM_LC2013::informFollower(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSE2Collector::initAuxiliaries(), MSPModel_Striping::initWalkingAreaPaths(), insertVehicle(), isInsertionSuccess(), lastInsertion(), MSLink::maybeOccupied(), MSPModel_Striping::moveInDirectionOnLane(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSE2Collector::MSE2Collector(), NLTriggerBuilder::parseAndBeginParkingArea(), NLTriggerBuilder::parseAndBuildChargingStation(), MSRouteHandler::parseWalkPositions(), MSVehicle::planMoveInternal(), MSVehicle::processLaneAdvances(), MSE2Collector::recalculateDetectorLength(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSVehicle::setBlinkerInformation(), MSLink::setRequestInformation(), MSVehicle::unsafeLinkAhead(), MSVehicle::updateBestLanes(), MSVehicle::validatePosition(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), MSMeanData::writeEdge(), and MSQueueExport::writeLane().

◆ getLengthGeometryFactor()

double MSLane::getLengthGeometryFactor ( ) const
inline

return shape.length() / myLength

Definition at line 483 of file MSLane.h.

References myLengthGeometryFactor.

◆ getLinkCont()

const MSLinkCont & MSLane::getLinkCont ( ) const

returns the container with all links !!!

Definition at line 2099 of file MSLane.cpp.

References myLinks.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSPModel_Striping::addCrossingVehs(), MSRailSignal::DriveWay::buildRoute(), MSDevice_SSM::classifyEncounter(), MSLCM_SL2015::computeSublaneShift(), MSLink::contIntersect(), GUILane::debugDrawFoeIntersections(), GUILane::drawGL(), MSRailSignal::DriveWay::findFlankProtection(), MSDevice_SSM::findFoeConflictLane(), MSRailSignal::DriveWay::findProtection(), MSDevice_SSM::findSurroundingVehicles(), MSVehicle::getBestLanesContinuation(), MSLinkContHelper::getConnectingLink(), MSLink::getCorrespondingExitLink(), libsumo::Lane::getInternalFoes(), MSLinkContHelper::getInternalFollowingEdge(), MSLinkContHelper::getInternalFollowingLane(), MSLink::getInternalLengthsAfter(), MSLink::getLeaderInfo(), MSLink::getLengthsBeforeCrossing(), MESegment::getLink(), libsumo::Lane::getLinkNumber(), libsumo::Lane::getLinks(), MESegment::getMaxPenaltySeconds(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextWalkingArea(), MSVehicle::getPositionAlongBestLanes(), MSLCM_LC2013::getRoundaboutDistBonus(), getSurroundingVehicles(), MSDevice_SSM::getVehiclesOnJunction(), MSActuatedTrafficLightLogic::init(), MSVehicle::planMoveInternal(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), MSVehicle::processLaneAdvances(), MSEdge::recalcCache(), MSVehicle::setBlinkerInformation(), MSLink::setRequestInformation(), MSVehicle::updateBestLanes(), MSLCM_DK2008::wantsChangeToLeft(), and MSLCM_DK2008::wantsChangeToRight().

◆ getLinkTo()

◆ getLogicalPredecessorLane() [1/2]

◆ getLogicalPredecessorLane() [2/2]

MSLane * MSLane::getLogicalPredecessorLane ( const MSEdge fromEdge) const

return the (first) predecessor lane from the given edge

Definition at line 2567 of file MSLane.cpp.

References getEdge(), and myIncomingLanes.

◆ getMaximumBrakeDist()

double MSLane::getMaximumBrakeDist ( ) const
protected

◆ getMeanSpeed()

double MSLane::getMeanSpeed ( ) const

Returns the mean speed on this lane.

Returns
The average speed of vehicles during the last step; default speed if no vehicle was on this lane

Definition at line 2709 of file MSLane.cpp.

References getVehiclesSecure(), myMaxSpeed, myVehicles, and releaseVehicles().

Referenced by GUILane::getColorValue(), libsumo::Lane::getLastStepMeanSpeed(), GUILane::getScaleValue(), libsumo::Lane::getTraveltime(), and MSFullExport::writeLane().

◆ getMissingRearGap()

double MSLane::getMissingRearGap ( const MSVehicle leader,
double  backOffset,
double  leaderSpeed 
) const

return by how much further the leader must be inserted to avoid rear end collisions

Definition at line 2241 of file MSLane.cpp.

References MSVehicle::getCarFollowModel(), getFollowersOnConsecutive(), MSCFModel::getMaxDecel(), MSCFModel::getSecureGap(), and MSVehicle::getSpeed().

Referenced by freeInsertion(), and isInsertionSuccess().

◆ getMoveReminders()

const std::vector< MSMoveReminder* >& MSLane::getMoveReminders ( ) const
inline

◆ getNettoOccupancy()

double MSLane::getNettoOccupancy ( ) const

Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps)

Returns
The occupancy during the last step

Definition at line 2681 of file MSLane.cpp.

References MSVehicleType::getLength(), MSVehicle::getPositionOnLane(), getVehiclesSecure(), MSBaseVehicle::getVehicleType(), MIN2(), myLength, myNettoVehicleLengthSum, myPartialVehicles, myVehicles, and releaseVehicles().

Referenced by GUILane::getColorValue(), libsumo::Lane::getLastStepOccupancy(), GUILane::getParameterWindow(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getNextNormal()

const MSEdge * MSLane::getNextNormal ( ) const

Returns the lane's follower if it is an internal lane, the edge of the lane otherwise.

Returns
This lane's follower

Definition at line 1827 of file MSLane.cpp.

References MSEdge::getSuccessors(), MSEdge::isInternal(), and myEdge.

Referenced by MSVehicle::addStop(), MSVehicle::getRerouteOrigin(), libsumo::Vehicle::moveTo(), and MSVehicle::updateBestLanes().

◆ getNormalPredecessorLane()

const MSLane * MSLane::getNormalPredecessorLane ( ) const

get normal lane leading to this internal lane, for normal lanes, the lane itself is returned

Definition at line 2557 of file MSLane.cpp.

References getLogicalPredecessorLane(), getNormalPredecessorLane(), and isInternal().

Referenced by getNormalPredecessorLane(), and MSVehicle::updateBestLanes().

◆ getNOxEmissions()

double MSLane::getNOxEmissions ( ) const

Returns the sum of last step NOx emissions.

Returns
NOx emissions of vehicles on this lane during the last step

Definition at line 2761 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by GUILane::getColorValue(), libsumo::Lane::getNOxEmission(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getNumericalID()

int MSLane::getNumericalID ( ) const
inline

Returns this lane's numerical id.

Returns
This lane's numerical id

Definition at line 470 of file MSLane.h.

References myNumericalID.

Referenced by MSDevice_ToC::checkDynamicToC(), MSDevice_ToC::notifyMove(), MSPModel_Striping::lane_by_numid_sorter::operator()(), and MSPModel_Striping::walkingarea_path_sorter::operator()().

◆ getNumRNGs()

static int MSLane::getNumRNGs ( )
inlinestatic

return the number of RNGs

Definition at line 228 of file MSLane.h.

References myRNGs.

Referenced by MSEdgeControl::executeMovements(), and MSEdgeControl::planMovements().

◆ getOpposite()

◆ getOppositeFollower()

◆ getOppositeLeader()

◆ getOppositePos()

double MSLane::getOppositePos ( double  pos) const

◆ getOutgoingViaLanes()

const std::vector< std::pair< const MSLane *, const MSEdge * > > MSLane::getOutgoingViaLanes ( ) const

get the list of outgoing lanes

Definition at line 2630 of file MSLane.cpp.

References myLinks.

Referenced by MSVehicle::replaceRoute().

◆ getParallelLane()

MSLane * MSLane::getParallelLane ( int  offset,
bool  includeOpposite = true 
) const

◆ getParameter()

const std::string Parameterised::getParameter ( const std::string &  key,
const std::string &  defaultValue = "" 
) const
inherited

Returns the value for a given key.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 71 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NBEdge::addRestrictedLane(), FareModul::addStop(), NBEdge::append(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), libsumo::Simulation::findIntermodalRoute(), MSSwarmTrafficLightLogic::getBetaNo(), MSSwarmTrafficLightLogic::getBetaSp(), MSDevice::getBoolParam(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), MSSwarmTrafficLightLogic::getChangePlanProbability(), GNELane::getColorValue(), GUILane::getColorValue(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice::getFloatParam(), MSSwarmTrafficLightLogic::getForgettingCox(), MSSwarmTrafficLightLogic::getGammaNo(), MSSwarmTrafficLightLogic::getGammaSp(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSSwarmTrafficLightLogic::getLearningCox(), MSSwarmTrafficLightLogic::getMaxCongestionDuration(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), GUIBaseVehicle::getOptionalName(), MSDevice_ToC::getOutputFilename(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Route::getParameter(), libsumo::Polygon::getParameter(), libsumo::POI::getParameter(), libsumo::Person::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::Edge::getParameter(), libsumo::Lane::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Vehicle::getParameter(), libsumo::Simulation::getParameter(), MSSwarmTrafficLightLogic::getPheroMaxVal(), MSSwarmTrafficLightLogic::getPoliciesParam(), MSSwarmTrafficLightLogic::getReinforcementMode(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSDevice::getStringParam(), MSSwarmTrafficLightLogic::getThetaInit(), MSSwarmTrafficLightLogic::getThetaMax(), MSSwarmTrafficLightLogic::getThetaMin(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), GNEVehicleType::initRailVisualizationParameters(), MSVehicleType::initRailVisualizationParameters(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), libsumo::Helper::moveToXYMap(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), GNEVehicleType::overwriteVType(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSDevice_SSM::useGeoCoords(), NWWriter_DlrNavteq::writeLinksUnsplitted(), and NWWriter_OpenDrive::writeRoadObjects().

◆ getParametersMap()

const std::map< std::string, std::string > & Parameterised::getParametersMap ( ) const
inherited

Returns the inner key/value map.

Definition at line 105 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_SUMO::_loadNetwork(), NBEdge::addLane(), GUIParameterTableWindow::closeBuilding(), NLHandler::closeEdge(), NBTrafficLightDefinition::compute(), GNEVehicleType::getGenericParameters(), GNELane::getGenericParameters(), GNEPoly::getGenericParameters(), GNEStop::getGenericParameters(), GNEPOI::getGenericParameters(), GNEJunction::getGenericParameters(), GNERide::getGenericParameters(), GNEPersonTrip::getGenericParameters(), GNEWalk::getGenericParameters(), GNEEdge::getGenericParameters(), GNERoute::getGenericParameters(), GNEPerson::getGenericParameters(), GNEAdditional::getGenericParameters(), GNEVehicle::getGenericParameters(), GNEVehicleType::getGenericParametersStr(), GNELane::getGenericParametersStr(), GNEPoly::getGenericParametersStr(), GNEStop::getGenericParametersStr(), GNEPOI::getGenericParametersStr(), GNEJunction::getGenericParametersStr(), GNERide::getGenericParametersStr(), GNEPersonTrip::getGenericParametersStr(), GNEWalk::getGenericParametersStr(), GNEEdge::getGenericParametersStr(), GNERoute::getGenericParametersStr(), GNEPerson::getGenericParametersStr(), GNEAdditional::getGenericParametersStr(), GNEVehicle::getGenericParametersStr(), GUITrafficLightLogicWrapper::getParameterWindow(), GUIPolygon::getParameterWindow(), GUIJunctionWrapper::getParameterWindow(), GUIPointOfInterest::getParameterWindow(), GUILane::getParameterWindow(), GUIPerson::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), NIImporter_OpenStreetMap::insertEdge(), NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(), GUIParameterTableWindow::numParams(), GNEVehicleType::overwriteVType(), and TraCIServerAPI_TrafficLight::processGet().

◆ getParkingVehicles()

const std::set<const MSVehicle*>& MSLane::getParkingVehicles ( ) const
inline

retrieve the parking vehicles (see GUIParkingArea)

Definition at line 1124 of file MSLane.h.

References myParkingVehicles.

Referenced by GUIParkingArea::drawGL().

◆ getPartialBehind()

MSVehicle * MSLane::getPartialBehind ( const MSVehicle ego) const

◆ getPartialBeyond()

MSLeaderInfo MSLane::getPartialBeyond ( ) const

get all vehicles that are inlapping from consecutive edges

Definition at line 3353 of file MSLane.cpp.

References MSLeaderInfo::addLeader(), MSVehicle::getLatOffset(), MSVehicle::isFrontOnLane(), and myPartialVehicles.

◆ getPartialVehicleNumber()

int MSLane::getPartialVehicleNumber ( ) const
inline

Returns the number of vehicles partially on this lane (for which this lane is not responsible)

Returns
The number of vehicles touching this lane but with their front on another lane

Definition at line 417 of file MSLane.h.

References myPartialVehicles.

◆ getPermissions()

SVCPermissions MSLane::getPermissions ( ) const
inline

Returns the vehicle class permissions for this lane.

Returns
This lane's allowed vehicle classes

Definition at line 549 of file MSLane.h.

References myPermissions.

Referenced by MSSwarmTrafficLightLogic::allowLine(), libsumo::Lane::getAllowed(), MSInternalJunction::indirectBicycleTurn(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), and GUIApplicationWindow::onCmdEditChosen().

◆ getPMxEmissions()

double MSLane::getPMxEmissions ( ) const

Returns the sum of last step PMx emissions.

Returns
PMx emissions of vehicles on this lane during the last step

Definition at line 2749 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by GUILane::getColorValue(), libsumo::Lane::getPMxEmission(), GUILane::getScaleValue(), and MSFullExport::writeLane().

◆ getRightmostSublane()

int MSLane::getRightmostSublane ( ) const
inline

Definition at line 1072 of file MSLane.h.

References myRightmostSublane.

Referenced by MSLCM_SL2015::_wantsChangeSublane().

◆ getRightSideOnEdge()

◆ getRNG()

std::mt19937* MSLane::getRNG ( ) const
inline

return the associated RNG

Definition at line 223 of file MSLane.h.

References myRNGIndex, and myRNGs.

Referenced by MSBaseVehicle::getRNG().

◆ getRNGIndex()

int MSLane::getRNGIndex ( ) const
inline

returns the associated RNG index

Definition at line 218 of file MSLane.h.

References myRNGIndex.

Referenced by MSEdgeControl::changeLanes().

◆ getShape()

const PositionVector& MSLane::getShape ( ) const
inline

Returns this lane's shape.

Returns
This lane's shape

Definition at line 478 of file MSLane.h.

References myShape.

Referenced by MSPModel_Remote::add(), LaneStoringVisitor::add(), NLHandler::addConnection(), GUIE3Collector::MyWrapper::buildDefinition(), MSDevice_SSM::classifyEncounter(), MSVehicle::computeAngle(), MSLink::contIntersect(), libsumo::Helper::convertCartesianToRoadMap(), GUILane::debugDrawFoeIntersections(), GUIVehicle::drawAction_drawLinkItems(), GUILane::drawLane2LaneConnections(), fill(), libsumo::Helper::findCloserLane(), MEVehicle::getAngle(), MSTransportable::Stage::getLanePosition(), MSPModel_Striping::getNextLaneObstacles(), GUIContainer::getPosition(), libsumo::Lane::getShape(), libsumo::Person::getSlope(), MEVehicle::getSlope(), MSVehicle::getSlope(), MSVTKExport::getSpeed(), libsumo::InductionLoop::getTree(), GUIBusStop::getWaitPosition(), MSStoppingPlace::getWaitPosition(), GUIBusStop::GUIBusStop(), GUIChargingStation::GUIChargingStation(), GUIContainerStop::GUIContainerStop(), MSPModel_Remote::handlePedestrianLane(), MSPModel_Remote::handleWalkingArea(), MSInternalJunction::indirectBicycleTurn(), MSPModel_Striping::initWalkingAreaPaths(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSLink::MSLink(), MSParkingArea::MSParkingArea(), GUIMEInductLoop::MyWrapper::MyWrapper(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), MSLane::by_connections_to_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), MSLink::setRequestInformation(), MSLaneChangerSublane::startChangeSublane(), libsumo::InductionLoop::storeShape(), libsumo::Lane::storeShape(), and MSPerson::MSPersonStage_Walking::walkDistance().

◆ getSpeedLimit()

◆ getStopOffset()

double MSLane::getStopOffset ( const MSVehicle veh) const

Returns vehicle class specific stopOffset for the vehicle.

Definition at line 3045 of file MSLane.cpp.

References MSBaseVehicle::getVClass(), and myStopOffsets.

Referenced by MSVehicle::planMoveInternal(), MSVehicle::processLaneAdvances(), and MSVehicle::processLinkApproaches().

◆ getStopOffsets()

const std::map<SVCPermissions, double>& MSLane::getStopOffsets ( ) const
inline

Returns vehicle class specific stopOffsets.

Definition at line 832 of file MSLane.h.

References myStopOffsets.

◆ getSurroundingVehicles()

std::set< MSVehicle * > MSLane::getSurroundingVehicles ( double  startPos,
double  downstreamDist,
double  upstreamDist,
std::shared_ptr< LaneCoverageInfo checkedLanes 
) const

Returns all vehicles closer than downstreamDist along the along the road network starting on the given position. Predecessor lanes are searched upstream for the given upstreamDistance.

Note
Re-implementation of the corresponding method in MSDevice_SSM, which cannot be easily adapted, as it gathers additional information for conflict lanes, etc.
Parameters
[in]lanes- sequence of lanes to search along
[in]startPos- start position of the search on the first lane
[in]downstreamDist- distance to search downstream
[in]upstreamDist- distance to search upstream
[in/out]checkedLanes - lanes, which were already scanned (current lane is added, if not present, otherwise the scan is aborted; TODO: this may disregard unscanned parts of the lane in specific circular set ups.)
Returns
vehs - List of vehicles found

Definition at line 3368 of file MSLane.cpp.

References Named::getID(), getIncomingLanes(), getLength(), getLinkCont(), getSurroundingVehicles(), getVehiclesInRange(), MAX2(), MIN2(), Named::myID, and myLength.

Referenced by libsumo::Helper::applySubscriptionFilters(), and getSurroundingVehicles().

◆ getUpcomingJunctions()

std::vector< const MSJunction * > MSLane::getUpcomingJunctions ( double  pos,
double  range,
const std::vector< MSLane * > &  contLanes 
) const

Returns all upcoming junctions within given range along the given (non-internal) continuation lanes measured from given position.

Definition at line 3440 of file MSLane.cpp.

References getUpcomingLinks().

◆ getUpcomingLinks()

std::vector< const MSLink * > MSLane::getUpcomingLinks ( double  pos,
double  range,
const std::vector< MSLane * > &  contLanes 
) const

Returns all upcoming junctions within given range along the given (non-internal) continuation lanes measured from given position.

Definition at line 3451 of file MSLane.cpp.

References getEntryLink(), Named::getID(), MSLink::getInternalLengthsAfter(), MSLink::getLane(), getLength(), getLinkTo(), and isInternal().

Referenced by libsumo::Helper::applySubscriptionFilters(), and getUpcomingJunctions().

◆ getVehicleMaxSpeed()

double MSLane::getVehicleMaxSpeed ( const SUMOTrafficObject *const  veh) const
inline

◆ getVehicleNumber()

int MSLane::getVehicleNumber ( ) const
inline

Returns the number of vehicles on this lane (for which this lane is responsible)

Returns
The number of vehicles with their front on this lane

Definition at line 401 of file MSLane.h.

References myVehicles.

Referenced by libsumo::Lane::getLastStepVehicleNumber(), MSVehicle::planMoveInternal(), and MSFullExport::writeLane().

◆ getVehicleNumberWithPartials()

int MSLane::getVehicleNumberWithPartials ( ) const
inline

Returns the number of vehicles on this lane (including partial occupators)

Returns
The number of vehicles with intersecting this lane

Definition at line 409 of file MSLane.h.

References myPartialVehicles, and myVehicles.

Referenced by detectCollisions(), MSPModel_Striping::getNextLaneObstacles(), isInsertionSuccess(), MSPModel_Striping::moveInDirectionOnLane(), MSVehicle::planMoveInternal(), and MSPModel_Striping::PState::PState().

◆ getVehiclesInRange()

std::set< MSVehicle * > MSLane::getVehiclesInRange ( const double  a,
const double  b 
) const

Returns all vehicles on the lane overlapping with the interval [a,b].

Note
Does not consider vehs with front on subsequent lanes

Definition at line 3420 of file MSLane.cpp.

References getVehiclesSecure(), and releaseVehicles().

Referenced by libsumo::Helper::applySubscriptionFilters(), and getSurroundingVehicles().

◆ getVehiclesSecure()

◆ getWaitingSeconds()

double MSLane::getWaitingSeconds ( ) const

Returns the overall waiting time on this lane.

Returns
The sum of the waiting time of all vehicles during the last step;

Definition at line 2696 of file MSLane.cpp.

References myVehicles.

Referenced by libsumo::Lane::getWaitingTime().

◆ getWidth()

◆ handleCollisionBetween()

void MSLane::handleCollisionBetween ( SUMOTime  timestep,
const std::string &  stage,
MSVehicle collider,
MSVehicle victim,
double  gap,
double  latGap,
std::set< const MSVehicle *, ComparatorNumericalIdLess > &  toRemove,
std::set< const MSVehicle * > &  toTeleport 
) const
protected

take action upon collision

Definition at line 1578 of file MSLane.cpp.

References MSVehicle::addStop(), GeomHelper::angleDiff(), MSCFModel::brakeGap(), SUMOVehicleParameter::Stop::busstop, SUMOVehicleParameter::Stop::chargingStation, COLLISION_ACTION_REMOVE, COLLISION_ACTION_TELEPORT, COLLISION_ACTION_WARN, MSVehicle::collisionStopTime(), SUMOVehicleParameter::Stop::containerstop, SUMOVehicleParameter::Stop::containerTriggered, DEBUG_COND2, SUMOVehicleParameter::Stop::duration, SUMOVehicleParameter::Stop::endPos, MSVehicle::getAngle(), MSEdge::getBidiEdge(), MSVehicle::getCarFollowModel(), getEdge(), MSCFModel::getEmergencyDecel(), Named::getID(), MSBaseVehicle::getID(), MSVehicle::getInfluencer(), MSNet::getInstance(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicleType::getLength(), getLength(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSNet::getVehicleControl(), MSBaseVehicle::getVehicleType(), MSVehicle::hasInfluencer(), MSAbstractLaneChangeModel::haveLateralDynamics(), SUMOVehicleParameter::Stop::index, MSNet::informVehicleStateListener(), MSAbstractLaneChangeModel::isOpposite(), MSVehicle::Influencer::isRemoteAffected(), SUMOVehicleParameter::Stop::lane, MAX2(), MIN2(), myCollisionAction, myCollisionStopTime, SUMOVehicleParameter::Stop::parking, SUMOVehicleParameter::Stop::parkingarea, RAD2DEG, MSVehicleControl::registerCollision(), SUMOVehicleParameter::Stop::startPos, time2string(), toString(), SUMOVehicleParameter::Stop::triggered, SUMOVehicleParameter::Stop::until, MSNet::VEHICLE_STATE_COLLISION, and WRITE_WARNING.

Referenced by detectCollisionBetween(), and detectCollisions().

◆ incorporateVehicle()

void MSLane::incorporateVehicle ( MSVehicle veh,
double  pos,
double  speed,
double  posLat,
const MSLane::VehCont::iterator &  at,
MSMoveReminder::Notification  notification = MSMoveReminder::NOTIFICATION_DEPARTED 
)
protectedvirtual

Inserts the vehicle into this lane, and informs it about entering the network.

Calls the vehicles enterLaneAtInsertion function, updates statistics and modifies the active state as needed

Parameters
[in]vehThe vehicle to be incorporated
[in]posThe position of the vehicle
[in]speedThe speed of the vehicle
[in]posLatThe lateral position of the vehicle
[in]at
[in]notificationThe cause of insertion (i.e. departure, teleport, parking) defaults to departure

Reimplemented in GUILane.

Definition at line 330 of file MSLane.cpp.

References MSVehicle::enterLaneAtInsertion(), MSNet::getEdgeControl(), MSNet::getInstance(), MSVehicleType::getLength(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSEdgeControl::gotActive(), MSEdge::markDelayed(), myBruttoVehicleLengthSum, myEdge, myLength, myNeedsCollisionCheck, myNettoVehicleLengthSum, and myVehicles.

Referenced by forceVehicleInsertion(), GUILane::incorporateVehicle(), isInsertionSuccess(), and loadState().

◆ initCollisionOptions()

◆ initRestrictions()

void MSLane::initRestrictions ( )

initialized vClass-specific speed limits

Definition at line 224 of file MSLane.cpp.

References MSEdge::getEdgeType(), MSNet::getInstance(), MSNet::getRestrictions(), MSGlobals::gUnitTests, myEdge, and myRestrictions.

Referenced by MSLane().

◆ initRNGs()

void MSLane::initRNGs ( const OptionsCont oc)
static

initialize rngs

Definition at line 3672 of file MSLane.cpp.

References OptionsCont::getBool(), OptionsCont::getInt(), RandHelper::initRand(), and myRNGs.

Referenced by NLBuilder::initRandomness().

◆ insertIDs()

void MSLane::insertIDs ( std::vector< std::string > &  into)
static

Adds the ids of all stored lanes into the given vector.

Parameters
[in,filled]into The vector to add the IDs into

Definition at line 1887 of file MSLane.cpp.

References myDict.

Referenced by libsumo::Lane::getIDList().

◆ insertVehicle()

bool MSLane::insertVehicle ( MSVehicle v)

Tries to insert the given vehicle.

The insertion position and speed are determined in dependence to the vehicle's departure definition, first.

Then, the vehicle is tried to be inserted into the lane using these values by a call to "isInsertionSuccess". The result of "isInsertionSuccess" is returned.

Parameters
[in]vThe vehicle to insert
Returns
Whether the vehicle could be inserted
See also
isInsertionSuccess
MSVehicle::getDepartureDefinition
MSVehicle::DepartArrivalDefinition

Definition at line 533 of file MSLane.cpp.

References MSVehicle::basePos(), DEPART_POS_BASE, DEPART_POS_DEFAULT, DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_LAST, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, DEPART_POSLAT_FREE, DEPART_POSLAT_RANDOM_FREE, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosLatProcedure, SUMOVehicleParameter::departPosProcedure, FALLTHROUGH, freeInsertion(), getDepartPosLat(), getDepartSpeed(), getLength(), MSBaseVehicle::getParameter(), MSBaseVehicle::getVehicleType(), MSVehicleType::getWidth(), getWidth(), MSGlobals::gLateralResolution, isInsertionSuccess(), lastInsertion(), myEdge, myLength, MSMoveReminder::NOTIFICATION_DEPARTED, and RandHelper::rand().

Referenced by MSEdge::insertVehicle().

◆ integrateNewVehicles()

◆ interpolateGeometryPosToLanePos()

double MSLane::interpolateGeometryPosToLanePos ( double  geometryPos) const
inline

◆ interpolateLanePosToGeometryPos()

◆ isAccelLane()

bool MSLane::isAccelLane ( ) const
inline

return whether this lane is an acceleration lane

Definition at line 488 of file MSLane.h.

References myIsRampAccel.

Referenced by MSLCM_LC2013::informFollower().

◆ isApproachedFrom() [1/2]

bool MSLane::isApproachedFrom ( MSEdge *const  edge)

Definition at line 2217 of file MSLane.cpp.

References myApproachingLanes.

◆ isApproachedFrom() [2/2]

bool MSLane::isApproachedFrom ( MSEdge *const  edge,
MSLane *const  lane 
)

Definition at line 2223 of file MSLane.cpp.

References myApproachingLanes.

◆ isEmpty()

bool MSLane::isEmpty ( ) const

Returns the information whether the lane is has no vehicle and no partial occupation

Definition at line 1994 of file MSLane.cpp.

References myPartialVehicles, and myVehicles.

Referenced by MSRailSignal::hasOncomingRailTraffic().

◆ isInsertionSuccess()

bool MSLane::isInsertionSuccess ( MSVehicle vehicle,
double  speed,
double  pos,
double  posLat,
bool  recheckNextLanes,
MSMoveReminder::Notification  notification 
)

Tries to insert the given vehicle with the given state (speed and pos)

Checks whether the vehicle can be inserted at the given position with the given speed so that no collisions with leader/follower occur and the speed does not cause unexpected behaviour on consecutive lanes. Returns false if the vehicle can not be inserted.

If the insertion can take place, incorporateVehicle() is called and true is returned.

Parameters
[in]vehicleThe vehicle to insert
[in]speedThe speed with which it shall be inserted
[in]posThe position at which it shall be inserted
[in]posLatThe lateral position at which it shall be inserted
[in]recheckNextLanesForces patching the speed for not being too fast on next lanes
[in]notificationThe cause of insertion (i.e. departure, teleport, parking) defaults to departure
Returns
Whether the vehicle could be inserted
See also
MSVehicle::enterLaneAtInsertion

Definition at line 638 of file MSLane.cpp.

References ARRIVAL_SPEED_GIVEN, SUMOVehicleParameter::arrivalSpeed, SUMOVehicleParameter::arrivalSpeedProcedure, MSRoute::begin(), MSCFModel::brakeGap(), checkFailure(), checkForPedestrians(), DEBUG_COND2, MSInsertionControl::descheduleDeparture(), SUMOVehicleParameter::Stop::endPos, MSCFModel::freeSpeed(), MSBaseVehicle::getArrivalPos(), MSVehicle::getBackPositionOnLane(), MSVehicle::getBestLanesContinuation(), MSEdge::getBidiEdge(), getBidiLane(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), getEdge(), getFollowersOnConsecutive(), Named::getID(), MSBaseVehicle::getID(), Named::getIDSecure(), MSBaseVehicle::getImpatience(), MSNet::getInsertionControl(), MSNet::getInstance(), MSVehicle::getLaneChangeModel(), MSRoute::getLastEdge(), getLastVehicleInformation(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), getMissingRearGap(), MSVehicle::getNextStop(), MSBaseVehicle::getParameter(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getRoute(), MSCFModel::getSecureGap(), MSAbstractLaneChangeModel::getShadowLane(), MSVehicle::getSpeed(), getVehicleMaxSpeed(), getVehicleNumberWithPartials(), MSBaseVehicle::getVehicleType(), MSRailSignal::hasOncomingRailTraffic(), MSVehicle::hasStops(), MSLeaderInfo::hasVehicles(), incorporateVehicle(), MSCFModel::insertionStopSpeed(), INVALID_SPEED, isLinkEnd(), MSVehicle::Stop::lane, LINKSTATE_ALLWAY_STOP, LINKSTATE_EQUAL, LINKSTATE_MINOR, LINKSTATE_STOP, MAX2(), myEdge, Named::myID, myLength, myManeuverReservations, myPartialVehicles, myVehicles, NUMERICAL_EPS, MSLeaderInfo::numFreeSublanes(), MSLeaderInfo::numSublanes(), MSVehicle::Stop::pars, safeInsertionSpeed(), MSVehicle::setTentativeLaneAndPosition(), SIMTIME, MSCFModel::stopSpeed(), succLinkSec(), SUMO_const_haltingSpeed, TIME2STEPS, toString(), MSLeaderInfo::toString(), MSVehicle::updateBestLanes(), WRITE_ERROR, and WRITE_WARNING.

Referenced by MSVehicleTransfer::checkInsertions(), freeInsertion(), insertVehicle(), and lastInsertion().

◆ isInternal()

◆ isLinkEnd() [1/2]

bool MSLane::isLinkEnd ( MSLinkCont::const_iterator &  i) const

Returns the information whether the given link shows at the end of the list of links (is not valid)

Definition at line 1983 of file MSLane.cpp.

References myLinks.

Referenced by MSLaneChanger::checkChange(), getCriticalLeader(), getLeaderOnConsecutive(), getLeadersOnConsecutive(), libsumo::Vehicle::getNextTLS(), isInsertionSuccess(), MSVehicle::planMoveInternal(), and MSVehicle::unsafeLinkAhead().

◆ isLinkEnd() [2/2]

bool MSLane::isLinkEnd ( MSLinkCont::iterator &  i)

Returns the information whether the given link shows at the end of the list of links (is not valid)

Definition at line 1989 of file MSLane.cpp.

References myLinks.

◆ isSelected()

virtual bool MSLane::isSelected ( ) const
inlinevirtual

whether this lane is selected in the GUI

Reimplemented in GUILane.

Definition at line 1129 of file MSLane.h.

◆ knowsParameter()

◆ lastInsertion()

bool MSLane::lastInsertion ( MSVehicle veh,
double  mspeed,
double  posLat,
bool  patchSpeed 
)

◆ leftByLaneChange()

◆ loadState()

void MSLane::loadState ( const std::vector< std::string > &  vehIDs,
MSVehicleControl vc 
)

Loads the state of this segment with the given parameters.

This method is called for every internal que the segment has. Every vehicle is retrieved from the given MSVehicleControl and added to this lane.

Parameters
[in]vehIDsThe vehicle ids for the current que
[in]vcThe vehicle control to retrieve references vehicles from
Todo:

What about throwing an IOError?

What about throwing an error if something else fails (a vehicle can not be referenced)?

Definition at line 3030 of file MSLane.cpp.

References MSVehicle::getLateralPositionOnLane(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSVehicleControl::getVehicle(), incorporateVehicle(), myVehicles, MSMoveReminder::NOTIFICATION_JUNCTION, MSVehicle::processNextStop(), and MSVehicle::updateBestLanes().

Referenced by MSStateHandler::myStartElement().

◆ mustCheckJunctionCollisions()

bool MSLane::mustCheckJunctionCollisions ( ) const

whether this lane must check for junction collisions

Definition at line 3696 of file MSLane.cpp.

References MSEdge::isInternal(), myCheckJunctionCollisions, myEdge, and myLinks.

Referenced by detectCollisions(), and MSVehicle::processLaneAdvances().

◆ needsCollisionCheck()

bool MSLane::needsCollisionCheck ( ) const
inline

short-circut collision check if nothing changed since the last check

Definition at line 623 of file MSLane.h.

References myNeedsCollisionCheck.

◆ operator=()

MSLane& MSLane::operator= ( const MSLane )
private

invalidated assignment operator

◆ planMovements()

void MSLane::planMovements ( const SUMOTime  t)
virtual

Compute safe velocities for all vehicles based on positions and speeds from the last time step. Also registers ApproachingVehicleInformation for all links.

This method goes through all vehicles calling their "planMove" method.

See also
MSVehicle::planMove

Reimplemented in GUILane.

Definition at line 1162 of file MSLane.cpp.

References MSLeaderInfo::addLeader(), DEBUG_COND, DEBUG_COND2, Named::getID(), MSGlobals::gLateralResolution, myManeuverReservations, myPartialVehicles, myVehicles, SIMTIME, toString(), MSLeaderInfo::toString(), and updateLeaderInfo().

Referenced by GUILane::planMovements().

◆ releaseVehicles()

◆ removeParking()

void MSLane::removeParking ( MSVehicle veh)
virtual

remove parking vehicle. This must be syncrhonized when running with GUI

Reimplemented in GUILane.

Definition at line 3012 of file MSLane.cpp.

References myParkingVehicles.

Referenced by MSVehicleTransfer::checkInsertions(), MSVehicleTransfer::remove(), and GUILane::removeParking().

◆ removeVehicle()

◆ requireCollisionCheck()

void MSLane::requireCollisionCheck ( )
inline

require another collision check due to relevant changes in the simulation

Definition at line 628 of file MSLane.h.

References myNeedsCollisionCheck.

Referenced by MSLaneChanger::continueChange().

◆ resetManeuverReservation()

void MSLane::resetManeuverReservation ( MSVehicle v)
virtual

Unregisters a vehicle, which previously registered for maneuvering into this lane.

Parameters
[in]vThe vehicle

Definition at line 312 of file MSLane.cpp.

References DEBUG_COND2, Named::getID(), MSBaseVehicle::getID(), myManeuverReservations, and SIMTIME.

Referenced by MSAbstractLaneChangeModel::cleanupTargetLane(), and MSAbstractLaneChangeModel::updateTargetLane().

◆ resetPartialOccupation()

void MSLane::resetPartialOccupation ( MSVehicle v)
virtual

Removes the information about a vehicle lapping into this lane.

Parameters
[in]vThe vehicle which laps into this lane

Reimplemented in GUILane.

Definition at line 282 of file MSLane.cpp.

References DEBUG_COND2, Named::getID(), MSBaseVehicle::getID(), myPartialVehicles, and SIMTIME.

Referenced by MSAbstractLaneChangeModel::cleanupShadowLane(), GUILane::resetPartialOccupation(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ resetPermissions()

void MSLane::resetPermissions ( long long  transientID)

Definition at line 3623 of file MSLane.cpp.

References myOriginalPermissions, myPermissionChanges, myPermissions, and SVCAll.

Referenced by GUILane::closeTraffic(), and setPermissions().

◆ safeInsertionSpeed()

double MSLane::safeInsertionSpeed ( const MSVehicle veh,
double  seen,
const MSLeaderInfo leaders,
double  speed 
)
protected

◆ saveState()

void MSLane::saveState ( OutputDevice out)

Saves the state of this lane into the given stream.

Basically, a list of vehicle ids

Parameters
[in,filled]out The (possibly binary) device to write the state into
Todo:
What about throwing an IOError?

Definition at line 3017 of file MSLane.cpp.

References OutputDevice::closeTag(), Named::getID(), myVehicles, OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_ATTR_VALUE, SUMO_TAG_LANE, SUMO_TAG_VIEWSETTINGS_VEHICLES, and OutputDevice::writeAttr().

◆ setID()

void Named::setID ( const std::string &  newID)
inlineinherited

◆ setJunctionApproaches()

void MSLane::setJunctionApproaches ( const SUMOTime  t) const
virtual

Register junction approaches for all vehicles after velocities have been planned.

This method goes through all vehicles calling their * "setApproachingForAllLinks" method.

Reimplemented in GUILane.

Definition at line 1202 of file MSLane.cpp.

References myVehicles.

Referenced by GUILane::setJunctionApproaches().

◆ setLength()

void MSLane::setLength ( double  val)

Sets a new length for the lane (used by TraCI only)

Parameters
[in]valthe new length in m

Definition at line 2151 of file MSLane.cpp.

References myEdge, myLength, and MSEdge::recalcCache().

Referenced by libsumo::Lane::setLength().

◆ setManeuverReservation()

void MSLane::setManeuverReservation ( MSVehicle v)
virtual

Registers the lane change intentions (towards this lane) for the given vehicle.

Definition at line 301 of file MSLane.cpp.

References DEBUG_COND2, Named::getID(), MSBaseVehicle::getID(), myManeuverReservations, and SIMTIME.

Referenced by MSAbstractLaneChangeModel::updateTargetLane().

◆ setMaxSpeed()

void MSLane::setMaxSpeed ( double  val)

Sets a new maximum speed for the lane (used by TraCI and MSCalibrator)

Parameters
[in]valthe new speed in m/s

Definition at line 2144 of file MSLane.cpp.

References myEdge, myMaxSpeed, and MSEdge::recalcCache().

Referenced by MSCalibrator::execute(), and libsumo::Lane::setMaxSpeed().

◆ setParameter()

void Parameterised::setParameter ( const std::string &  key,
const std::string &  value 
)
inherited

Sets a parameter.

Parameters
[in]keyThe parameter's name
[in]valueThe parameter's value

Definition at line 45 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::addDistrict(), SUMORouteHandler::addParam(), ShapeHandler::addPOI(), NBEdge::append(), NIImporter_OpenStreetMap::insertNodeChecking(), NBNodeCont::joinNodeCluster(), NBEdge::Lane::Lane(), NIImporter_OpenDrive::loadNetwork(), NIXMLTrafficLightsHandler::myStartElement(), MSStateHandler::myStartElement(), ShapeHandler::myStartElement(), NIXMLNodesHandler::myStartElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), GNEAdditionalHandler::parseGenericParameter(), GNEVehicleType::setAttribute(), GNEConnection::setGenericParametersStr(), GNEVehicleType::setGenericParametersStr(), GNELane::setGenericParametersStr(), GNEPoly::setGenericParametersStr(), GNEStop::setGenericParametersStr(), GNEPOI::setGenericParametersStr(), GNEJunction::setGenericParametersStr(), GNERide::setGenericParametersStr(), GNEPersonTrip::setGenericParametersStr(), GNEWalk::setGenericParametersStr(), GNEEdge::setGenericParametersStr(), GNERoute::setGenericParametersStr(), GNEPerson::setGenericParametersStr(), GNEAdditional::setGenericParametersStr(), GNEVehicle::setGenericParametersStr(), NIImporter_OpenDrive::setLaneAttributes(), libsumo::Route::setParameter(), libsumo::Polygon::setParameter(), libsumo::TrafficLight::setParameter(), libsumo::POI::setParameter(), libsumo::Edge::setParameter(), and libsumo::Lane::setParameter().

◆ setPartialOccupation()

double MSLane::setPartialOccupation ( MSVehicle v)
virtual

Sets the information about a vehicle lapping into this lane.

This vehicle is added to myVehicles and may be distinguished from regular vehicles by the disparity between this lane and v->getLane()

Parameters
[in]vThe vehicle which laps into this lane
Returns
This lane's length

Reimplemented in GUILane.

Definition at line 268 of file MSLane.cpp.

References DEBUG_COND2, Named::getID(), MSBaseVehicle::getID(), myLength, myNeedsCollisionCheck, myPartialVehicles, and SIMTIME.

Referenced by GUILane::setPartialOccupation(), and MSAbstractLaneChangeModel::updateShadowLane().

◆ setPermissions()

void MSLane::setPermissions ( SVCPermissions  permissions,
long long  transientID 
)

Sets the permissions to the given value. If a transientID is given, the permissions are recored as temporary.

Parameters
[in]permissionsThe new permissions
[in]transientIDThe id of the permission-modification or the special value PERMANENT

Definition at line 3611 of file MSLane.cpp.

References CHANGE_PERMISSIONS_PERMANENT, myOriginalPermissions, myPermissionChanges, myPermissions, and resetPermissions().

Referenced by GUILane::closeTraffic(), libsumo::Lane::setAllowed(), and libsumo::Lane::setDisallowed().

◆ setRightSideOnEdge()

void MSLane::setRightSideOnEdge ( double  value,
int  rightmostSublane 
)
inline

Definition at line 1058 of file MSLane.h.

References myRightmostSublane, and myRightSideOnEdge.

◆ setRNGIndex()

void MSLane::setRNGIndex ( const int  rngIndex)
inline

sets the associated RNG index

Definition at line 213 of file MSLane.h.

References myRNGIndex.

◆ setStopOffsets()

void MSLane::setStopOffsets ( std::map< SVCPermissions, double >  stopOffsets)
inline

Set vehicle class specific stopOffsets.

Definition at line 837 of file MSLane.h.

References myStopOffsets.

◆ sortManeuverReservations()

void MSLane::sortManeuverReservations ( )

sorts myManeuverReservations

Definition at line 1964 of file MSLane.cpp.

References DEBUG_COND, Named::getID(), myManeuverReservations, and toString().

◆ sortPartialVehicles()

void MSLane::sortPartialVehicles ( )

sorts myPartialVehicles

Definition at line 1956 of file MSLane.cpp.

References myPartialVehicles.

Referenced by integrateNewVehicles(), and swapAfterLaneChange().

◆ succLinkSec()

MSLinkCont::const_iterator MSLane::succLinkSec ( const SUMOVehicle veh,
int  nRouteSuccs,
const MSLane succLinkSource,
const std::vector< MSLane * > &  conts 
)
static

◆ swapAfterLaneChange()

void MSLane::swapAfterLaneChange ( SUMOTime  t)
protectedvirtual

moves myTmpVehicles int myVehicles after a lane change procedure

Reimplemented in GUILane.

Definition at line 2158 of file MSLane.cpp.

References myTmpVehicles, myVehicles, and sortPartialVehicles().

Referenced by GUILane::swapAfterLaneChange().

◆ teleportOnCollision()

static bool MSLane::teleportOnCollision ( )
inlinestatic

Definition at line 1198 of file MSLane.h.

References COLLISION_ACTION_TELEPORT, and myCollisionAction.

Referenced by MSVehicleControl::getTeleportCount().

◆ unsetParameter()

void Parameterised::unsetParameter ( const std::string &  key)
inherited

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 51 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by GNEVehicleType::setAttribute().

◆ updateLeaderInfo()

void MSLane::updateLeaderInfo ( const MSVehicle veh,
VehCont::reverse_iterator &  vehPart,
VehCont::reverse_iterator &  vehRes,
MSLeaderInfo ahead 
) const

This updates the MSLeaderInfo argument with respect to the given MSVehicle. All leader-vehicles on the same edge, which are relevant for the vehicle (i.e. with position > vehicle's position) and not already integrated into the LeaderInfo, are integrated. The given iterators vehPart and vehRes give access to these vehicles which are either partial occupators or have issued a maneuver reservation for the lane (the latter occurs only for the sublane model).

Definition at line 1210 of file MSLane.cpp.

References MSLeaderInfo::addLeader(), DEBUG_COND, MSVehicle::getPositionOnLane(), myManeuverReservations, and myPartialVehicles.

Referenced by planMovements().

◆ updateLengthSum()

void MSLane::updateLengthSum ( )

updated current vehicle length sum (delayed to avoid lane-order-dependency)

Definition at line 1807 of file MSLane.cpp.

References myBruttoVehicleLengthSum, myBruttoVehicleLengthSumToRemove, myNettoVehicleLengthSum, myNettoVehicleLengthSumToRemove, and myVehicles.

◆ updateParameter()

void Parameterised::updateParameter ( const std::map< std::string, std::string > &  mapArg)
inherited

◆ visit()

void MSLane::visit ( const LaneStoringVisitor cont) const
inline

Callback for visiting the lane when traversing an RTree.

This is used in the TraCIServerAPI_Lane for context subscriptions.

Parameters
[in]contThe context doing all the work
See also
libsumo::Helper::LaneStoringVisitor::add

Definition at line 1192 of file MSLane.h.

References LaneStoringVisitor::add().

Referenced by libsumo::Helper::collectObjectsInRange().

◆ writeParams()

Friends And Related Function Documentation

◆ AnyVehicleIterator

friend class AnyVehicleIterator
friend

◆ MSLaneChanger

friend class MSLaneChanger
friend

needs access to myTmpVehicles (this maybe should be done via double-buffering!!!)

Definition at line 86 of file MSLane.h.

◆ MSLaneChangerSublane

friend class MSLaneChangerSublane
friend

Definition at line 87 of file MSLane.h.

◆ MSQueueExport

friend class MSQueueExport
friend

Definition at line 89 of file MSLane.h.

Field Documentation

◆ CHANGE_PERMISSIONS_GUI

const long MSLane::CHANGE_PERMISSIONS_GUI = 1
static

Definition at line 1207 of file MSLane.h.

Referenced by GUILane::closeTraffic().

◆ CHANGE_PERMISSIONS_PERMANENT

const long MSLane::CHANGE_PERMISSIONS_PERMANENT = 0
static

◆ myApproachingLanes

std::map<MSEdge*, std::vector<MSLane*> > MSLane::myApproachingLanes
protected

All direct internal and direct (disregarding internal predecessors) non-internal predecessor lanes of this lane.

Definition at line 1376 of file MSLane.h.

Referenced by addApproachingLane(), and isApproachedFrom().

◆ myBruttoVehicleLengthSum

double MSLane::myBruttoVehicleLengthSum
protected

The current length of all vehicles on this lane, including their minGaps.

Definition at line 1360 of file MSLane.h.

Referenced by enteredByLaneChange(), getBruttoOccupancy(), getBruttoVehLenSum(), incorporateVehicle(), integrateNewVehicles(), leftByLaneChange(), removeVehicle(), and updateLengthSum().

◆ myBruttoVehicleLengthSumToRemove

double MSLane::myBruttoVehicleLengthSumToRemove
protected

The length of all vehicles that have left this lane in the current step (this lane, including their minGaps)

Definition at line 1366 of file MSLane.h.

Referenced by executeMovements(), and updateLengthSum().

◆ myCanonicalPredecessorLane

MSLane* MSLane::myCanonicalPredecessorLane
mutableprotected

Similar to LogicalPredecessorLane,.

See also
getCanonicalPredecessorLane()

Definition at line 1354 of file MSLane.h.

Referenced by getCanonicalPredecessorLane().

◆ myCanonicalSuccessorLane

MSLane* MSLane::myCanonicalSuccessorLane
mutableprotected

Main successor lane,.

See also
getCanonicalSuccessorLane()

Definition at line 1357 of file MSLane.h.

Referenced by getCanonicalSuccessorLane().

◆ myCheckJunctionCollisions

bool MSLane::myCheckJunctionCollisions
staticprivate

Definition at line 1428 of file MSLane.h.

Referenced by initCollisionOptions(), and mustCheckJunctionCollisions().

◆ myCollisionAction

MSLane::CollisionAction MSLane::myCollisionAction
staticprivate

the action to take on collisions

Definition at line 1427 of file MSLane.h.

Referenced by detectCollisionBetween(), detectCollisions(), getCollisionAction(), handleCollisionBetween(), initCollisionOptions(), and teleportOnCollision().

◆ myCollisionMinGapFactor

double MSLane::myCollisionMinGapFactor
staticprivate

Definition at line 1430 of file MSLane.h.

Referenced by detectCollisionBetween(), and initCollisionOptions().

◆ myCollisionStopTime

SUMOTime MSLane::myCollisionStopTime
staticprivate

Definition at line 1429 of file MSLane.h.

Referenced by handleCollisionBetween(), and initCollisionOptions().

◆ myDict

MSLane::DictType MSLane::myDict
staticprotected

Static dictionary to associate string-ids with objects.

Definition at line 1418 of file MSLane.h.

Referenced by clear(), dictionary(), dictSize(), fill(), and insertIDs().

◆ myEdge

◆ myFollowerInfo

MSLeaderInfo MSLane::myFollowerInfo
mutableprotected

followers on all sublanes as seen by vehicles on consecutive lanes (cached)

Definition at line 1381 of file MSLane.h.

Referenced by getFirstVehicleInformation().

◆ myFollowerInfoTime

SUMOTime MSLane::myFollowerInfoTime
mutableprotected

time step for which myFollowerInfo was last updated

Definition at line 1386 of file MSLane.h.

Referenced by getFirstVehicleInformation().

◆ myID

◆ myIncomingLanes

std::vector<IncomingLaneInfo> MSLane::myIncomingLanes
protected

◆ myIndex

int MSLane::myIndex
protected

The lane index.

Definition at line 1273 of file MSLane.h.

Referenced by GUILane::drawMarkings(), and getIndex().

◆ myIsRampAccel

const bool MSLane::myIsRampAccel
protected

whether this lane is an acceleration lane

Definition at line 1392 of file MSLane.h.

Referenced by isAccelLane().

◆ myLaneType

const std::string MSLane::myLaneType
protected

the type of this lane

Definition at line 1395 of file MSLane.h.

Referenced by getLaneType(), and GUILane::getParameterWindow().

◆ myLeaderInfo

MSLeaderInfo MSLane::myLeaderInfo
mutableprotected

leaders on all sublanes as seen by approaching vehicles (cached)

Definition at line 1379 of file MSLane.h.

Referenced by getLastVehicleInformation().

◆ myLeaderInfoTime

SUMOTime MSLane::myLeaderInfoTime
mutableprotected

time step for which myLeaderInfo was last updated

Definition at line 1384 of file MSLane.h.

Referenced by getLastVehicleInformation().

◆ myLength

◆ myLengthGeometryFactor

const double MSLane::myLengthGeometryFactor
protected

◆ myLinks

◆ myLogicalPredecessorLane

MSLane* MSLane::myLogicalPredecessorLane
mutableprotected

Definition at line 1351 of file MSLane.h.

Referenced by getLogicalPredecessorLane().

◆ myManeuverReservations

VehCont MSLane::myManeuverReservations
protected

The vehicles which registered maneuvering into the lane within their current action step. This is currently only relevant for sublane simulation, since continuous lanechanging uses the partial vehicle mechanism.

The entering vehicles are inserted at the front of this container and the leaving ones leave from the back.

Definition at line 1314 of file MSLane.h.

Referenced by isInsertionSuccess(), planMovements(), resetManeuverReservation(), setManeuverReservation(), sortManeuverReservations(), and updateLeaderInfo().

◆ myMap

◆ myMaxSpeed

double MSLane::myMaxSpeed
protected

Lane-wide speedlimit [m/s].

Definition at line 1336 of file MSLane.h.

Referenced by GUILane::getColorValue(), getMeanSpeed(), GUILane::getScaleValue(), getSpeedLimit(), getVehicleMaxSpeed(), and setMaxSpeed().

◆ myMoveReminders

std::vector< MSMoveReminder* > MSLane::myMoveReminders
private

This lane's move reminder.

Definition at line 1424 of file MSLane.h.

Referenced by addMoveReminder(), and getMoveReminders().

◆ myNeedsCollisionCheck

bool MSLane::myNeedsCollisionCheck
protected

whether a collision check is currently needed

Definition at line 1403 of file MSLane.h.

Referenced by detectCollisions(), executeMovements(), incorporateVehicle(), integrateNewVehicles(), needsCollisionCheck(), requireCollisionCheck(), and setPartialOccupation().

◆ myNeighs

std::vector<std::string> MSLane::myNeighs
protected

Definition at line 1406 of file MSLane.h.

Referenced by addNeigh(), getOpposite(), and integrateNewVehicles().

◆ myNettoVehicleLengthSum

double MSLane::myNettoVehicleLengthSum
protected

The current length of all vehicles on this lane, excluding their minGaps.

Definition at line 1363 of file MSLane.h.

Referenced by enteredByLaneChange(), getNettoOccupancy(), incorporateVehicle(), integrateNewVehicles(), leftByLaneChange(), removeVehicle(), and updateLengthSum().

◆ myNettoVehicleLengthSumToRemove

double MSLane::myNettoVehicleLengthSumToRemove
protected

The length of all vehicles that have left this lane in the current step (this lane, excluding their minGaps)

Definition at line 1369 of file MSLane.h.

Referenced by executeMovements(), and updateLengthSum().

◆ myNumericalID

int MSLane::myNumericalID
protected

Unique numerical ID (set on reading by netload)

Definition at line 1267 of file MSLane.h.

Referenced by getNumericalID().

◆ myOriginalPermissions

SVCPermissions MSLane::myOriginalPermissions
protected

The original vClass permissions for this lane (before temporary modifications)

Definition at line 1342 of file MSLane.h.

Referenced by resetPermissions(), and setPermissions().

◆ myParkingVehicles

std::set<const MSVehicle*> MSLane::myParkingVehicles
protected

◆ myPartialVehicles

VehCont MSLane::myPartialVehicles
protected

The lane's partial vehicles. This container holds all vehicles that are partially on this lane but which are in myVehicles of another lane. Reasons for partial occupancies include the following.

  • the back is still on this lane during regular movement
  • the vehicle is performing a continuous lane-change maneuver
  • sub-lane simulation where vehicles can freely move laterally among the lanes of an edge

The entering vehicles are inserted at the front of this container and the leaving ones leave from the back.

Definition at line 1298 of file MSLane.h.

Referenced by anyVehiclesBegin(), anyVehiclesEnd(), anyVehiclesUpstreamBegin(), detectCollisions(), freeInsertion(), getBruttoOccupancy(), getFirstAnyVehicle(), getLastAnyVehicle(), getLeaderOnConsecutive(), getLeadersOnConsecutive(), getNettoOccupancy(), getPartialBehind(), getPartialBeyond(), getPartialVehicleNumber(), MSLaneChanger::getRealLeader(), getVehicleNumberWithPartials(), integrateNewVehicles(), isEmpty(), isInsertionSuccess(), planMovements(), resetPartialOccupation(), setPartialOccupation(), sortPartialVehicles(), and updateLeaderInfo().

◆ myPermissionChanges

std::map<long long, SVCPermissions> MSLane::myPermissionChanges
protected

◆ myPermissions

◆ myRestrictions

const std::map<SUMOVehicleClass, double>* MSLane::myRestrictions
protected

The vClass speed restrictions for this lane.

Definition at line 1345 of file MSLane.h.

Referenced by getVehicleMaxSpeed(), and initRestrictions().

◆ myRightmostSublane

int MSLane::myRightmostSublane
protected

the index of the rightmost sublane of this lane on myEdge

Definition at line 1400 of file MSLane.h.

Referenced by getRightmostSublane(), and setRightSideOnEdge().

◆ myRightSideOnEdge

double MSLane::myRightSideOnEdge
protected

the combined width of all lanes with lower index on myEdge

Definition at line 1398 of file MSLane.h.

Referenced by getCenterOnEdge(), getRightSideOnEdge(), and setRightSideOnEdge().

◆ myRNGIndex

int MSLane::myRNGIndex
protected

Definition at line 1412 of file MSLane.h.

Referenced by getRNG(), getRNGIndex(), MSLane(), and setRNGIndex().

◆ myRNGs

std::vector< std::mt19937 > MSLane::myRNGs
staticprotected

Definition at line 1420 of file MSLane.h.

Referenced by getNumRNGs(), getRNG(), initRNGs(), and MSLane().

◆ myShape

◆ myStopOffsets

std::map<SVCPermissions, double> MSLane::myStopOffsets
protected

Lane's vClass specific stop offset [m]. The map is either of length 0, which means no special stopOffset was set, or of length 1, where the key is a bitset representing a subset of the SUMOVehicleClass Enum and the value is the offset in meters.

Definition at line 1330 of file MSLane.h.

Referenced by GUILane::drawLinkRules(), getStopOffset(), getStopOffsets(), and setStopOffsets().

◆ myTmpVehicles

VehCont MSLane::myTmpVehicles
protected

Container for lane-changing vehicles. After completion of lane-change- process, the containers will be swapped with myVehicles.

Definition at line 1302 of file MSLane.h.

Referenced by anyVehiclesBegin(), anyVehiclesEnd(), anyVehiclesUpstreamBegin(), getLeader(), and swapAfterLaneChange().

◆ myVehBuffer

FXSynchQue<MSVehicle*, std::vector<MSVehicle*> > MSLane::myVehBuffer
protected

Buffer for vehicles that moved from their previous lane onto this one. Integrated after all vehicles executed their moves.

Definition at line 1306 of file MSLane.h.

Referenced by checkBufferType(), empty(), executeMovements(), and integrateNewVehicles().

◆ myVehicles

VehCont MSLane::myVehicles
protected

The lane's vehicles. This container holds all vehicles that have their front (longitudinally) and their center (laterally) on this lane. These are the vehicles that this lane is 'responsibly' for (i.e. when executing movements)

The entering vehicles are inserted at the front of this container and the leaving ones leave from the back, e.g. the vehicle in front of the junction (often called first) is myVehicles.back() (if it exists). And if it is an iterator at a vehicle, ++it points to the vehicle in front. This is the interaction vehicle.

Definition at line 1286 of file MSLane.h.

Referenced by addMoveReminder(), anyVehiclesBegin(), anyVehiclesEnd(), anyVehiclesUpstreamBegin(), detectCollisions(), empty(), executeMovements(), GUILane::firstWaitingTime(), forceVehicleInsertion(), freeInsertion(), getBruttoOccupancy(), getFirstAnyVehicle(), getFirstFullVehicle(), getLastAnyVehicle(), getLastFullVehicle(), getLeader(), getMeanSpeed(), getNettoOccupancy(), getVehicleNumber(), getVehicleNumberWithPartials(), GUILane::getVehiclesSecure(), getVehiclesSecure(), getWaitingSeconds(), incorporateVehicle(), integrateNewVehicles(), isEmpty(), isInsertionSuccess(), loadState(), planMovements(), removeVehicle(), saveState(), setJunctionApproaches(), swapAfterLaneChange(), updateLengthSum(), and MSQueueExport::writeLane().

◆ myWidth


The documentation for this class was generated from the following files: