100 const bool _willPass,
102 const SUMOReal _arrivalSpeedBraking,
136 #ifndef HAVE_INTERNAL_LANES
170 const std::vector<MSLink*>& foeLinks,
const std::vector<MSLane*>& foeLanes,
171 MSLane* internalLaneBefore = 0);
179 const SUMOReal arrivalSpeed,
const SUMOReal leaveSpeed,
const bool setRequest,
202 std::vector<const SUMOVehicle*>* collectFoes = 0)
const;
220 std::vector<const SUMOVehicle*>* collectFoes = 0)
const;
316 #ifdef HAVE_INTERNAL_LANES
321 MSLane* getViaLane()
const;
331 LinkLeaders getLeaderInfo(
SUMOReal dist,
SUMOReal minGap, std::vector<const MSPerson*>* collectBlockers = 0)
const;
349 return (leaderSpeed * leaderSpeed / leaderDecel) <= (followerSpeed * followerSpeed / followerDecel);
379 #ifdef HAVE_INTERNAL_LANES
380 MSLane*
const myJunctionInlane;
388 std::vector<std::pair<SUMOReal, SUMOReal> > myLengthsBehindCrossing;
int myIndex
The position within this respond.
Representation of a vehicle in the micro simulation.
bool hasFoes() const
Returns whether this link belongs to a junction where more than one edge is incoming.
bool hasApproachingFoe(SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal speed, SUMOReal decel) const
Returns the information whether a vehicle is approaching on one of the link's foe streams...
MSLane * myLane
The lane approached by this link.
void addBlockedLink(MSLink *link)
std::pair< MSVehicle *, SUMOReal > vehAndGap
ApproachingVehicleInformation getApproaching(const SUMOVehicle *veh) const
LinkState myState
The state of the link.
void setRequestInformation(int index, bool hasFoes, bool isCont, const std::vector< MSLink * > &foeLinks, const std::vector< MSLane * > &foeLanes, MSLane *internalLaneBefore=0)
Sets the request information.
bool myHasFoes
Whether any foe links exist.
std::vector< MSLink * > myFoeLinks
void setTLState(LinkState state, SUMOTime t)
Sets the current tl-state.
LinkDirection myDirection
An abstract (hopefully human readable) definition of the link's direction.
LinkDirection getDirection() const
Returns the direction the vehicle passing this link take.
std::map< const SUMOVehicle *, ApproachingVehicleInformation > myApproachingVehicles
bool lastWasContMajor() const
whether this is a link past an internal junction which currently has priority
bool blockedAtTime(SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, bool sameTargetLane, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime, std::vector< const SUMOVehicle * > *collectFoes=0) const
Returns the information whether this link is blocked Valid after the vehicles have set their requests...
SUMOReal myLength
The length of the link.
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
int getIndex() const
Returns the respond index (for visualization)
SUMOTime getLeaveTime(const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, const SUMOReal leaveSpeed, const SUMOReal vehicleLength) const
return the expected time at which the given vehicle will clear the link
MSLink & operator=(const MSLink &s)
invalidated assignment operator
Representation of a vehicle.
LinkLeader(MSVehicle *_veh, SUMOReal _gap, SUMOReal _distToCrossing)
MSLane * getLane() const
Returns the connected lane.
std::set< MSLink * > myBlockedFoeLinks
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
std::vector< LinkLeader > LinkLeaders
bool isBlockingAnyone() const
static bool unsafeMergeSpeeds(SUMOReal leaderSpeed, SUMOReal followerSpeed, SUMOReal leaderDecel, SUMOReal followerDecel)
return whether the given vehicles may NOT merge safely
SUMOReal getLength() const
Returns the length of this link.
static bool maybeOccupied(MSLane *lane)
returns whether the given lane may still be occupied by a vehicle currently on it ...
std::vector< MSLane * > myFoeLanes
bool havePriority() const
Returns whether this link is a major link.
bool willHaveBlockedFoe() const
MSLane * getViaLaneOrLane() const
return the via lane if it exists and the lane otherwise
void writeApproaching(OutputDevice &od, const std::string fromLaneID) const
write information about all approaching vehicles to the given output device
MSLink(MSLane *succLane, LinkDirection dir, LinkState state, SUMOReal length)
Constructor for simulation not using internal lanes.
LinkState getState() const
Returns the current state of the link.
Static storage of an output device and its base (abstract) implementation.
void setApproaching(const SUMOVehicle *approaching, const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, const SUMOReal leaveSpeed, const bool setRequest, const SUMOTime arrivalTimeBraking, const SUMOReal arrivalSpeedBraking, const SUMOTime waitingTime)
Sets the information about an approaching vehicle.
void removeApproaching(const SUMOVehicle *veh)
removes the vehicle from myApproachingVehicles
static SUMOTime myLookaheadTime
Representation of a lane in the micro simulation.
bool opened(SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, SUMOReal vehicleLength, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime, std::vector< const SUMOVehicle * > *collectFoes=0) const
Returns the information whether the link may be passed.