 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
96 struct VehPosition :
public std::binary_function < const MSVehicle*, double, bool > {
119 bool downstream =
true) :
141 return !(*
this == other);
202 MSLane(
const std::string&
id,
double maxSpeed,
double length,
MSEdge*
const edge,
205 const std::string& type);
228 return (
int)
myRNGs.size();
247 void addNeigh(
const std::string&
id);
314 bool recheckNextLanes,
318 bool checkFailure(
const MSVehicle* aVehicle,
double& speed,
double& dist,
const double nspeed,
const bool patchSpeed,
const std::string errorMsg)
const;
721 return (
int)
myDict.size();
728 static void insertIDs(std::vector<std::string>& into);
735 template<
class RTREE>
736 static void fill(RTREE& into);
752 const MSLane& succLinkSource,
753 const std::vector<MSLane*>& conts);
758 bool isLinkEnd(MSLinkCont::const_iterator& i)
const;
842 bool allSublanes,
double searchDist = -1,
bool ignoreMinorLinks =
false)
const;
859 std::pair<MSVehicle* const, double>
getLeader(
const MSVehicle* veh,
const double vehPos,
const std::vector<MSLane*>& bestLaneConts,
double dist = -1,
bool checkTmpVehicles =
false)
const;
884 double speed,
const MSVehicle& veh,
const std::vector<MSLane*>& bestLaneConts)
const;
927 std::set<MSVehicle*>
getSurroundingVehicles(
double startPos,
double downstreamDist,
double upstreamDist, std::shared_ptr<LaneCoverageInfo> checkedLanes)
const;
935 std::vector<const MSJunction*>
getUpcomingJunctions(
double pos,
double range,
const std::vector<MSLane*>& contLanes)
const;
937 std::vector<const MSLink*>
getUpcomingLinks(
double pos,
double range,
const std::vector<MSLane*>& contLanes)
const;
1113 std::pair<MSVehicle* const, double>
getFollower(
const MSVehicle* ego,
double egoPos,
double dist,
bool ignoreMinorLinks)
const;
1141 return &mySimulationTask;
1146 return &mySimulationTask;
1151 return &mySimulationTask;
1224 const MSLane::VehCont::iterator& at,
1229 SUMOTime timestep,
const std::string& stage);
1233 std::set<const MSVehicle*, ComparatorNumericalIdLess>& toRemove,
1234 std::set<const MSVehicle*, ComparatorNumericalIdLess>& toTeleport)
const;
1238 double gap,
double latGap,
1239 std::set<const MSVehicle*, ComparatorNumericalIdLess>& toRemove,
1240 std::set<const MSVehicle*, ComparatorNumericalIdLess>& toTeleport)
const;
1563 : myLane(l), myTime(time) {}
1564 void init(Operation operation,
const SUMOTime time) {
1565 myOperation = operation;
1570 (myLane.*(myOperation))(myTime);
1576 Operation myOperation =
nullptr;
1581 SimulationTask&
operator=(
const SimulationTask&) =
delete;
1584 SimulationTask mySimulationTask;
1586 mutable FXMutex myLeaderInfoMutex;
1588 mutable FXMutex myFollowerInfoMutex;
1590 mutable FXMutex myPartialOccupatorMutex;
std::vector< MSMoveReminder * > myMoveReminders
This lane's move reminder.
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
const MSLane *const myLane
double getWaitingSeconds() const
Returns the overall waiting time on this lane.
int myI3End
end index for myTmpVehicles
static DictType myDict
Static dictionary to associate string-ids with objects.
Representation of a vehicle or person.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
double getCOEmissions() const
Returns the sum of last step CO emissions.
double getDepartPosLat(const MSVehicle &veh)
static int dictSize()
Returns the number of stored lanes.
LinkState getIncomingLinkState() const
get the state of the link from the logical predecessor to this lane
std::vector< IncomingLaneInfo > myIncomingLanes
All direct predecessor lanes.
static bool teleportOnCollision()
int operator()(const MSLink *link1, const MSLink *link2) const
comparing operator
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.
MSLeaderInfo myFollowerInfo
followers on all sublanes as seen by vehicles on consecutive lanes (cached)
int operator()(const IncomingLaneInfo &lane1, const IncomingLaneInfo &lane2) const
comparing operator
An upper class for objects with additional parameters.
Representation of a lane in the micro simulation.
Base class for objects which have an id.
bool isLinkEnd(MSLinkCont::const_iterator &i) const
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
int getRightmostSublane() const
void sortPartialVehicles()
sorts myPartialVehicles
Performs lane changing of vehicles.
saves leader/follower vehicles and their distances relative to an ego vehicle
MSVehicle * getLastAnyVehicle() const
returns the last vehicle that is fully or partially on this lane
virtual void resetPartialOccupation(MSVehicle *v)
Removes the information about a vehicle lapping into this lane.
Static storage of an output device and its base (abstract) implementation.
AnyVehicleIterator anyVehiclesUpstreamBegin() const
begin iterator for iterating over all vehicles touching this lane in upstream direction
std::vector< std::string > myNeighs
virtual void setJunctionApproaches(const SUMOTime t) const
Register junction approaches for all vehicles after velocities have been planned.
int myNumericalID
Unique numerical ID (set on reading by netload)
static std::vector< std::mt19937 > myRNGs
MSLane * getCanonicalSuccessorLane() const
const std::string myLaneType
the type of this lane
bool operator!=(AnyVehicleIterator const &other) const
void sortManeuverReservations()
sorts myManeuverReservations
by_connections_to_sorter & operator=(const by_connections_to_sorter &)
MSLeaderInfo getPartialBeyond() const
get all vehicles that are inlapping from consecutive edges
double myNettoVehicleLengthSumToRemove
The length of all vehicles that have left this lane in the current step (this lane,...
int myDirection
index delta
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 th...
int getPartialVehicleNumber() const
Returns the number of vehicles partially on this lane (for which this lane is not responsible)
static double myCollisionMinGapFactor
const MSLeaderInfo getLastVehicleInformation(const MSVehicle *ego, double latOffset, double minPos=0, bool allowCached=true) const
Returns the last vehicles on the lane.
MSLane & operator=(const MSLane &)
invalidated assignment operator
bool isAccelLane() const
return whether this lane is an acceleration lane
std::pair< MSVehicle *const, double > getOppositeFollower(const MSVehicle *ego) const
VehCont myManeuverReservations
The vehicles which registered maneuvering into the lane within their current action step....
double getRightSideOnEdge() const
static MSLinkCont::const_iterator succLinkSec(const SUMOVehicle &veh, int nRouteSuccs, const MSLane &succLinkSource, const std::vector< MSLane * > &conts)
SVCPermissions getPermissions() const
Returns the vehicle class permissions for this lane.
Representation of a vehicle.
std::vector< MSVehicle * > VehCont
Container for vehicles.
AnyVehicleIterator(const MSLane *lane, int i1, int i2, int i3, const int i1End, const int i2End, const int i3End, bool downstream=true)
void initRestrictions()
initialized vClass-specific speed limits
void requireCollisionCheck()
require another collision check due to relevant changes in the simulation
virtual SUMOVehicleClass getVClass() const =0
Returns the vehicle's access class.
double getDepartSpeed(const MSVehicle &veh, bool &patchSpeed)
edge_finder & operator=(const edge_finder &)
double getHarmonoise_NoiseEmissions() const
Returns the sum of last step noise emissions.
MSLane(const MSLane &)
invalidated copy constructor
static CollisionAction myCollisionAction
the action to take on collisions
double getHCEmissions() const
Returns the sum of last step HC emissions.
virtual void planMovements(const SUMOTime t)
Compute safe velocities for all vehicles based on positions and speeds from the last time step....
PositionVector myShape
The shape of the lane.
const MSVehicle * operator*()
MSVehicle * getLastFullVehicle() const
returns the last vehicle for which this lane is responsible or 0
void forceVehicleInsertion(MSVehicle *veh, double pos, MSMoveReminder::Notification notification, double posLat=0)
Inserts the given vehicle at the given position.
Performs lane changing of vehicles.
static CollisionAction getCollisionAction()
MSLeaderInfo myLeaderInfo
leaders on all sublanes as seen by approaching vehicles (cached)
MSLane * getBidiLane() const
retrieve bidirectional lane or nullptr
void setMaxSpeed(double val)
Sets a new maximum speed for the lane (used by TraCI and MSCalibrator)
double getBruttoOccupancy() const
Returns the brutto (including minGaps) occupancy of this lane during the last step.
AnyVehicleIterator & operator++()
const MSVehicle * operator->()
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 m...
int getRNGIndex() const
returns the associated RNG index
void addLink(MSLink *link)
Delayed initialization.
Sorts vehicles by their position (descending)
double myRightSideOnEdge
the combined width of all lanes with lower index on myEdge
double getLengthGeometryFactor() const
return shape.length() / myLength
const std::vector< IncomingLaneInfo > & getIncomingLanes() const
const double myWidth
Lane width [m].
Something on a lane to be noticed about vehicle movement.
MSVehicle * getPartialBehind(const MSVehicle *ego) const
MSLane * myCanonicalSuccessorLane
Main successor lane,.
int getVehicleNumber() const
Returns the number of vehicles on this lane (for which this lane is responsible)
double myBruttoVehicleLengthSumToRemove
The length of all vehicles that have left this lane in the current step (this lane,...
double myBruttoVehicleLengthSum
The current length of all vehicles on this lane, including their minGaps.
bool needsCollisionCheck() const
short-circut collision check if nothing changed since the last check
double myNettoVehicleLengthSum
The current length of all vehicles on this lane, excluding their minGaps.
virtual double getChosenSpeedFactor() const =0
double getBruttoVehLenSum() const
Returns the sum of lengths of vehicles, including their minGaps, which were on the lane during the la...
vehicle_natural_position_sorter(const MSLane *lane)
Constructor.
int myI2
index for myPartialVehicles
static void insertIDs(std::vector< std::string > &into)
Adds the ids of all stored lanes into the given vector.
void addParking(MSVehicle *veh)
add parking vehicle. This should only used during state loading
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
bool detectCollisionBetween(SUMOTime timestep, const std::string &stage, MSVehicle *collider, MSVehicle *victim, std::set< const MSVehicle *, ComparatorNumericalIdLess > &toRemove, std::set< const MSVehicle *, ComparatorNumericalIdLess > &toTeleport) const
detect whether there is a collision between the two vehicles
double getCO2Emissions() const
Returns the sum of last step CO2 emissions.
const MSLane *const myLane
bool operator()(const IncomingLaneInfo &ili) const
SUMOTime myFollowerInfoTime
time step for which myFollowerInfo was last updated
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
const MSEdge *const myEdge
const std::set< const MSVehicle * > & getParkingVehicles() const
retrieve the parking vehicles (see GUIParkingArea)
virtual void executeMovements(const SUMOTime t)
Executes planned vehicle movements with regards to right-of-way.
by_connections_to_sorter(const MSEdge *const e)
constructor
virtual void swapAfterLaneChange(SUMOTime t)
moves myTmpVehicles int myVehicles after a lane change procedure
double getElectricityConsumption() const
Returns the sum of last step electricity consumption.
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)
void setPermissions(SVCPermissions permissions, long long transientID)
Sets the permissions to the given value. If a transientID is given, the permissions are recored as te...
double interpolateGeometryPosToLanePos(double geometryPos) const
const MSLane * myLane
the lane that is being iterated
std::map< SVCPermissions, double > myStopOffsets
const double myLengthGeometryFactor
precomputed myShape.length / myLength
static const long CHANGE_PERMISSIONS_PERMANENT
SUMOTime myLeaderInfoTime
time step for which myLeaderInfo was last updated
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
static void initRNGs(const OptionsCont &oc)
initialize rngs
int getVehicleNumberWithPartials() const
Returns the number of vehicles on this lane (including partial occupators)
const std::vector< MSMoveReminder * > & getMoveReminders() const
Return the list of this lane's move reminders.
double getStopOffset(const MSVehicle *veh) const
Returns vehicle class specific stopOffset for the vehicle.
const bool myIsRampAccel
whether this lane is an acceleration lane
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.
const std::string & getLaneType() const
return the type of this lane
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.
void changeLanes(const SUMOTime time)
virtual void addMoveReminder(MSMoveReminder *rem)
Add a move-reminder to move-reminder container.
int myI1
index for myVehicles
void leftByLaneChange(MSVehicle *v)
virtual bool isSelected() const
whether this lane is selected in the GUI
MSLane * myLogicalPredecessorLane
@ COLLISION_ACTION_REMOVE
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
std::set< MSVehicle * > getVehiclesInRange(const double a, const double b) const
Returns all vehicles on the lane overlapping with the interval [a,b].
bool insertVehicle(MSVehicle &v)
Tries to insert the given vehicle.
double getNOxEmissions() const
Returns the sum of last step NOx emissions.
double interpolateLanePosToGeometryPos(double lanePos) const
virtual bool appropriate(const MSVehicle *veh)
double getLength() const
Returns the lane's length.
vehicle_position_sorter(const MSLane *lane)
Constructor.
void setRNGIndex(const int rngIndex)
sets the associated RNG index
static const long CHANGE_PERMISSIONS_GUI
double getOppositePos(double pos) const
return the corresponding position on the opposite lane
static void clear()
Clears the dictionary.
bool empty() const
Returns true if there is not a single vehicle on the lane.
std::pair< MSVehicle *const, double > getOppositeLeader(const MSVehicle *ego, double dist, bool oppositeDir) const
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...
SVCPermissions myOriginalPermissions
The original vClass permissions for this lane (before temporary modifications)
double getMeanSpeed() const
Returns the mean speed on this lane.
A point in 2D or 3D with translation and scaling methods.
bool freeInsertion(MSVehicle &veh, double speed, double posLat, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
Tries to insert the given vehicle on any place.
Sorts lanes (their origin link) by the priority of their noninternal target edges or,...
Sorts edges by their angle relative to the given edge (straight comes first)
void addApproachingLane(MSLane *lane, bool warnMultiCon)
const MSEdge * getNextNormal() const
Returns the lane's follower if it is an internal lane, the edge of the lane otherwise.
bool checkForPedestrians(const MSVehicle *aVehicle, double &speed, double &dist, double pos, bool patchSpeed) const
check whether pedestrians on this lane interfere with vehicle insertion
virtual MSVehicle * removeVehicle(MSVehicle *remVehicle, MSMoveReminder::Notification notification, bool notify=true)
A storage for options typed value containers)
A road/street connecting two junctions.
bool myNeedsCollisionCheck
whether a collision check is currently needed
static int getNumRNGs()
return the number of RNGs
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 give...
int operator()(MSVehicle *v1, MSVehicle *v2) const
Comparing operator.
bool nextIsMyVehicles() const
virtual void resetManeuverReservation(MSVehicle *v)
Unregisters a vehicle, which previously registered for maneuvering into this lane.
MSLane * getCanonicalPredecessorLane() const
int operator()(MSVehicle *v1, MSVehicle *v2) const
Comparing operator.
@ NOTIFICATION_DEPARTED
The vehicle has departed (was inserted into the network)
double getNettoOccupancy() const
Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps)
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
int myI1End
end index for myVehicles
int getNumericalID() const
Returns this lane's numerical id.
virtual void setManeuverReservation(MSVehicle *v)
Registers the lane change intentions (towards this lane) for the given vehicle.
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 m...
AnyVehicleIterator anyVehiclesEnd() const
end iterator for iterating over all vehicles touching this lane in downstream direction
void visit(const LaneStoringVisitor &cont) const
Callback for visiting the lane when traversing an RTree.
int myI3
index for myTmpVehicles
virtual void detectCollisions(SUMOTime timestep, const std::string &stage)
Check if vehicles are too close.
void loadState(const std::vector< std::string > &vehIDs, MSVehicleControl &vc)
Loads the state of this segment with the given parameters.
void updateLengthSum()
updated current vehicle length sum (delayed to avoid lane-order-dependency)
bool allowsVehicleClass(SUMOVehicleClass vclass) const
double getPMxEmissions() const
Returns the sum of last step PMx emissions.
bool isApproachedFrom(MSEdge *const edge)
MSLane * getOpposite() const
return the opposite direction lane for lane changing or 0
MSLane * getLogicalPredecessorLane() const
get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached ...
static bool myCheckJunctionCollisions
virtual ~MSLane()
Destructor.
double getMaximumBrakeDist() const
compute maximum braking distance on this lane
MSEdge & getEdge() const
Returns the lane's edge.
const MSLane * getFirstInternalInConnection(double &offset) const
Returns 0 if the lane is not internal. Otherwise the first part of the connection (sequence of intern...
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.
double getCenterOnEdge() const
const std::map< SUMOVehicleClass, double > * myRestrictions
The vClass speed restrictions for this lane.
void addIncomingLane(MSLane *lane, MSLink *viaLink)
MSEdge *const myEdge
The lane's edge, for routing only.
outgoing_lane_priority_sorter & operator=(const outgoing_lane_priority_sorter &)
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 di...
int myRightmostSublane
the index of the rightmost sublane of this lane on myEdge
const PositionVector & getShape() const
Returns this lane's shape.
int myIndex
The lane index.
std::map< std::string, MSLane * > DictType
definition of the static dictionary type
std::map< MSEdge *, std::vector< MSLane * > > myApproachingLanes
All direct internal and direct (disregarding internal predecessors) non-internal predecessor lanes of...
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 *, ComparatorNumericalIdLess > &toTeleport) const
take action upon collision
void saveState(OutputDevice &out)
Saves the state of this lane into the given stream.
bool mustCheckJunctionCollisions() const
whether this lane must check for junction collisions
bool checkFailure(const MSVehicle *aVehicle, double &speed, double &dist, const double nspeed, const bool patchSpeed, const std::string errorMsg) const
bool myDownstream
iteration direction
bool operator==(AnyVehicleIterator const &other) const
void setRightSideOnEdge(double value, int rightmostSublane)
incoming_lane_priority_sorter(const MSLane *targetLane)
constructor
const std::map< SVCPermissions, double > & getStopOffsets() const
Returns vehicle class specific stopOffsets.
virtual void integrateNewVehicles()
Insert buffered vehicle into the real lane.
SVCPermissions myPermissions
The vClass permissions for this lane.
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 inse...
double myLength
Lane length [m].
AnyVehicleIterator anyVehiclesUpstreamEnd() const
end iterator for iterating over all vehicles touching this lane in upstream direction
MSLink * getLinkTo(const MSLane *) const
returns the link to the given lane or 0, if it is not connected
void setLength(double val)
Sets a new length for the lane (used by TraCI only)
std::map< const MSLane *, std::pair< double, double > > LaneCoverageInfo
Coverage info.
FXSynchQue< MSVehicle *, std::vector< MSVehicle * > > myVehBuffer
Buffer for vehicles that moved from their previous lane onto this one. Integrated after all vehicles ...
static void fill(RTREE &into)
Fills the given RTree with lane instances.
MSLane * getParallelLane(int offset, bool includeOpposite=true) const
Returns the lane with the given offset parallel to this one or 0 if it does not exist.
VehCont myPartialVehicles
The lane's partial vehicles. This container holds all vehicles that are partially on this lane but wh...
virtual void removeParking(MSVehicle *veh)
remove parking vehicle. This must be syncrhonized when running with GUI
int operator()(const MSEdge *const e1, const MSEdge *const e2) const
comparing operator
double getWidth() const
Returns the lane's width.
std::set< const MSVehicle * > myParkingVehicles
int myI2End
end index for myPartialVehicles
friend class AnyVehicleIterator
MSVehicle * getFirstAnyVehicle() const
returns the first vehicle that is fully or partially on this lane
The class responsible for building and deletion of vehicles.
incoming_lane_priority_sorter & operator=(const incoming_lane_priority_sorter &)
@ COLLISION_ACTION_TELEPORT
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
std::mt19937 * getRNG() const
return the associated RNG
bool operator()(const MSVehicle *cmp, double pos) const
compares vehicle position to the detector position
MSLane * myCanonicalPredecessorLane
Similar to LogicalPredecessorLane,.
const std::vector< std::pair< const MSLane *, const MSEdge * > > getOutgoingViaLanes() const
get the list of outgoing lanes
const MSLane * getNormalPredecessorLane() const
get normal lane leading to this internal lane, for normal lanes, the lane itself is returned
double getVehicleMaxSpeed(const SUMOTrafficObject *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
void setStopOffsets(std::map< SVCPermissions, double > stopOffsets)
Set vehicle class specific stopOffsets.
Export the queueing length in front of a junction (very experimental!)
std::map< long long, SVCPermissions > myPermissionChanges
double getSpeedLimit() const
Returns the lane's maximum allowed speed.
Abstract superclass of a task to be run with an index to keep track of pending tasks.
double getFuelConsumption() const
Returns the sum of last step fuel consumption.
virtual double setPartialOccupation(MSVehicle *v)
Sets the information about a vehicle lapping into this lane.
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
int getCrossingIndex() const
return the index of the link to the next crossing if this is walkingArea, else -1
virtual double getMaxSpeed() const =0
Returns the vehicle's maximum speed.
MSVehicle * getFirstFullVehicle() const
returns the first vehicle for which this lane is responsible or 0
Notification
Definition of a vehicle state.
outgoing_lane_priority_sorter(const MSLane *sourceLane)
constructor
Sorts lanes (IncomingLaneInfos) by their priority or, if this doesn't apply, wrt. the angle differenc...
const MSEdge *const myEdge
AnyVehicleIterator is a structure, which manages the iteration through all vehicles on the lane,...
int getIndex() const
Returns the lane's index.
void addNeigh(const std::string &id)
Adds a neighbor to this lane.
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 t...
VehCont myVehicles
The lane's vehicles. This container holds all vehicles that have their front (longitudinally) and the...
double myMaxSpeed
Lane-wide speedlimit [m/s].
void add(const MSLane *const l) const
Adds the given object to the container.
void resetPermissions(long long transientID)
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.
void enteredByLaneChange(MSVehicle *v)
A thread repeatingly calculating incoming tasks.
static SUMOTime myCollisionStopTime
VehCont myTmpVehicles
Container for lane-changing vehicles. After completion of lane-change- process, the containers will b...
MSLink * getEntryLink() const
Returns the entry link if this is an internal lane, else 0.
AnyVehicleIterator anyVehiclesBegin() const
begin iterator for iterating over all vehicles touching this lane in downstream direction
static void initCollisionOptions(const OptionsCont &oc)
Representation of a vehicle in the micro simulation.
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)