SUMO - Simulation of Urban MObility
|
Representation of a lane over a junction. More...
#include <MSInternalLane.h>
Public Types | |
typedef std::deque< MSVehicle * > | VehCont |
Container for vehicles. | |
Public Member Functions | |
void | addApproachingLane (MSLane *lane) |
void | addIncomingLane (MSLane *lane, MSLink *viaLink) |
bool | allowsVehicleClass (SUMOVehicleClass vclass) const |
virtual bool | appropriate (const MSVehicle *veh) |
virtual GUILaneWrapper * | buildLaneWrapper (unsigned int index) |
virtual void | detectCollisions (SUMOTime timestep) |
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) |
MSEdge & | getEdge () const |
Returns the lane's edge. | |
virtual const MSVehicle * | getFirstVehicle () 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 MSVehicle * | getLastVehicle () 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. | |
MSLane * | getLeftLane () const |
const MSLinkCont & | getLinkCont () const |
returns the container with all links !!! | |
MSLane * | getLogicalPredecessorLane () const |
MSLane * | getRightLane () 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) |
void | leftByLaneChange (MSVehicle *v) |
MSInternalLane (const std::string &id, SUMOReal maxSpeed, SUMOReal length, MSEdge *const edge, unsigned int numericalID, const PositionVector &shape, SUMOReal width, SVCPermissions permissions) | |
Constructor. | |
virtual MSVehicle * | removeVehicle (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 | ~MSInternalLane () |
Destructor. | |
Additional initialisation | |
void | setParentJunctionInformation (MSLogicJunction::InnerState *const foescont, unsigned int foesIdx) |
Sets the information where to report vehicles being on this lane to. | |
void | setPassPosition (SUMOReal passPos) |
Sets the position that must be free so that vehicles can pass. | |
Vehicle movement (longitudinal) | |
virtual bool | moveCritical (SUMOTime t) |
Additional initialisation | |
void | initialize (MSLinkCont *succs) |
Delayed initialization (deprecated) | |
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. | |
MSVehicle * | getPartialOccupator () 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 *, SUMOReal > | getLastVehicleInformation () 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 PositionVector & | getShape () const |
Returns this lane's shape. | |
SUMOReal | getMaxSpeed () const |
Returns the lane's maximum speed. | |
SUMOReal | getLength () const |
Returns the lane's length. | |
SVCPermissions | getPermissions () |
Returns the vehicle class permissions for this lane. | |
SUMOReal | getWidth () const |
Returns the lane's width. | |
Vehicle movement (longitudinal) | |
virtual bool | setCritical (SUMOTime t, std::vector< MSLane * > &into) |
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 MSLane * | dictionary (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 |
MSEdge * | myEdge |
The lane's edge, for routing only. | |
std::string | myID |
The name of the object. | |
std::vector< IncomingLaneInfo > | myIncomingLanes |
MSVehicle * | myInlappingVehicle |
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]. | |
MSLinkCont | myLinks |
MSLane * | myLogicalPredecessorLane |
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 | |
MSInternalLane (const MSInternalLane &s) | |
invalidated copy constructor | |
MSInternalLane & | operator= (const MSInternalLane &s) |
invalidated assignment operator | |
Private Attributes | |
MSLogicJunction::InnerState * | myFoesCont |
The container of junction-internal vehicle-occupied lanes. | |
int | myFoesIndex |
The index on which to write into this container. | |
SUMOReal | myPassPosition |
The position that must be free so that vehicles can pass. | |
Friends | |
class | GUILaneWrapper |
class | MSLaneChanger |
needs access to myTmpVehicles (this maybe should be done via SUMOReal-buffering!!!) | |
class | MSXMLRawOut |
Representation of a lane over a junction.
Junction-internal conflicts are managed by this class by setting the information about a vehicle being on an internal lane to the junction logic ("myFoesCont", the lane's index is stored in "myFoesIndex"). This logic than decides whether further vehicles may approach the junction.
The simulation shall be able to use these lanes only when needed and work as previously thought without considering any junction-internal things.
Definition at line 78 of file MSInternalLane.h.
typedef std::map< std::string, MSLane* > MSLane::DictType [protected, inherited] |
typedef std::deque< MSVehicle* > MSLane::VehCont [inherited] |
MSInternalLane::MSInternalLane | ( | const std::string & | id, |
SUMOReal | maxSpeed, | ||
SUMOReal | length, | ||
MSEdge *const | edge, | ||
unsigned int | numericalID, | ||
const PositionVector & | shape, | ||
SUMOReal | width, | ||
SVCPermissions | permissions | ||
) |
Constructor.
[in] | id | The lane's id |
[in] | maxSpeed | The speed allowed on this lane |
[in] | length | The lane's length |
[in] | edge | The edge this lane belongs to |
[in] | numericalID | The numerical id of the lane |
[in] | shape | The shape of the lane |
[in] | width | The width of the lane |
[in] | permissions | Vehicle classes that may drive on this lane |
Definition at line 60 of file MSInternalLane.cpp.
MSInternalLane::~MSInternalLane | ( | ) | [virtual] |
Destructor.
Definition at line 69 of file MSInternalLane.cpp.
MSInternalLane::MSInternalLane | ( | const MSInternalLane & | s | ) | [private] |
invalidated copy constructor
void MSLane::addApproachingLane | ( | MSLane * | lane | ) | [inherited] |
Definition at line 999 of file MSLane.cpp.
References MSLane::getEdge(), and MSLane::myApproachingLanes.
Referenced by NLHandler::addConnection(), and NLSucceedingLaneBuilder::addSuccLane().
void MSLane::addIncomingLane | ( | MSLane * | lane, |
MSLink * | viaLink | ||
) | [inherited] |
Definition at line 989 of file MSLane.cpp.
References MSLane::getLength(), MSLane::IncomingLaneInfo::lane, MSLane::IncomingLaneInfo::length, MSLane::myIncomingLanes, and MSLane::IncomingLaneInfo::viaLink.
Referenced by NLHandler::addConnection(), and NLSucceedingLaneBuilder::addSuccLane().
void MSLane::addLink | ( | MSLink * | link | ) | [inherited] |
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.
[in] | link | An outgoing link |
Definition at line 109 of file MSLane.cpp.
References MSLane::myLinks.
Referenced by NLHandler::addConnection().
void MSLane::addMoveReminder | ( | MSMoveReminder * | rem | ) | [virtual, inherited] |
Add a move-reminder to move-reminder container.
The move reminder will not be deleted by the lane.
[in] | rem | The move reminder to add |
Definition at line 116 of file MSLane.cpp.
References MSLane::myMoveReminders, and MSLane::myVehicles.
Referenced by MSMoveReminder::MSMoveReminder().
bool MSLane::allowsVehicleClass | ( | SUMOVehicleClass | vclass | ) | const [inline, inherited] |
Definition at line 478 of file MSLane.h.
References MSLane::myPermissions.
bool MSLane::appropriate | ( | const MSVehicle * | veh | ) | [virtual, inherited] |
Returns the information whether this lane may be used to continue the current route
Definition at line 822 of file MSLane.cpp.
References MSEdge::EDGEFUNCTION_INTERNAL, MSVehicle::getBestLanesContinuation(), MSEdge::getPurpose(), MSLane::myEdge, MSLane::myLinks, and MSLane::succLinkSec().
Referenced by MSVehicle::moveRegardingCritical().
GUILaneWrapper * MSLane::buildLaneWrapper | ( | unsigned int | index | ) | [virtual, inherited] |
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 957 of file MSLane.cpp.
void MSLane::clear | ( | ) | [static, inherited] |
Clears the dictionary
Definition at line 805 of file MSLane.cpp.
References MSLane::myDict.
Referenced by MSNet::clearAll().
void MSLane::detectCollisions | ( | SUMOTime | timestep | ) | [virtual, inherited] |
Check if vehicles are too close.
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 681 of file MSLane.cpp.
References MSVehicleTransfer::addVeh(), Named::getID(), MSBaseVehicle::getID(), MSVehicleTransfer::getInstance(), MSNet::getInstance(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSLane::myVehicleLengthSum, MSLane::myVehicles, SUMOReal, time2string(), and WRITE_WARNING.
bool MSLane::dictionary | ( | std::string | id, |
MSLane * | lane | ||
) | [static, inherited] |
Inserts a MSLane into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise returns false.
Definition at line 782 of file MSLane.cpp.
References MSLane::myDict.
Referenced by NLHandler::addConnection(), NLHandler::addLane(), NLHandler::addPOI(), MSRouteHandler::addStop(), MSVehicle::addStop(), NLSucceedingLaneBuilder::addSuccLane(), NLSucceedingLaneBuilder::closeSuccLane(), traci::TraCIServer::commandAddVehicle(), MSDevice_Tripinfo::generateOutput(), NLTriggerBuilder::getLane(), NLDetectorBuilder::getLaneChecking(), NLTriggerBuilder::parseAndBuildLaneSpeedTrigger(), NLHandler::parseLanes(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Lane::processSet(), and TraCIServerAPI_Vehicle::processSet().
MSLane * MSLane::dictionary | ( | std::string | id | ) | [static, inherited] |
Returns the MSLane associated to the key id if exists Otherwise returns 0.
Definition at line 794 of file MSLane.cpp.
References MSLane::myDict.
static size_t MSLane::dictSize | ( | ) | [inline, static, inherited] |
Definition at line 422 of file MSLane.h.
References MSLane::myDict.
bool MSLane::empty | ( | ) | const [inline, inherited] |
Returns true if there is not a single vehicle on the lane.
Definition at line 389 of file MSLane.h.
References MSLane::myVehBuffer, and MSLane::myVehicles.
void MSLane::enteredByLaneChange | ( | MSVehicle * | v | ) | [inherited] |
Definition at line 1180 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), and MSLane::myVehicleLengthSum.
void MSLane::forceVehicleInsertion | ( | MSVehicle * | veh, |
SUMOReal | pos | ||
) | [inherited] |
Inserts the given vehicle at the given position.
No checks are done, vehicle insertion using this method may generate collisions (possibly delayed).
[in] | veh | The vehicle to insert |
[in] | pos | The position at which the vehicle shall be inserted |
Definition at line 603 of file MSLane.cpp.
References MSVehicle::getSpeed(), MSLane::incorporateVehicle(), and MSLane::myVehicles.
Referenced by TraCIServerAPI_Vehicle::processSet().
bool MSLane::freeInsertion | ( | MSVehicle & | veh, |
SUMOReal | speed, | ||
MSMoveReminder::Notification | notification = MSMoveReminder::NOTIFICATION_DEPARTED |
||
) | [inherited] |
Tries to insert the given vehicle on any place.
[in] | veh | The vehicle to insert |
[in] | speed | The maximum insertion speed |
[in] | notification | The cause of insertion (i.e. departure, teleport, parking) defaults to departure |
Definition at line 271 of file MSLane.cpp.
References MSCFModel::followSpeed(), MSVehicle::getCarFollowModel(), MSVehicleType::getLength(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), MSLane::getPartialOccupator(), MSLane::getPartialOccupatorEnd(), MSVehicle::getPositionOnLane(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::isInsertionSuccess(), MIN2(), MSLane::myVehicles, POSITION_EPS, and SUMOReal.
Referenced by MSVehicleTransfer::checkInsertions(), and MSLane::insertVehicle().
MSEdge& MSLane::getEdge | ( | ) | const [inline, inherited] |
Returns the lane's edge.
Definition at line 406 of file MSLane.h.
References MSLane::myEdge.
Referenced by MSLane::addApproachingLane(), MSVehicle::addStop(), NLDetectorBuilder::buildInductLoop(), MSVehicle::checkRewindLinkLanes(), MSEdge::closeBuilding(), traci::TraCIServer::commandAddVehicle(), GUILaneWrapper::drawGL(), MSVehicle::enterLaneAtMove(), MS_E2_ZS_CollectorOverLanes::extendTo(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), GUILaneWrapper::getColorValue(), MSVehicle::getDistanceToPosition(), GUILaneWrapper::getEdgeLaneNumber(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSLane::getLogicalPredecessorLane(), MSVehicle::moveChecked(), MSVehicle::moveRegardingCritical(), GUI_E2_ZS_CollectorOverLanes::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), MSLane::edge_finder::operator()(), MSLCM_DK2004::patchSpeed(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_Lane::processSet(), TraCIServerAPI_Vehicle::processSet(), MSLane::setCritical(), and MSVehicle::vsafeCriticalCont().
const MSVehicle * MSLane::getFirstVehicle | ( | ) | const [virtual, inherited] |
Definition at line 867 of file MSLane.cpp.
References MSLane::myVehicles.
Referenced by MSLane::getFollowerOnConsecutive(), and MSVehicle::vsafeCriticalCont().
std::pair< MSVehicle *const, SUMOReal > MSLane::getFollowerOnConsecutive | ( | SUMOReal | dist, |
SUMOReal | seen, | ||
SUMOReal | leaderSpeed, | ||
SUMOReal | backOffset, | ||
SUMOReal | predMaxDecel | ||
) | const [inherited] |
Definition at line 1033 of file MSLane.cpp.
References MSVehicle::getCarFollowModel(), MSLane::getFirstVehicle(), MSLane::getIncomingLanes(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::IncomingLaneInfo::lane, MSLane::IncomingLaneInfo::length, MSCFModel::maxNextSpeed(), MSLane::myIncomingLanes, SUMOReal, and MSLane::IncomingLaneInfo::viaLink.
Referenced by MSLane::isInsertionSuccess().
SUMOReal MSLane::getHarmonoise_NoiseEmissions | ( | ) | const [inherited] |
Returns the sum of last step noise emissions.
Definition at line 1287 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), HelpersHarmonoise::sum(), and SUMOReal.
Referenced by GUILaneWrapper::getColorValue(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getHBEFA_CO2Emissions | ( | ) | const [inherited] |
Returns the sum of last step CO2 emissions.
Definition at line 1215 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), and SUMOReal.
Referenced by GUILaneWrapper::getNormedHBEFA_CO2Emissions(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getHBEFA_COEmissions | ( | ) | const [inherited] |
Returns the sum of last step CO emissions.
Definition at line 1227 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), and SUMOReal.
Referenced by GUILaneWrapper::getNormedHBEFA_COEmissions(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getHBEFA_FuelConsumption | ( | ) | const [inherited] |
Returns the sum of last step fuel consumption.
Definition at line 1275 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), and SUMOReal.
Referenced by GUILaneWrapper::getNormedHBEFA_FuelConsumption(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getHBEFA_HCEmissions | ( | ) | const [inherited] |
Returns the sum of last step HC emissions.
Definition at line 1263 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), and SUMOReal.
Referenced by GUILaneWrapper::getNormedHBEFA_HCEmissions(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getHBEFA_NOxEmissions | ( | ) | const [inherited] |
Returns the sum of last step NOx emissions.
Definition at line 1251 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), and SUMOReal.
Referenced by GUILaneWrapper::getNormedHBEFA_NOxEmissions(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getHBEFA_PMxEmissions | ( | ) | const [inherited] |
Returns the sum of last step PMx emissions.
Definition at line 1239 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::releaseVehicles(), and SUMOReal.
Referenced by GUILaneWrapper::getNormedHBEFA_PMxEmissions(), and TraCIServerAPI_Lane::processGet().
const std::string& Named::getID | ( | ) | const [inline, inherited] |
Returns the id.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 61 of file Named.h.
References Named::myID.
Referenced by MSDetectorControl::add(), ShapeContainer::add(), RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), 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(), MSLane::moveCritical(), MSVehicle::MSVehicle(), RORDLoader_SUMOBase::myCharacters(), 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(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::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()(), 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(), RORouteDef_Complete::preComputeCurrentRoute(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), NWWriter_SUMO::prohibitionConnection(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), NBEdge::startShapeAt(), NIXMLConnectionsHandler::validateLaneInfo(), MSInstantInductLoop::write(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), MSInductLoop::writeTypedXMLOutput(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
const std::vector<IncomingLaneInfo>& MSLane::getIncomingLanes | ( | ) | const [inline, inherited] |
Definition at line 491 of file MSLane.h.
References MSLane::myIncomingLanes.
Referenced by MSVehicle::enterLaneAtLaneChange(), and MSLane::getFollowerOnConsecutive().
MSVehicle * MSLane::getLastVehicle | ( | ) | const [virtual, inherited] |
returns the last vehicle
Definition at line 858 of file MSLane.cpp.
References MSLane::myVehicles.
Referenced by MSVehicle::checkRewindLinkLanes(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealThisLeader(), and MSLane::isInsertionSuccess().
std::pair< MSVehicle *, SUMOReal > MSLane::getLastVehicleInformation | ( | ) | const [inherited] |
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.
Definition at line 631 of file MSLane.cpp.
References MSVehicleType::getLength(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), MSLane::myInlappingVehicle, MSLane::myInlappingVehicleEnd, MSLane::myVehicles, and SUMOReal.
Referenced by MSVehicle::vsafeCriticalCont().
std::pair< MSVehicle *const, SUMOReal > MSLane::getLeaderOnConsecutive | ( | SUMOReal | dist, |
SUMOReal | seen, | ||
SUMOReal | speed, | ||
const MSVehicle & | veh, | ||
const std::vector< MSLane * > & | bestLaneConts | ||
) | const [inherited] |
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.
[in] | dist | The distance to investigate |
[in] | seen | The already seen place (normally the place in front on own lane) |
[in] | speed | The speed of the vehicle used for determining whether a subsequent link will be opened at arrival time |
[in] | veh | The vehicle for which the information shall be computed |
[in] | bestLaneConts | The lanes the vehicle will use in future |
Definition at line 1083 of file MSLane.cpp.
References MSCFModel::brakeGap(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSLane::getLastVehicle(), MSVehicleType::getLength(), MSLane::getLength(), MSLane::getMaxSpeed(), MSLane::getPartialOccupator(), MSLane::getPartialOccupatorEnd(), MSBaseVehicle::getVehicleType(), MSLane::isLinkEnd(), LINKSTATE_TL_RED, MSLane::succLinkSec(), and TIME2STEPS.
Referenced by MSCFModel_PWag2009::moveHelper(), MSLane::pWagGenericInsertion(), and MSLane::pWagSimpleInsertion().
MSLane * MSLane::getLeftLane | ( | ) | const [inherited] |
Definition at line 977 of file MSLane.cpp.
References MSEdge::leftLane(), and MSLane::myEdge.
SUMOReal MSLane::getLength | ( | ) | const [inline, inherited] |
Returns the lane's length.
Definition at line 337 of file MSLane.h.
References MSLane::myLength.
Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), NLHandler::addConnection(), MSLane::addIncomingLane(), NLHandler::addPOI(), MSVehicle::addStop(), NLSucceedingLaneBuilder::addSuccLane(), GUI_E2_ZS_CollectorOverLanes::buildCollector(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NLDetectorBuilder::buildInductLoop(), MSVehicle::checkRewindLinkLanes(), MS_E2_ZS_CollectorOverLanes::extendTo(), MSLane::freeInsertion(), MSVehicle::getBestLanes(), MSVehicle::getDistanceToPosition(), TraCIDijkstraRouter< E >::getEffort(), TraCIServerAPI_Simulation::getLaneChecking(), MSLane::getLeaderOnConsecutive(), getMaxSpeedRegardingNextLanes(), GUILaneWrapper::getNormedHBEFA_CO2Emissions(), GUILaneWrapper::getNormedHBEFA_COEmissions(), GUILaneWrapper::getNormedHBEFA_FuelConsumption(), GUILaneWrapper::getNormedHBEFA_HCEmissions(), GUILaneWrapper::getNormedHBEFA_NOxEmissions(), GUILaneWrapper::getNormedHBEFA_PMxEmissions(), GUILaneWrapper::getParameterWindow(), NLTriggerBuilder::getPosition(), MSVehicle::getSpaceTillLastStanding(), MSNet::EdgeWeightsProxi::getTravelTime(), MSActuatedTrafficLightLogic::init(), MS_E2_ZS_CollectorOverLanes::init(), MSLane::insertVehicle(), MSLane::isInsertionSuccess(), MSLane::maxSpeedGapInsertion(), MSVehicle::moveChecked(), MSVehicle::moveRegardingCritical(), NLTriggerBuilder::parseAndBuildBusStop(), TraCIServerAPI_Lane::processGet(), MSLane::pWagGenericInsertion(), MSLane::pWagSimpleInsertion(), MSVehicle::setBlinkerInformation(), MSLane::setCritical(), MSVehicle::vsafeCriticalCont(), MSLCM_DK2004::wantsChangeToLeft(), MSLCM_DK2004::wantsChangeToRight(), and MSMeanData::writeEdge().
const MSLinkCont & MSLane::getLinkCont | ( | ) | const [inherited] |
returns the container with all links !!!
Definition at line 942 of file MSLane.cpp.
References MSLane::myLinks.
Referenced by MSLinkContHelper::getConnectingLink(), GUILaneWrapper::getLinkNumber(), MSRightOfWayJunction::postloadInit(), TraCIServerAPI_Lane::processGet(), GUILaneWrapper::ROWdrawAction_drawArrows(), GUILaneWrapper::ROWdrawAction_drawLane2LaneConnections(), GUILaneWrapper::ROWdrawAction_drawLinkRules(), and MSVehicle::setBlinkerInformation().
MSLane * MSLane::getLogicalPredecessorLane | ( | ) | const [inherited] |
Definition at line 1146 of file MSLane.cpp.
References MSLane::getEdge(), MSEdge::getIncomingEdges(), MSLane::myEdge, MSLane::myIncomingLanes, and MSLane::myLogicalPredecessorLane.
Referenced by MSVehicle::enterLaneAtInsertion().
SUMOReal MSLane::getMaxSpeed | ( | ) | const [inline, inherited] |
Returns the lane's maximum speed.
Definition at line 329 of file MSLane.h.
References MSLane::myMaxSpeed.
Referenced by MSVehicleTransfer::checkInsertions(), traci::TraCIServer::commandAddVehicle(), MSAbstractLaneChangeModel::congested(), MSCFModel_IDM::desiredSpeed(), GUILaneWrapper::getColorValue(), TraCIDijkstraRouter< E >::getEffort(), MSLane::getLeaderOnConsecutive(), getMaxSpeedRegardingNextLanes(), GUILaneWrapper::getParameterWindow(), MSNet::EdgeWeightsProxi::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSLane::insertVehicle(), MSCFModel::interactionGap(), MSLane::isInsertionSuccess(), MSCFModel_KraussOrig1::moveHelper(), MSCFModel::moveHelper(), MSVehicle::moveRegardingCritical(), MSVehicle::MSVehicle(), TraCIServerAPI_Lane::processGet(), MSVehicle::setBlinkerInformation(), MSVehicle::vsafeCriticalCont(), MSLCM_DK2004::wantsChangeToLeft(), MSLCM_DK2004::wantsChangeToRight(), and MSMeanData::writeEdge().
SUMOReal MSLane::getMeanSpeed | ( | ) | const [inherited] |
Returns the mean speed on this lane.
Definition at line 1199 of file MSLane.cpp.
References MSLane::getVehiclesSecure(), MSLane::myMaxSpeed, MSLane::myVehicles, MSLane::releaseVehicles(), and SUMOReal.
Referenced by TraCIServerAPI_Lane::processGet().
const std::vector< MSMoveReminder* >& MSLane::getMoveReminders | ( | ) | const [inline, inherited] |
Return the list of this lane's move reminders.
Definition at line 149 of file MSLane.h.
References MSLane::myMoveReminders.
Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), MSVehicle::enterLaneAtInsertion(), and MSVehicle::enterLaneAtLaneChange().
size_t MSLane::getNumericalID | ( | ) | const [inline, inherited] |
Returns this lane's numerical id.
Definition at line 313 of file MSLane.h.
References MSLane::myNumericalID.
SUMOReal MSLane::getOccupancy | ( | ) | const [inherited] |
Returns the occupancy of this lane during the last step.
Definition at line 1187 of file MSLane.cpp.
References MSLane::myLength, and MSLane::myVehicleLengthSum.
Referenced by GUILaneWrapper::getColorValue(), and TraCIServerAPI_Lane::processGet().
MSVehicle* MSLane::getPartialOccupator | ( | ) | const [inline, inherited] |
Returns the vehicle which laps into this lane.
Definition at line 251 of file MSLane.h.
References MSLane::myInlappingVehicle.
Referenced by MSVehicle::checkRewindLinkLanes(), MSE2Collector::detectorUpdate(), MSLane::freeInsertion(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), MSLaneChanger::getRealThisLeader(), MSLane::isInsertionSuccess(), MSLane::maxSpeedGapInsertion(), MSVehicle::moveRegardingCritical(), and MSE2Collector::by_vehicle_position_sorter::operator()().
SUMOReal MSLane::getPartialOccupatorEnd | ( | ) | const [inline, inherited] |
Returns the position of the in-lapping vehicle's end.
Definition at line 259 of file MSLane.h.
References MSLane::myInlappingVehicleEnd.
Referenced by MSVehicle::checkRewindLinkLanes(), MSE2Collector::detectorUpdate(), MSLane::freeInsertion(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), MSLaneChanger::getRealThisLeader(), MSLane::isInsertionSuccess(), MSLane::maxSpeedGapInsertion(), and MSVehicle::moveRegardingCritical().
SVCPermissions MSLane::getPermissions | ( | ) | [inline, inherited] |
Returns the vehicle class permissions for this lane.
Definition at line 345 of file MSLane.h.
References MSLane::myPermissions.
Referenced by TraCIServerAPI_Lane::processGet().
MSLane * MSLane::getRightLane | ( | ) | const [inherited] |
Definition at line 983 of file MSLane.cpp.
References MSLane::myEdge, and MSEdge::rightLane().
const PositionVector& MSLane::getShape | ( | ) | const [inline, inherited] |
Returns this lane's shape.
Definition at line 321 of file MSLane.h.
References MSLane::myShape.
Referenced by NLHandler::addConnection(), NLHandler::addPOI(), NLSucceedingLaneBuilder::addSuccLane(), GUIE3Collector::MyWrapper::buildDefinition(), GUIVehicle::drawGL(), GUIVehicle::drawGLAdditional(), MSVTypeProbe::execute(), MSVehicle::getAngle(), MSVehicle::getPosition(), GUIBusStop::GUIBusStop(), MSLane::by_connections_to_sorter::operator()(), TraCIServerAPI_Lane::processGet(), and GUILaneWrapper::ROWdrawAction_drawLane2LaneConnections().
unsigned int MSLane::getVehicleNumber | ( | ) | const [inline, inherited] |
Returns the number of vehicles on this lane.
Definition at line 283 of file MSLane.h.
References MSLane::myVehicles.
Referenced by MSVehicle::checkRewindLinkLanes(), MSEdge::getFreeLane(), TraCIServerAPI_Lane::processGet(), and MSXMLRawOut::writeLane().
virtual const std::deque< MSVehicle* >& MSLane::getVehiclesSecure | ( | ) | const [inline, virtual, inherited] |
Returns the vehicles container; locks it for microsimulation.
Please note that it is necessary to release the vehicles container afterwards using "releaseVehicles".
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 294 of file MSLane.h.
References MSLane::myVehicles.
Referenced by GUILaneWrapper::drawGL(), MSLane::getHarmonoise_NoiseEmissions(), MSLane::getHBEFA_CO2Emissions(), MSLane::getHBEFA_COEmissions(), MSLane::getHBEFA_FuelConsumption(), MSLane::getHBEFA_HCEmissions(), MSLane::getHBEFA_NOxEmissions(), MSLane::getHBEFA_PMxEmissions(), MSLane::getMeanSpeed(), MSVehicle::getSpaceTillLastStanding(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getVehLenSum | ( | ) | const [inherited] |
Returns the sum of lengths of vehicles which were on the lane during the last step.
Definition at line 1193 of file MSLane.cpp.
References MSLane::myVehicleLengthSum.
Referenced by MSVehicle::checkRewindLinkLanes().
SUMOReal MSLane::getWidth | ( | ) | const [inline, inherited] |
Returns the lane's width.
Definition at line 353 of file MSLane.h.
References MSLane::myWidth.
Referenced by GUILaneWrapper::GUILaneWrapper(), TraCIServerAPI_Lane::processGet(), GUILaneWrapper::ROWdrawAction_drawLinkNo(), GUILaneWrapper::ROWdrawAction_drawLinkRules(), and GUILaneWrapper::ROWdrawAction_drawTLSLinkNo().
void MSLane::incorporateVehicle | ( | MSVehicle * | veh, |
SUMOReal | pos, | ||
SUMOReal | speed, | ||
const MSLane::VehCont::iterator & | at, | ||
MSMoveReminder::Notification | notification = MSMoveReminder::NOTIFICATION_DEPARTED |
||
) | [protected, virtual, inherited] |
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
[in] | veh | The vehicle to be incorporated |
[in] | pos | The position of the vehicle |
[in] | speed | The speed of the vehicle |
[in] | at | |
[in] | notification | The cause of insertion (i.e. departure, teleport, parking) defaults to departure |
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 127 of file MSLane.cpp.
References MSVehicle::enterLaneAtInsertion(), MSNet::getEdgeControl(), MSNet::getInstance(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSEdgeControl::gotActive(), MSLane::myVehicleLengthSum, and MSLane::myVehicles.
Referenced by MSLane::forceVehicleInsertion(), MSLane::isInsertionSuccess(), MSLane::maxSpeedGapInsertion(), MSLane::pWagGenericInsertion(), and MSLane::pWagSimpleInsertion().
void MSLane::initialize | ( | MSLinkCont * | succs | ) | [inherited] |
Delayed initialization (deprecated)
Not all lane-members are known at the time the lane is born, above all the pointers to other lanes, so we have to initialize later.
[in] | succs | The list of (outgoing) links |
Definition at line 102 of file MSLane.cpp.
References MSLane::myLinks.
Referenced by NLSucceedingLaneBuilder::closeSuccLane().
void MSLane::insertIDs | ( | std::vector< std::string > & | into | ) | [static, inherited] |
Definition at line 814 of file MSLane.cpp.
References MSLane::myDict.
Referenced by TraCIServerAPI_Lane::processGet().
bool MSLane::insertVehicle | ( | MSVehicle & | v | ) | [inherited] |
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.
[in] | v | The vehicle to insert |
Definition at line 338 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, MSLane::freeInsertion(), MSVehicleType::getLength(), MSLane::getLength(), MSBaseVehicle::getMaxSpeed(), MSLane::getMaxSpeed(), MSBaseVehicle::getParameter(), MSBaseVehicle::getVehicleType(), MSLane::isInsertionSuccess(), MSLane::maxSpeedGapInsertion(), MIN2(), MSLane::myLength, POSITION_EPS, MSLane::pWagGenericInsertion(), MSLane::pWagSimpleInsertion(), RandHelper::rand(), and SUMOReal.
Referenced by MSEdge::insertVehicle().
bool MSLane::integrateNewVehicle | ( | SUMOTime | t | ) | [virtual, inherited] |
Insert buffered vehicle into the real lane.
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 832 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSLane::myVehBuffer, MSLane::myVehicleLengthSum, and MSLane::myVehicles.
bool MSLane::isApproachedFrom | ( | MSEdge *const | edge | ) | [inherited] |
Definition at line 1009 of file MSLane.cpp.
References MSLane::myApproachingLanes.
bool MSLane::isApproachedFrom | ( | MSEdge *const | edge, |
MSLane *const | lane | ||
) | [inherited] |
Definition at line 1015 of file MSLane.cpp.
References MSLane::myApproachingLanes.
bool MSLane::isInsertionSuccess | ( | MSVehicle * | vehicle, |
SUMOReal | speed, | ||
SUMOReal | pos, | ||
bool | recheckNextLanes, | ||
MSMoveReminder::Notification | notification = MSMoveReminder::NOTIFICATION_DEPARTED |
||
) | [virtual, inherited] |
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.
[in] | vehicle | The vehicle to insert |
[in] | speed | The speed with which it shall be inserted |
[in] | pos | The position at which it shall be inserted |
[in] | recheckNextLanes | Forces patching the speed for not being too fast on next lanes |
[in] | notification | The cause of insertion (i.e. departure, teleport, parking) defaults to departure |
Definition at line 408 of file MSLane.cpp.
References MSRoute::begin(), MSCFModel::brakeGap(), MSCFModel::followSpeed(), MSCFModel::freeSpeed(), MSVehicle::gap(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), MSLane::getFollowerOnConsecutive(), MSBaseVehicle::getID(), MSNet::getInstance(), MSLane::getLastVehicle(), MSVehicleType::getLength(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), MSLane::getMaxSpeed(), MSVehicleType::getMinGap(), MSLane::getPartialOccupator(), MSLane::getPartialOccupatorEnd(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getRoute(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::incorporateVehicle(), MSLane::isLinkEnd(), LINKSTATE_TL_RED, MIN2(), MSLane::myLength, MSLane::myVehicles, SPEED2DIST, MSLane::succLinkSec(), SUMOReal, TIME2STEPS, toString(), WRITE_ERROR, and WRITE_WARNING.
Referenced by MSVehicleTransfer::checkInsertions(), traci::TraCIServer::commandAddVehicle(), MSLane::freeInsertion(), MSLane::insertVehicle(), and MSLane::maxSpeedGapInsertion().
bool MSLane::isLinkEnd | ( | MSLinkCont::const_iterator & | i | ) | const [inherited] |
Returns the information whether the given link shows at the end of the list of links (is not valid)
Definition at line 846 of file MSLane.cpp.
References MSLane::myLinks.
Referenced by MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealThisLeader(), MSLane::isInsertionSuccess(), and MSVehicle::vsafeCriticalCont().
bool MSLane::isLinkEnd | ( | MSLinkCont::iterator & | i | ) | [inherited] |
Returns the information whether the given link shows at the end of the list of links (is not valid)
Definition at line 852 of file MSLane.cpp.
References MSLane::myLinks.
void MSLane::leftByLaneChange | ( | MSVehicle * | v | ) | [inherited] |
Definition at line 1174 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), and MSLane::myVehicleLengthSum.
bool MSLane::maxSpeedGapInsertion | ( | MSVehicle & | veh, |
SUMOReal | mspeed | ||
) | [inherited] |
Definition at line 222 of file MSLane.cpp.
References MSVehicle::getCarFollowModel(), MSCFModel::getHeadwayTime(), MSVehicleType::getLength(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), MSLane::getPartialOccupator(), MSLane::getPartialOccupatorEnd(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::incorporateVehicle(), MSLane::isInsertionSuccess(), MIN2(), MSLane::myLength, MSLane::myVehicles, and SUMOReal.
Referenced by MSLane::insertVehicle().
bool MSInternalLane::moveCritical | ( | SUMOTime | t | ) | [virtual] |
Reimplemented from MSLane.
Reimplemented in GUIInternalLane.
Definition at line 87 of file MSInternalLane.cpp.
References myFoesIndex, and MSLane::myVehicles.
MSInternalLane& MSInternalLane::operator= | ( | const MSInternalLane & | s | ) | [private] |
invalidated assignment operator
bool MSLane::pWagGenericInsertion | ( | MSVehicle & | veh, |
SUMOReal | speed, | ||
SUMOReal | maxPos, | ||
SUMOReal | minPos | ||
) | [inherited] |
Definition at line 144 of file MSLane.cpp.
References MSCFModel::brakeGap(), MSCFModel::followSpeed(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSLane::getLeaderOnConsecutive(), MSVehicleType::getLength(), MSLane::getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::incorporateVehicle(), MSLane::myVehicles, and SUMOReal.
Referenced by MSLane::insertVehicle().
bool MSLane::pWagSimpleInsertion | ( | MSVehicle & | veh, |
SUMOReal | speed, | ||
SUMOReal | maxPos, | ||
SUMOReal | minPos | ||
) | [inherited] |
Definition at line 190 of file MSLane.cpp.
References MSCFModel::brakeGap(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSCFModel::getHeadwayTime(), MSLane::getLeaderOnConsecutive(), MSVehicleType::getLength(), MSLane::getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::incorporateVehicle(), MSLane::myVehicles, and SUMOReal.
Referenced by MSLane::insertVehicle().
virtual void MSLane::releaseVehicles | ( | ) | const [inline, virtual, inherited] |
Allows to use the container for microsimulation again.
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 301 of file MSLane.h.
Referenced by GUILaneWrapper::drawGL(), MSLane::getHarmonoise_NoiseEmissions(), MSLane::getHBEFA_CO2Emissions(), MSLane::getHBEFA_COEmissions(), MSLane::getHBEFA_FuelConsumption(), MSLane::getHBEFA_HCEmissions(), MSLane::getHBEFA_NOxEmissions(), MSLane::getHBEFA_PMxEmissions(), MSLane::getMeanSpeed(), MSVehicle::getSpaceTillLastStanding(), and TraCIServerAPI_Lane::processGet().
MSVehicle * MSLane::removeVehicle | ( | MSVehicle * | remVehicle | ) | [virtual, inherited] |
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 963 of file MSLane.cpp.
References MSBaseVehicle::getID(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSVehicle::leaveLane(), MSLane::myVehicleLengthSum, MSLane::myVehicles, and MSMoveReminder::NOTIFICATION_ARRIVED.
void MSLane::resetPartialOccupation | ( | MSVehicle * | v | ) | [inherited] |
Removes the information about a vehicle lapping into this lane.
[in] | v | The vehicle which laps into this lane |
Definition at line 622 of file MSLane.cpp.
References MSLane::myInlappingVehicle, and MSLane::myInlappingVehicleEnd.
Referenced by MSVehicle::moveChecked().
bool MSLane::setCritical | ( | SUMOTime | t, |
std::vector< MSLane * > & | into | ||
) | [virtual, inherited] |
Moves the critical vehicles This step is done after the responds have been set
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 727 of file MSLane.cpp.
References MSVehicleTransfer::addVeh(), MSVehicle::ends(), MSLane::getEdge(), Named::getID(), MSBaseVehicle::getID(), MSVehicleTransfer::getInstance(), MSNet::getInstance(), MSVehicle::getLane(), MSLane::getLength(), MSVehicleType::getLengthWithGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSNet::getVehicleControl(), MSBaseVehicle::getVehicleType(), MSGlobals::gTimeToGridlock, MSVehicle::isParking(), MSEdge::isVaporizing(), MSVehicle::leaveLane(), MSVehicle::moveChecked(), MSLane::myVehBuffer, MSLane::myVehicleLengthSum, MSLane::myVehicles, MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_VAPORIZED, MSVehicle::onRemovalFromNet(), MSVehicleControl::scheduleVehicleRemoval(), SPEED2DIST, SUMOReal, time2string(), MSVehicle::workOnMoveReminders(), and WRITE_WARNING.
void Named::setID | ( | const std::string & | newID | ) | [inline, inherited] |
resets the id
Definition at line 67 of file Named.h.
References Named::myID.
Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().
void MSLane::setLength | ( | SUMOReal | val | ) | [inline, inherited] |
Definition at line 398 of file MSLane.h.
References MSLane::myLength.
Referenced by TraCIServerAPI_Lane::processSet().
void MSLane::setMaxSpeed | ( | SUMOReal | val | ) | [inline, inherited] |
Definition at line 394 of file MSLane.h.
References MSLane::myMaxSpeed.
Referenced by TraCIServerAPI_Lane::processSet().
void MSInternalLane::setParentJunctionInformation | ( | MSLogicJunction::InnerState *const | foescont, |
unsigned int | foesIdx | ||
) |
Sets the information where to report vehicles being on this lane to.
In addition to a lane's normal initialization (MSLane::initialize), an internal lane needs to know which junction has to be informed about a vehicle being on the internal lane. This information is set herein.
[in] | foescont | The junction inner state to set information about vehicles into |
[in] | foesIdx | This lane's index within this state |
Definition at line 73 of file MSInternalLane.cpp.
References myFoesCont, and myFoesIndex.
Referenced by MSNoLogicJunction::postloadInit(), and MSRightOfWayJunction::postloadInit().
SUMOReal MSLane::setPartialOccupation | ( | MSVehicle * | v, |
SUMOReal | leftVehicleLength | ||
) | [inherited] |
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.
[in] | v | The vehicle which laps into this lane |
[in] | leftVehicleLength | The distance the vehicle laps into this lane |
Definition at line 610 of file MSLane.cpp.
References MSLane::myInlappingVehicle, MSLane::myInlappingVehicleEnd, and MSLane::myLength.
void MSInternalLane::setPassPosition | ( | SUMOReal | passPos | ) |
Sets the position that must be free so that vehicles can pass.
Definition at line 81 of file MSInternalLane.cpp.
References myPassPosition.
void MSLane::setPermissions | ( | SVCPermissions | permissions | ) | [inline, inherited] |
Definition at line 473 of file MSLane.h.
References MSLane::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, inherited] |
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 876 of file MSLane.cpp.
References MSEdge::allowedLanes(), MSVehicleType::getVehicleClass(), SUMOVehicle::getVehicleType(), MSLane::myLinks, and SUMOVehicle::succEdge().
Referenced by MSLane::appropriate(), MSLane::getLeaderOnConsecutive(), MSLaneChanger::getRealThisLeader(), MSLane::isInsertionSuccess(), MSVehicle::setBlinkerInformation(), and MSVehicle::vsafeCriticalCont().
void MSLane::swapAfterLaneChange | ( | SUMOTime | t | ) | [protected, virtual, inherited] |
moves myTmpVehicles int myVehicles after a lane change procedure
Reimplemented in GUILane, and GUIInternalLane.
Definition at line 948 of file MSLane.cpp.
References MSLane::myTmpVehicles, and MSLane::myVehicles.
friend class GUILaneWrapper [friend, inherited] |
Definition at line 75 of file MSLane.h.
Referenced by GUIInternalLane::buildLaneWrapper(), and GUILane::buildLaneWrapper().
friend class MSLaneChanger [friend, inherited] |
friend class MSXMLRawOut [friend, inherited] |
std::map<MSEdge*, std::vector<MSLane*> > MSLane::myApproachingLanes [protected, inherited] |
Definition at line 678 of file MSLane.h.
Referenced by MSLane::addApproachingLane(), and MSLane::isApproachedFrom().
MSLane::DictType MSLane::myDict [static, protected, inherited] |
Static dictionary to associate string-ids with objects.
Definition at line 686 of file MSLane.h.
Referenced by MSLane::clear(), MSLane::dictionary(), MSLane::dictSize(), and MSLane::insertIDs().
MSEdge* MSLane::myEdge [protected, inherited] |
The lane's edge, for routing only.
Definition at line 638 of file MSLane.h.
Referenced by MSLane::appropriate(), MSLane::getEdge(), MSLane::getLeftLane(), MSLane::getLogicalPredecessorLane(), MSLane::getRightLane(), and MSLane::by_connections_to_sorter::operator()().
The container of junction-internal vehicle-occupied lanes.
Definition at line 136 of file MSInternalLane.h.
Referenced by setParentJunctionInformation().
int MSInternalLane::myFoesIndex [private] |
The index on which to write into this container.
Definition at line 139 of file MSInternalLane.h.
Referenced by moveCritical(), and setParentJunctionInformation().
std::string Named::myID [protected, inherited] |
The name of the object.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 83 of file Named.h.
Referenced by NLDetectorBuilder::addE3Entry(), NLDetectorBuilder::addE3Exit(), NBEdge::computeEdgeShape(), Named::getID(), NBEdge::getLaneID(), NBEdge::init(), RORouteDef_OrigDest::preComputeCurrentRoute(), RORouteDef_Alternatives::preComputeCurrentRoute(), RORouteDef_Complete::preComputeCurrentRoute(), MSRoute::release(), Named::setID(), NBEdge::splitGeometry(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
std::vector<IncomingLaneInfo> MSLane::myIncomingLanes [protected, inherited] |
Definition at line 657 of file MSLane.h.
Referenced by MSLane::addIncomingLane(), MSLane::getFollowerOnConsecutive(), MSLane::getIncomingLanes(), and MSLane::getLogicalPredecessorLane().
MSVehicle* MSLane::myInlappingVehicle [protected, inherited] |
The vehicle which laps into this lane.
Definition at line 668 of file MSLane.h.
Referenced by MSLane::getLastVehicleInformation(), MSLane::getPartialOccupator(), MSLane::resetPartialOccupation(), and MSLane::setPartialOccupation().
SUMOReal MSLane::myInlappingVehicleEnd [protected, inherited] |
End position of a vehicle which laps into this lane.
Definition at line 665 of file MSLane.h.
Referenced by MSLane::getLastVehicleInformation(), MSLane::getPartialOccupatorEnd(), MSLane::resetPartialOccupation(), and MSLane::setPartialOccupation().
SUMOReal MSLane::myLeftVehLength [protected, inherited] |
Not yet seen vehicle lengths.
Definition at line 672 of file MSLane.h.
Referenced by MSLane::moveCritical().
SUMOReal MSLane::myLength [protected, inherited] |
Lane length [m].
Definition at line 632 of file MSLane.h.
Referenced by MSLane::getLength(), MSLane::getOccupancy(), MSLane::insertVehicle(), MSLane::isInsertionSuccess(), MSLane::maxSpeedGapInsertion(), MSLane::moveCritical(), MSLane::setLength(), and MSLane::setPartialOccupation().
MSLinkCont MSLane::myLinks [protected, inherited] |
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 676 of file MSLane.h.
Referenced by MSLane::addLink(), MSLane::appropriate(), MSLane::getLinkCont(), MSLane::initialize(), MSLane::isLinkEnd(), MSLane::succLinkSec(), and MSLane::~MSLane().
MSLane* MSLane::myLogicalPredecessorLane [mutable, protected, inherited] |
Definition at line 658 of file MSLane.h.
Referenced by MSLane::getLogicalPredecessorLane().
SUMOReal MSLane::myMaxSpeed [protected, inherited] |
Lane-wide speedlimit [m/s].
Definition at line 641 of file MSLane.h.
Referenced by MSLane::getMaxSpeed(), MSLane::getMeanSpeed(), and MSLane::setMaxSpeed().
size_t MSLane::myNumericalID [protected, inherited] |
Unique numerical ID (set on reading by netload)
Definition at line 620 of file MSLane.h.
Referenced by MSLane::getNumericalID().
SUMOReal MSInternalLane::myPassPosition [private] |
The position that must be free so that vehicles can pass.
Definition at line 144 of file MSInternalLane.h.
Referenced by setPassPosition().
SVCPermissions MSLane::myPermissions [protected, inherited] |
The vClass permissions for this lane.
Definition at line 655 of file MSLane.h.
Referenced by MSLane::allowsVehicleClass(), MSLane::getPermissions(), and MSLane::setPermissions().
PositionVector MSLane::myShape [inherited] |
The shape of the lane.
Definition at line 462 of file MSLane.h.
Referenced by GUIInternalLane::buildLaneWrapper(), GUILane::buildLaneWrapper(), and MSLane::getShape().
VehCont MSLane::myTmpVehicles [protected, inherited] |
Container for lane-changing vehicles. After completion of lane-change- process, the two containers will be swapped.
Definition at line 645 of file MSLane.h.
Referenced by MSLane::swapAfterLaneChange().
std::vector<MSVehicle*> MSLane::myVehBuffer [protected, inherited] |
Vehicle-buffer for vehicle that was put onto this lane by a junction. The buffer is necessary, because of competing push- and pop-operations on myVehicles during Junction::moveFirst()
Definition at line 652 of file MSLane.h.
Referenced by MSLane::empty(), MSLane::integrateNewVehicle(), MSLane::setCritical(), and MSXMLRawOut::writeLane().
SUMOReal MSLane::myVehicleLengthSum [protected, inherited] |
The current length of all vehicles on this lane.
Definition at line 662 of file MSLane.h.
Referenced by MSLane::detectCollisions(), MSLane::enteredByLaneChange(), MSLane::getOccupancy(), MSLane::getVehLenSum(), MSLane::incorporateVehicle(), MSLane::integrateNewVehicle(), MSLane::leftByLaneChange(), MSLane::moveCritical(), MSLane::removeVehicle(), and MSLane::setCritical().
VehCont MSLane::myVehicles [protected, inherited] |
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 629 of file MSLane.h.
Referenced by MSLane::addMoveReminder(), MSLane::detectCollisions(), MSLane::empty(), GUILaneWrapper::firstWaitingTime(), MSLane::forceVehicleInsertion(), MSLane::freeInsertion(), MSLane::getFirstVehicle(), MSLane::getLastVehicle(), MSLane::getLastVehicleInformation(), MSLane::getMeanSpeed(), MSLane::getVehicleNumber(), GUIInternalLane::getVehiclesSecure(), GUILane::getVehiclesSecure(), MSLane::getVehiclesSecure(), MSLane::incorporateVehicle(), MSLane::integrateNewVehicle(), MSLane::isInsertionSuccess(), MSLane::maxSpeedGapInsertion(), moveCritical(), MSLane::moveCritical(), MSLane::pWagGenericInsertion(), MSLane::pWagSimpleInsertion(), MSLane::removeVehicle(), MSLane::setCritical(), MSLane::swapAfterLaneChange(), and MSXMLRawOut::writeLane().
SUMOReal MSLane::myWidth [protected, inherited] |