SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSLane Class Reference

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

#include <MSLane.h>

Inheritance diagram for MSLane:
Named Parameterised GUILane MSInternalLane GUIInternalLane

Data Structures

class  by_connections_to_sorter
class  edge_finder
struct  IncomingLaneInfo
class  vehicle_position_sorter
 Sorts vehicles by their position (descending) More...
struct  VehPosition

Public Types

typedef std::deque< MSVehicle * > VehCont
 Container for vehicles.

Public Member Functions

void addApproachingLane (MSLane *lane)
void addIncomingLane (MSLane *lane, MSLink *viaLink)
void addParameter (const std::string &key, const std::string &value)
 Adds a parameter.
void addParameter (const std::map< std::string, std::string > &mapArg)
 Adds all given parameter.
void addParameter (const Parameterised &p)
 Adds all given parameter.
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container.
bool allowsVehicleClass (SUMOVehicleClass vclass) const
virtual bool appropriate (const MSVehicle *veh)
virtual GUILaneWrapperbuildLaneWrapper (unsigned int index)
void clearParameter ()
 Clears the parameter map.
virtual void detectCollisions (SUMOTime timestep, int stage)
 Check if vehicles are too close.
bool empty () const
 Returns true if there is not a single vehicle on the lane.
void enteredByLaneChange (MSVehicle *v)
MSEdgegetEdge () const
 Returns the lane's edge.
virtual const MSVehiclegetFirstVehicle () const
std::pair< MSVehicle *const,
SUMOReal
getFollowerOnConsecutive (SUMOReal dist, SUMOReal seen, SUMOReal leaderSpeed, SUMOReal backOffset, SUMOReal predMaxDecel) const
const std::string & getID () const
 Returns the id.
const std::vector
< IncomingLaneInfo > & 
getIncomingLanes () const
virtual MSVehiclegetLastVehicle () const
 returns the last vehicle
std::pair< MSVehicle *const,
SUMOReal
getLeaderOnConsecutive (SUMOReal dist, SUMOReal seen, SUMOReal speed, const MSVehicle &veh, const std::vector< MSLane * > &bestLaneConts) const
 Returns the leader and the distance to him.
MSLanegetLeftLane () const
const MSLinkContgetLinkCont () const
 returns the container with all links !!!
MSLanegetLogicalPredecessorLane () const
const std::map< std::string,
std::string > & 
getMap () const
 Returns the inner key/value map.
SUMOReal getMissingRearGap (SUMOReal dist, SUMOReal backOffset, SUMOReal leaderSpeed, SUMOReal leaderMaxDecel) const
 return by how much further the leader must be inserted to avoid rear end collisions
const std::string & getParameter (const std::string &key, const std::string &defaultValue) const
 Returns the value for a given key.
MSLanegetRightLane () const
bool isApproachedFrom (MSEdge *const edge)
bool isApproachedFrom (MSEdge *const edge, MSLane *const lane)
bool isLinkEnd (MSLinkCont::const_iterator &i) const
bool isLinkEnd (MSLinkCont::iterator &i)
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known.
void leftByLaneChange (MSVehicle *v)
 MSLane (const std::string &id, SUMOReal maxSpeed, SUMOReal length, MSEdge *const edge, unsigned int numericalID, const PositionVector &shape, SUMOReal width, SVCPermissions permissions)
 Constructor.
virtual MSVehicleremoveVehicle (MSVehicle *remVehicle)
void setID (const std::string &newID)
 resets the id
void setLength (SUMOReal val)
void setMaxSpeed (SUMOReal val)
void setPermissions (SVCPermissions permissions)
virtual MSLinkCont::const_iterator succLinkSec (const SUMOVehicle &veh, unsigned int nRouteSuccs, const MSLane &succLinkSource, const std::vector< MSLane * > &conts) const
virtual ~MSLane ()
 Destructor.
Additional initialisation
void addLink (MSLink *link)
 Delayed initialization.
interaction with MSMoveReminder
virtual void addMoveReminder (MSMoveReminder *rem)
 Add a move-reminder to move-reminder container.
const std::vector
< MSMoveReminder * > & 
getMoveReminders () const
 Return the list of this lane's move reminders.
Vehicle insertion
bool insertVehicle (MSVehicle &v)
 Tries to insert the given vehicle.
virtual bool isInsertionSuccess (MSVehicle *vehicle, SUMOReal speed, SUMOReal pos, bool recheckNextLanes, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
 Tries to insert the given vehicle with the given state (speed and pos)
bool pWagGenericInsertion (MSVehicle &veh, SUMOReal speed, SUMOReal maxPos, SUMOReal minPos)
bool pWagSimpleInsertion (MSVehicle &veh, SUMOReal speed, SUMOReal maxPos, SUMOReal minPos)
bool maxSpeedGapInsertion (MSVehicle &veh, SUMOReal mspeed)
bool freeInsertion (MSVehicle &veh, SUMOReal speed, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
 Tries to insert the given vehicle on any place.
void forceVehicleInsertion (MSVehicle *veh, SUMOReal pos)
 Inserts the given vehicle at the given position.
Handling vehicles lapping into lanes
SUMOReal setPartialOccupation (MSVehicle *v, SUMOReal leftVehicleLength)
 Sets the information about a vehicle lapping into this lane.
void resetPartialOccupation (MSVehicle *v)
 Removes the information about a vehicle lapping into this lane.
MSVehiclegetPartialOccupator () const
 Returns the vehicle which laps into this lane.
SUMOReal getPartialOccupatorEnd () const
 Returns the position of the in-lapping vehicle's end.
std::pair< MSVehicle *, SUMORealgetLastVehicleInformation () const
 Returns the last vehicle which is still on the lane.
Access to vehicles
unsigned int getVehicleNumber () const
 Returns the number of vehicles on this lane.
virtual const std::deque
< MSVehicle * > & 
getVehiclesSecure () const
 Returns the vehicles container; locks it for microsimulation.
virtual void releaseVehicles () const
 Allows to use the container for microsimulation again.
Atomar value getter
size_t getNumericalID () const
 Returns this lane's numerical id.
const PositionVectorgetShape () const
 Returns this lane's shape.
SUMOReal interpolateLanePosToGeometryPos (SUMOReal lanePos) const
SUMOReal interpolateGeometryPosToLanePos (SUMOReal geometryPos) const
SUMOReal getVehicleMaxSpeed (const SUMOVehicle *const veh) const
 Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
SUMOReal getSpeedLimit () const
 Returns the lane's maximum allowed speed.
SUMOReal getLength () const
 Returns the lane's length.
SVCPermissions getPermissions () const
 Returns the vehicle class permissions for this lane.
SUMOReal getWidth () const
 Returns the lane's width.
Vehicle movement (longitudinal)
virtual bool planMovements (SUMOTime t)
 Compute safe velocities for all vehicles based on positions and speeds from the last time step. Also registers ApproachingVehicleInformation for all links.
virtual bool executeMovements (SUMOTime t, std::vector< MSLane * > &into)
 Executes planned vehicle movements with regards to right-of-way.
virtual bool integrateNewVehicle (SUMOTime t)
 Insert buffered vehicle into the real lane.
Current state retrieval
SUMOReal getMeanSpeed () const
 Returns the mean speed on this lane.
SUMOReal getOccupancy () const
 Returns the occupancy of this lane during the last step.
SUMOReal getVehLenSum () const
 Returns the sum of lengths of vehicles which were on the lane during the last step.
SUMOReal getHBEFA_CO2Emissions () const
 Returns the sum of last step CO2 emissions.
SUMOReal getHBEFA_COEmissions () const
 Returns the sum of last step CO emissions.
SUMOReal getHBEFA_PMxEmissions () const
 Returns the sum of last step PMx emissions.
SUMOReal getHBEFA_NOxEmissions () const
 Returns the sum of last step NOx emissions.
SUMOReal getHBEFA_HCEmissions () const
 Returns the sum of last step HC emissions.
SUMOReal getHBEFA_FuelConsumption () const
 Returns the sum of last step fuel consumption.
SUMOReal getHarmonoise_NoiseEmissions () const
 Returns the sum of last step noise emissions.

Static Public Member Functions

static void clear ()
static bool dictionary (std::string id, MSLane *lane)
 Inserts a MSLane into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise returns false.
static MSLanedictionary (std::string id)
 Returns the MSLane associated to the key id if exists Otherwise returns 0.
static size_t dictSize ()
static void insertIDs (std::vector< std::string > &into)

Data Fields

PositionVector myShape
 The shape of the lane.

Protected Types

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

Protected Member Functions

virtual void incorporateVehicle (MSVehicle *veh, SUMOReal pos, SUMOReal speed, const MSLane::VehCont::iterator &at, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
 Inserts the vehicle into this lane, and informs it about entering the network.
virtual void swapAfterLaneChange (SUMOTime t)
 moves myTmpVehicles int myVehicles after a lane change procedure

Protected Attributes

std::map< MSEdge
*, std::vector< MSLane * > > 
myApproachingLanes
MSEdgemyEdge
 The lane's edge, for routing only.
std::string myID
 The name of the object.
std::vector< IncomingLaneInfomyIncomingLanes
MSVehiclemyInlappingVehicle
 The vehicle which laps into this lane.
SUMOReal myInlappingVehicleEnd
 End position of a vehicle which laps into this lane.
SUMOReal myLeftVehLength
 Not yet seen vehicle lengths.
SUMOReal myLength
 Lane length [m].
const SUMOReal myLengthGeometryFactor
MSLinkCont myLinks
MSLanemyLogicalPredecessorLane
SUMOReal myMaxSpeed
 Lane-wide speedlimit [m/s].
size_t myNumericalID
 Unique numerical ID (set on reading by netload)
SVCPermissions myPermissions
 The vClass permissions for this lane.
VehCont myTmpVehicles
std::vector< MSVehicle * > myVehBuffer
SUMOReal myVehicleLengthSum
 The current length of all vehicles on this lane.
VehCont myVehicles
 The lane's vehicles. 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.
SUMOReal myWidth
 Lane width [m].

Static Protected Attributes

static DictType myDict
 Static dictionary to associate string-ids with objects.

Private Member Functions

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

Private Attributes

std::vector< MSMoveReminder * > myMoveReminders
 This lane's move reminder.

Friends

class GUILaneWrapper
class MSLaneChanger
 needs access to myTmpVehicles (this maybe should be done via double-buffering!!!)
class MSQueueExport
class MSXMLRawOut

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 73 of file MSLane.h.

Member Typedef Documentation

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

definition of the tatic dictionary type

Definition at line 715 of file MSLane.h.

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

Container for vehicles.

Definition at line 458 of file MSLane.h.

Constructor & Destructor Documentation

MSLane::MSLane ( const std::string &  id,
SUMOReal  maxSpeed,
SUMOReal  length,
MSEdge *const  edge,
unsigned int  numericalID,
const PositionVector shape,
SUMOReal  width,
SVCPermissions  permissions 
)

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
See Also
SUMOVehicleClass

Definition at line 83 of file MSLane.cpp.

MSLane::~MSLane ( )
virtual

Destructor.

Definition at line 95 of file MSLane.cpp.

References myLinks.

MSLane::MSLane ( const MSLane )
private

invalidated copy constructor

Member Function Documentation

void MSLane::addApproachingLane ( MSLane lane)

Definition at line 968 of file MSLane.cpp.

References getEdge(), and myApproachingLanes.

Referenced by NLHandler::addConnection().

void MSLane::addIncomingLane ( MSLane lane,
MSLink viaLink 
)
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 103 of file MSLane.cpp.

References myLinks.

Referenced by NLHandler::addConnection().

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 110 of file MSLane.cpp.

References myMoveReminders, and myVehicles.

Referenced by MSMoveReminder::MSMoveReminder().

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

Adds a parameter.

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

Definition at line 53 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::addParam(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), and NIImporter_MATSim::EdgesHandler::myStartElement().

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

Adds all given parameter.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 59 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::addParameter ( const Parameterised p)
inherited

Adds all given parameter.

Parameters
[in]pThe keys/values to insert

Definition at line 67 of file Parameterised.cpp.

References Parameterised::myMap.

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 114 of file Named.h.

References Named::StoringVisitor::add().

bool MSLane::allowsVehicleClass ( SUMOVehicleClass  vclass) const
inline

Definition at line 507 of file MSLane.h.

References myPermissions.

Referenced by GUILaneWrapper::getColorValue().

bool MSLane::appropriate ( const MSVehicle veh)
virtual

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

Definition at line 813 of file MSLane.cpp.

References MSEdge::EDGEFUNCTION_INTERNAL, MSVehicle::getBestLanesContinuation(), MSEdge::getPurpose(), myEdge, myLinks, and succLinkSec().

GUILaneWrapper * MSLane::buildLaneWrapper ( unsigned int  index)
virtual

Reimplemented in GUILane, and GUIInternalLane.

Definition at line 926 of file MSLane.cpp.

void MSLane::clear ( )
static

Clears the dictionary

Definition at line 796 of file MSLane.cpp.

References myDict.

Referenced by MSNet::clearAll().

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 91 of file Parameterised.cpp.

References Parameterised::myMap.

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

Returns the MSLane associated to the key id if exists Otherwise returns 0.

Definition at line 785 of file MSLane.cpp.

References myDict.

static size_t MSLane::dictSize ( )
inlinestatic

Definition at line 451 of file MSLane.h.

References myDict.

bool MSLane::empty ( ) const
inline

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

Definition at line 418 of file MSLane.h.

References myVehBuffer, and myVehicles.

void MSLane::enteredByLaneChange ( MSVehicle v)
void MSLane::forceVehicleInsertion ( MSVehicle veh,
SUMOReal  pos 
)

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

Definition at line 605 of file MSLane.cpp.

References MSVehicle::getSpeed(), incorporateVehicle(), and myVehicles.

Referenced by TraCIServerAPI_Vehicle::processSet().

bool MSLane::freeInsertion ( MSVehicle veh,
SUMOReal  speed,
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 266 of file MSLane.cpp.

References MSCFModel::followSpeed(), MSVehicle::getCarFollowModel(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), getPartialOccupator(), getPartialOccupatorEnd(), MSVehicle::getPositionOnLane(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), isInsertionSuccess(), MIN2(), myVehicles, POSITION_EPS, and SUMOReal.

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

const MSVehicle * MSLane::getFirstVehicle ( ) const
virtual

Definition at line 858 of file MSLane.cpp.

References myVehicles.

Referenced by getFollowerOnConsecutive(), and getMissingRearGap().

SUMOReal 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 1288 of file MSLane.cpp.

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

Referenced by GUILaneWrapper::getColorValue(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

SUMOReal MSLane::getHBEFA_CO2Emissions ( ) const

Returns the sum of last step CO2 emissions.

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

Definition at line 1216 of file MSLane.cpp.

References getVehiclesSecure(), releaseVehicles(), and SUMOReal.

Referenced by GUILaneWrapper::getNormedHBEFA_CO2Emissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

SUMOReal MSLane::getHBEFA_COEmissions ( ) const

Returns the sum of last step CO emissions.

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

Definition at line 1228 of file MSLane.cpp.

References getVehiclesSecure(), releaseVehicles(), and SUMOReal.

Referenced by GUILaneWrapper::getNormedHBEFA_COEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

SUMOReal MSLane::getHBEFA_FuelConsumption ( ) const

Returns the sum of last step fuel consumption.

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

Definition at line 1276 of file MSLane.cpp.

References getVehiclesSecure(), releaseVehicles(), and SUMOReal.

Referenced by GUILaneWrapper::getNormedHBEFA_FuelConsumption(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

SUMOReal MSLane::getHBEFA_HCEmissions ( ) const

Returns the sum of last step HC emissions.

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

Definition at line 1264 of file MSLane.cpp.

References getVehiclesSecure(), releaseVehicles(), and SUMOReal.

Referenced by GUILaneWrapper::getNormedHBEFA_HCEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

SUMOReal MSLane::getHBEFA_NOxEmissions ( ) const

Returns the sum of last step NOx emissions.

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

Definition at line 1252 of file MSLane.cpp.

References getVehiclesSecure(), releaseVehicles(), and SUMOReal.

Referenced by GUILaneWrapper::getNormedHBEFA_NOxEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

SUMOReal MSLane::getHBEFA_PMxEmissions ( ) const

Returns the sum of last step PMx emissions.

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

Definition at line 1240 of file MSLane.cpp.

References getVehiclesSecure(), releaseVehicles(), and SUMOReal.

Referenced by GUILaneWrapper::getNormedHBEFA_PMxEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

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

Returns the id.

Returns
The stored id

Reimplemented in MS_E2_ZS_CollectorOverLanes.

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), NLDetectorBuilder::convUncontE2PosLength(), detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), NIXMLConnectionsHandler::validateLaneInfo(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSInductLoop::writeTypedXMLOutput(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

const std::vector<IncomingLaneInfo>& MSLane::getIncomingLanes ( ) const
inline
MSVehicle * MSLane::getLastVehicle ( ) const
virtual
std::pair< MSVehicle *, SUMOReal > MSLane::getLastVehicleInformation ( ) const

Returns the last vehicle which is still on the lane.

The information about the last vehicle in this lane's que is returned. If there is no such vehicle, the information about the vehicle which laps into this lane is returned. If there is no such vehicle, the first returned member is 0.

Returns
Information about the last vehicle and it's back position

Definition at line 633 of file MSLane.cpp.

References MSVehicleType::getLength(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), myInlappingVehicle, myInlappingVehicleEnd, myVehicles, and SUMOReal.

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

Returns the 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 1093 of file MSLane.cpp.

References MSCFModel::brakeGap(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), getLastVehicle(), MSVehicleType::getLength(), getLength(), MSVehicleType::getMinGap(), getPartialOccupator(), getPartialOccupatorEnd(), getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), isLinkEnd(), LINKSTATE_TL_RED, succLinkSec(), and TIME2STEPS.

Referenced by pWagGenericInsertion(), and pWagSimpleInsertion().

MSLane * MSLane::getLeftLane ( ) const

Definition at line 946 of file MSLane.cpp.

References MSEdge::leftLane(), and myEdge.

SUMOReal MSLane::getLength ( ) const
inline

Returns the lane's length.

Returns
This lane's length

Definition at line 353 of file MSLane.h.

References myLength.

Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), MSVehicle::adaptToLeader(), NLHandler::addConnection(), addIncomingLane(), NLHandler::addPOI(), MSVehicle::addStop(), GUI_E2_ZS_CollectorOverLanes::buildCollector(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NLDetectorBuilder::buildInductLoop(), MSVehicle::checkRewindLinkLanes(), NLDetectorBuilder::convUncontE2PosLength(), GUIVehicle::drawAction_drawRailCarriages(), MSVehicle::executeMove(), executeMovements(), MS_E2_ZS_CollectorOverLanes::extendTo(), freeInsertion(), MSVehicle::getBestLanes(), GUILaneWrapper::getColorValue(), MSVehicle::getDistanceToPosition(), TraCIServerAPI_Simulation::getLaneChecking(), getLeaderOnConsecutive(), GUILaneWrapper::getNormedHBEFA_CO2Emissions(), GUILaneWrapper::getNormedHBEFA_COEmissions(), GUILaneWrapper::getNormedHBEFA_FuelConsumption(), GUILaneWrapper::getNormedHBEFA_HCEmissions(), GUILaneWrapper::getNormedHBEFA_NOxEmissions(), GUILaneWrapper::getNormedHBEFA_PMxEmissions(), GUILaneWrapper::getParameterWindow(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), MSVehicle::getSpaceTillLastStanding(), MSActuatedTrafficLightLogic::init(), MS_E2_ZS_CollectorOverLanes::init(), insertVehicle(), isInsertionSuccess(), maxSpeedGapInsertion(), MSLink::maybeOccupied(), NLTriggerBuilder::parseAndBuildBusStop(), MSVehicle::planMove(), TraCIServerAPI_Lane::processGet(), pWagGenericInsertion(), pWagSimpleInsertion(), MSVehicle::setBlinkerInformation(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_DK2004::wantsChangeToLeft(), MSLCM_DK2004::wantsChangeToRight(), MSMeanData::writeEdge(), and MSQueueExport::writeLane().

const std::map<std::string, std::string>& Parameterised::getMap ( ) const
inlineinherited

Returns the inner key/value map.

Returns
the inner map

Definition at line 106 of file Parameterised.h.

References Parameterised::myMap.

Referenced by PCPolyContainer::save().

SUMOReal 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 1200 of file MSLane.cpp.

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

Referenced by TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

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

Return the list of this lane's move reminders.

Returns
Previously added move reminder

Definition at line 145 of file MSLane.h.

References myMoveReminders.

Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), MSVehicle::enterLaneAtInsertion(), and MSVehicle::enterLaneAtLaneChange().

size_t MSLane::getNumericalID ( ) const
inline

Returns this lane's numerical id.

Returns
This lane's numerical id

Definition at line 309 of file MSLane.h.

References myNumericalID.

SUMOReal MSLane::getOccupancy ( ) const

Returns the occupancy of this lane during the last step.

Returns
The occupancy during the last step

Definition at line 1188 of file MSLane.cpp.

References myLength, and myVehicleLengthSum.

Referenced by GUILaneWrapper::getColorValue(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().

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 81 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by TraCIServerAPI_Vehicle::vtdMap_matchingNearest().

MSVehicle* MSLane::getPartialOccupator ( ) const
inline
SUMOReal MSLane::getPartialOccupatorEnd ( ) const
inline

Returns the position of the in-lapping vehicle's end.

Returns
Information about how far the vehicle laps into this lane

Definition at line 255 of file MSLane.h.

References myInlappingVehicleEnd.

Referenced by MSVehicle::checkRewindLinkLanes(), MSE2Collector::detectorUpdate(), freeInsertion(), getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), MSLaneChanger::getRealThisLeader(), isInsertionSuccess(), maxSpeedGapInsertion(), MSLink::maybeOccupied(), and MSVehicle::planMove().

SVCPermissions MSLane::getPermissions ( ) const
inline

Returns the vehicle class permissions for this lane.

Returns
This lane's allowed vehicle classes

Definition at line 361 of file MSLane.h.

References myPermissions.

Referenced by GUILaneWrapper::getParameterWindow(), and TraCIServerAPI_Lane::processGet().

MSLane * MSLane::getRightLane ( ) const

Definition at line 952 of file MSLane.cpp.

References myEdge, and MSEdge::rightLane().

SUMOReal MSLane::getVehicleMaxSpeed ( const SUMOVehicle *const  veh) const
inline
unsigned int MSLane::getVehicleNumber ( ) const
inline

Returns the number of vehicles on this lane.

Returns
The number of vehicles on this lane

Definition at line 279 of file MSLane.h.

References myVehicles.

Referenced by MSVehicle::checkRewindLinkLanes(), MSEdge::getFreeLane(), TraCIServerAPI_Lane::processGet(), MSQueueExport::writeLane(), MSFullExport::writeLane(), and MSXMLRawOut::writeLane().

virtual const std::deque< MSVehicle* >& MSLane::getVehiclesSecure ( ) const
inlinevirtual

Returns the vehicles container; locks it for microsimulation.

Please note that it is necessary to release the vehicles container afterwards using "releaseVehicles".

Returns
The vehicles on this lane

Reimplemented in GUILane, and GUIInternalLane.

Definition at line 290 of file MSLane.h.

References myVehicles.

Referenced by traci::TraCIServer::collectObjectsInRange(), GUILaneWrapper::drawGL(), getHarmonoise_NoiseEmissions(), getHBEFA_CO2Emissions(), getHBEFA_COEmissions(), getHBEFA_FuelConsumption(), getHBEFA_HCEmissions(), getHBEFA_NOxEmissions(), getHBEFA_PMxEmissions(), getMeanSpeed(), MSVehicle::getSpaceTillLastStanding(), and TraCIServerAPI_Lane::processGet().

SUMOReal MSLane::getVehLenSum ( ) const

Returns the sum of lengths of vehicles which were on the lane during the last step.

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

Definition at line 1194 of file MSLane.cpp.

References myVehicleLengthSum.

Referenced by MSVehicle::checkRewindLinkLanes().

SUMOReal MSLane::getWidth ( ) const
inline

Returns the lane's width.

Returns
This lane's width

Definition at line 369 of file MSLane.h.

References myWidth.

Referenced by GUILaneWrapper::drawLinkNo(), GUILaneWrapper::drawLinkRules(), GUILaneWrapper::drawTLSLinkNo(), GUILaneWrapper::GUILaneWrapper(), and TraCIServerAPI_Lane::processGet().

void MSLane::incorporateVehicle ( MSVehicle veh,
SUMOReal  pos,
SUMOReal  speed,
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]at
[in]notificationThe cause of insertion (i.e. departure, teleport, parking) defaults to departure

Reimplemented in GUILane, and GUIInternalLane.

Definition at line 121 of file MSLane.cpp.

References MSVehicle::enterLaneAtInsertion(), MSNet::getEdgeControl(), MSNet::getInstance(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSEdgeControl::gotActive(), myLength, myVehicleLengthSum, and myVehicles.

Referenced by forceVehicleInsertion(), isInsertionSuccess(), maxSpeedGapInsertion(), pWagGenericInsertion(), and pWagSimpleInsertion().

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

Definition at line 805 of file MSLane.cpp.

References myDict.

Referenced by TraCIServerAPI_Lane::processGet().

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 333 of file MSLane.cpp.

References DEPART_POS_BASE, DEPART_POS_DEFAULT, DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_MAX_SPEED_GAP, DEPART_POS_PWAG_GENERIC, DEPART_POS_PWAG_SIMPLE, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, DEPART_SPEED_DEFAULT, DEPART_SPEED_GIVEN, DEPART_SPEED_MAX, DEPART_SPEED_RANDOM, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, SUMOVehicleParameter::departSpeed, SUMOVehicleParameter::departSpeedProcedure, freeInsertion(), MSVehicleType::getLength(), getLength(), MSBaseVehicle::getMaxSpeed(), MSBaseVehicle::getParameter(), getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), isInsertionSuccess(), maxSpeedGapInsertion(), MIN2(), myLength, POSITION_EPS, pWagGenericInsertion(), pWagSimpleInsertion(), RandHelper::rand(), and SUMOReal.

Referenced by MSEdge::insertVehicle().

bool MSLane::integrateNewVehicle ( SUMOTime  t)
virtual

Insert buffered vehicle into the real lane.

Reimplemented in GUILane, and GUIInternalLane.

Definition at line 823 of file MSLane.cpp.

References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), myVehBuffer, myVehicleLengthSum, and myVehicles.

SUMOReal MSLane::interpolateGeometryPosToLanePos ( SUMOReal  geometryPos) const
inline
SUMOReal MSLane::interpolateLanePosToGeometryPos ( SUMOReal  lanePos) const
inline
bool MSLane::isApproachedFrom ( MSEdge *const  edge)

Definition at line 978 of file MSLane.cpp.

References myApproachingLanes.

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

Definition at line 984 of file MSLane.cpp.

References myApproachingLanes.

bool MSLane::isInsertionSuccess ( MSVehicle vehicle,
SUMOReal  speed,
SUMOReal  pos,
bool  recheckNextLanes,
MSMoveReminder::Notification  notification = MSMoveReminder::NOTIFICATION_DEPARTED 
)
virtual

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, incorporateVehicleis 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]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 403 of file MSLane.cpp.

References ARRIVAL_SPEED_GIVEN, SUMOVehicleParameter::arrivalSpeed, SUMOVehicleParameter::arrivalSpeedProcedure, MSRoute::begin(), MSCFModel::brakeGap(), MSInsertionControl::descheduleDeparture(), MSCFModel::followSpeed(), MSCFModel::freeSpeed(), MSVehicle::gap(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), getEdge(), MSBaseVehicle::getID(), MSNet::getInsertionControl(), MSNet::getInstance(), MSRoute::getLastEdge(), getLastVehicle(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), getMissingRearGap(), MSBaseVehicle::getParameter(), getPartialOccupator(), getPartialOccupatorEnd(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getRoute(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), incorporateVehicle(), isLinkEnd(), MIN2(), myLength, myMaxSpeed, myVehicles, MSMoveReminder::NOTIFICATION_TELEPORT, succLinkSec(), SUMOReal, TIME2STEPS, toString(), WRITE_ERROR, and WRITE_WARNING.

Referenced by MSVehicleTransfer::checkInsertions(), traci::TraCIServer::commandAddVehicle(), freeInsertion(), insertVehicle(), and maxSpeedGapInsertion().

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 837 of file MSLane.cpp.

References myLinks.

Referenced by getLeaderOnConsecutive(), MSLaneChanger::getRealThisLeader(), and isInsertionSuccess().

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 843 of file MSLane.cpp.

References myLinks.

bool Parameterised::knowsParameter ( const std::string &  key) const
inherited

Returns whether the parameter is known.

Parameters
[in]keyThe key to ask for
Returns
Whether the key is known

Definition at line 75 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by TraCIServerAPI_Vehicle::vtdMap_matchingNearest().

void MSLane::leftByLaneChange ( MSVehicle v)
MSLane& MSLane::operator= ( const MSLane )
private

invalidated assignment operator

bool MSLane::planMovements ( 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 MSInternalLane, GUILane, and GUIInternalLane.

Definition at line 650 of file MSLane.cpp.

References myLeftVehLength, myLength, myVehicleLengthSum, and myVehicles.

void MSLane::resetPartialOccupation ( MSVehicle v)

Removes the information about a vehicle lapping into this lane.

Parameters
[in]vThe vehicle which laps into this lane

Definition at line 624 of file MSLane.cpp.

References myInlappingVehicle, and myInlappingVehicleEnd.

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

void MSLane::setLength ( SUMOReal  val)
inline

Definition at line 427 of file MSLane.h.

References myLength.

Referenced by TraCIServerAPI_Lane::processSet().

void MSLane::setMaxSpeed ( SUMOReal  val)
inline

Definition at line 423 of file MSLane.h.

References myMaxSpeed.

Referenced by TraCIServerAPI_Lane::processSet().

SUMOReal MSLane::setPartialOccupation ( MSVehicle v,
SUMOReal  leftVehicleLength 
)

Sets the information about a vehicle lapping into this lane.

The given left length of vehicle which laps into this lane is used to determine the vehicle's end position in regard to this lane's length. This information is set into myInlappingVehicleState; additionally, the vehicle pointer is stored in myInlappingVehicle; Returns this lane's length for subtracting it from the left vehicle length.

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

Definition at line 612 of file MSLane.cpp.

References myInlappingVehicle, myInlappingVehicleEnd, and myLength.

void MSLane::setPermissions ( SVCPermissions  permissions)
inline

Definition at line 502 of file MSLane.h.

References myPermissions.

Referenced by TraCIServerAPI_Lane::processSet().

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

Same as succLink, but does not throw any assertions when the succeeding link could not be found; Returns the myLinks.end() instead; Further, the number of edges to look forward may be given

Definition at line 867 of file MSLane.cpp.

References MSEdge::EDGEFUNCTION_INTERNAL, getEdge(), MSEdge::getPurpose(), MSVehicleType::getVehicleClass(), SUMOVehicle::getVehicleType(), myLinks, and SUMOVehicle::succEdge().

Referenced by appropriate(), getLeaderOnConsecutive(), MSLaneChanger::getRealThisLeader(), isInsertionSuccess(), MSVehicle::planMove(), and MSVehicle::setBlinkerInformation().

void MSLane::swapAfterLaneChange ( SUMOTime  t)
protectedvirtual

moves myTmpVehicles int myVehicles after a lane change procedure

Reimplemented in GUILane, and GUIInternalLane.

Definition at line 917 of file MSLane.cpp.

References myTmpVehicles, and myVehicles.

Friends And Related Function Documentation

friend class GUILaneWrapper
friend

Definition at line 78 of file MSLane.h.

Referenced by GUIInternalLane::buildLaneWrapper(), and GUILane::buildLaneWrapper().

friend class MSLaneChanger
friend

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

Definition at line 76 of file MSLane.h.

friend class MSQueueExport
friend

Definition at line 82 of file MSLane.h.

friend class MSXMLRawOut
friend

Definition at line 80 of file MSLane.h.

Field Documentation

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

Definition at line 709 of file MSLane.h.

Referenced by addApproachingLane(), and isApproachedFrom().

MSLane::DictType MSLane::myDict
staticprotected

Static dictionary to associate string-ids with objects.

Definition at line 718 of file MSLane.h.

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

MSEdge* MSLane::myEdge
protected

The lane's edge, for routing only.

Definition at line 672 of file MSLane.h.

Referenced by appropriate(), getEdge(), getLeftLane(), getLogicalPredecessorLane(), getRightLane(), and MSLane::by_connections_to_sorter::operator()().

std::vector<IncomingLaneInfo> MSLane::myIncomingLanes
protected
MSVehicle* MSLane::myInlappingVehicle
protected

The vehicle which laps into this lane.

Definition at line 699 of file MSLane.h.

Referenced by getLastVehicleInformation(), getPartialOccupator(), resetPartialOccupation(), and setPartialOccupation().

SUMOReal MSLane::myInlappingVehicleEnd
protected

End position of a vehicle which laps into this lane.

Definition at line 696 of file MSLane.h.

Referenced by getLastVehicleInformation(), getPartialOccupatorEnd(), resetPartialOccupation(), and setPartialOccupation().

SUMOReal MSLane::myLeftVehLength
protected

Not yet seen vehicle lengths.

Definition at line 703 of file MSLane.h.

Referenced by planMovements().

const SUMOReal MSLane::myLengthGeometryFactor
protected

Definition at line 712 of file MSLane.h.

Referenced by interpolateGeometryPosToLanePos(), and interpolateLanePosToGeometryPos().

MSLinkCont MSLane::myLinks
protected

The lane's Links to it's succeeding lanes and the default right-of-way rule, i.e. blocked or not blocked.

Definition at line 707 of file MSLane.h.

Referenced by addLink(), appropriate(), getLinkCont(), isLinkEnd(), succLinkSec(), and ~MSLane().

MSLane* MSLane::myLogicalPredecessorLane
mutableprotected

Definition at line 689 of file MSLane.h.

Referenced by getLogicalPredecessorLane().

SUMOReal MSLane::myMaxSpeed
protected

Lane-wide speedlimit [m/s].

Definition at line 675 of file MSLane.h.

Referenced by getMeanSpeed(), getSpeedLimit(), getVehicleMaxSpeed(), isInsertionSuccess(), and setMaxSpeed().

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

This lane's move reminder.

Definition at line 722 of file MSLane.h.

Referenced by addMoveReminder(), and getMoveReminders().

size_t MSLane::myNumericalID
protected

Unique numerical ID (set on reading by netload)

Definition at line 654 of file MSLane.h.

Referenced by getNumericalID().

SVCPermissions MSLane::myPermissions
protected

The vClass permissions for this lane.

Definition at line 686 of file MSLane.h.

Referenced by allowsVehicleClass(), getPermissions(), and setPermissions().

PositionVector MSLane::myShape

The shape of the lane.

Definition at line 491 of file MSLane.h.

Referenced by GUIInternalLane::buildLaneWrapper(), GUILane::buildLaneWrapper(), and getShape().

VehCont MSLane::myTmpVehicles
protected

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

Definition at line 679 of file MSLane.h.

Referenced by swapAfterLaneChange().

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

buffer for vehicles that moved from their previous lane onto this one

Definition at line 683 of file MSLane.h.

Referenced by empty(), executeMovements(), integrateNewVehicle(), MSQueueExport::writeLane(), and MSXMLRawOut::writeLane().

SUMOReal MSLane::myVehicleLengthSum
protected
VehCont MSLane::myVehicles
protected

The lane's vehicles. 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 663 of file MSLane.h.

Referenced by addMoveReminder(), detectCollisions(), empty(), executeMovements(), GUILaneWrapper::firstWaitingTime(), forceVehicleInsertion(), freeInsertion(), getFirstVehicle(), getLastVehicle(), getLastVehicleInformation(), getMeanSpeed(), getVehicleNumber(), GUIInternalLane::getVehiclesSecure(), GUILane::getVehiclesSecure(), getVehiclesSecure(), incorporateVehicle(), integrateNewVehicle(), isInsertionSuccess(), maxSpeedGapInsertion(), MSInternalLane::planMovements(), planMovements(), pWagGenericInsertion(), pWagSimpleInsertion(), removeVehicle(), swapAfterLaneChange(), MSQueueExport::writeLane(), and MSXMLRawOut::writeLane().

SUMOReal MSLane::myWidth
protected

Lane width [m].

Definition at line 669 of file MSLane.h.

Referenced by getWidth().


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