SUMO - Simulation of Urban MObility
|
Representation of a lane in the micro simulation. More...
#include <MSLane.h>
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::vector< MSVehicle * > | VehCont |
Container for vehicles. More... | |
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. More... | |
void | addParameter (const std::map< std::string, std::string > &mapArg) |
Adds all given parameter. More... | |
void | addParameter (const Parameterised &p) |
Adds all given parameter. More... | |
void | addTo (const StoringVisitor &cont) const |
Adds this object to the given container. More... | |
bool | allowsVehicleClass (SUMOVehicleClass vclass) const |
virtual bool | appropriate (const MSVehicle *veh) |
void | clearParameter () |
Clears the parameter map. More... | |
virtual void | detectCollisions (SUMOTime timestep, int stage) |
Check if vehicles are too close. More... | |
bool | empty () const |
Returns true if there is not a single vehicle on the lane. More... | |
void | enteredByLaneChange (MSVehicle *v) |
MSEdge & | getEdge () const |
Returns the lane's edge. More... | |
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. More... | |
const std::vector < IncomingLaneInfo > & | getIncomingLanes () const |
virtual MSVehicle * | getLastVehicle () const |
returns the last vehicle More... | |
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. More... | |
const MSLinkCont & | getLinkCont () const |
returns the container with all links !!! More... | |
MSLane * | getLogicalPredecessorLane () const |
const std::map< std::string, std::string > & | getMap () const |
Returns the inner key/value map. More... | |
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 More... | |
MSLane * | getParallelLane (int offset) const |
Returns the lane with the given offset parallel to this one or 0 if it does not exist. More... | |
const std::string & | getParameter (const std::string &key, const std::string &defaultValue) const |
Returns the value for a given key. More... | |
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. More... | |
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. More... | |
virtual MSVehicle * | removeVehicle (MSVehicle *remVehicle, MSMoveReminder::Notification notification) |
remove the vehicle from this lane More... | |
void | setID (const std::string &newID) |
resets the id More... | |
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. More... | |
Additional initialisation | |
void | addLink (MSLink *link) |
Delayed initialization. More... | |
interaction with MSMoveReminder | |
virtual void | addMoveReminder (MSMoveReminder *rem) |
Add a move-reminder to move-reminder container. More... | |
const std::vector < MSMoveReminder * > & | getMoveReminders () const |
Return the list of this lane's move reminders. More... | |
Vehicle insertion | |
bool | insertVehicle (MSVehicle &v) |
Tries to insert the given vehicle. More... | |
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) More... | |
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. More... | |
void | forceVehicleInsertion (MSVehicle *veh, SUMOReal pos) |
Inserts the given vehicle at the given position. More... | |
Handling vehicles lapping into lanes | |
SUMOReal | setPartialOccupation (MSVehicle *v, SUMOReal leftVehicleLength) |
Sets the information about a vehicle lapping into this lane. More... | |
void | resetPartialOccupation (MSVehicle *v) |
Removes the information about a vehicle lapping into this lane. More... | |
MSVehicle * | getPartialOccupator () const |
Returns the vehicle which laps into this lane. More... | |
SUMOReal | getPartialOccupatorEnd () const |
Returns the position of the in-lapping vehicle's end. More... | |
std::pair< MSVehicle *, SUMOReal > | getLastVehicleInformation () const |
Returns the last vehicle which is still on the lane. More... | |
Access to vehicles | |
unsigned int | getVehicleNumber () const |
Returns the number of vehicles on this lane. More... | |
virtual const VehCont & | getVehiclesSecure () const |
Returns the vehicles container; locks it for microsimulation. More... | |
virtual void | releaseVehicles () const |
Allows to use the container for microsimulation again. More... | |
Atomar value getter | |
size_t | getNumericalID () const |
Returns this lane's numerical id. More... | |
const PositionVector & | getShape () const |
Returns this lane's shape. More... | |
SUMOReal | interpolateLanePosToGeometryPos (SUMOReal lanePos) const |
const Position | geometryPositionAtOffset (SUMOReal offset) 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. More... | |
SUMOReal | getSpeedLimit () const |
Returns the lane's maximum allowed speed. More... | |
SUMOReal | getLength () const |
Returns the lane's length. More... | |
SVCPermissions | getPermissions () const |
Returns the vehicle class permissions for this lane. More... | |
SUMOReal | getWidth () const |
Returns the lane's width. More... | |
Vehicle movement (longitudinal) | |
virtual void | planMovements (const SUMOTime t) |
Compute safe velocities for all vehicles based on positions and speeds from the last time step. Also registers ApproachingVehicleInformation for all links. More... | |
virtual bool | executeMovements (SUMOTime t, std::vector< MSLane * > &into) |
Executes planned vehicle movements with regards to right-of-way. More... | |
virtual bool | integrateNewVehicle (SUMOTime t) |
Insert buffered vehicle into the real lane. More... | |
Current state retrieval | |
SUMOReal | getMeanSpeed () const |
Returns the mean speed on this lane. More... | |
SUMOReal | getOccupancy () const |
Returns the occupancy of this lane during the last step. More... | |
SUMOReal | getVehLenSum () const |
Returns the sum of lengths of vehicles which were on the lane during the last step. More... | |
SUMOReal | getHBEFA_CO2Emissions () const |
Returns the sum of last step CO2 emissions. More... | |
SUMOReal | getHBEFA_COEmissions () const |
Returns the sum of last step CO emissions. More... | |
SUMOReal | getHBEFA_PMxEmissions () const |
Returns the sum of last step PMx emissions. More... | |
SUMOReal | getHBEFA_NOxEmissions () const |
Returns the sum of last step NOx emissions. More... | |
SUMOReal | getHBEFA_HCEmissions () const |
Returns the sum of last step HC emissions. More... | |
SUMOReal | getHBEFA_FuelConsumption () const |
Returns the sum of last step fuel consumption. More... | |
SUMOReal | getHarmonoise_NoiseEmissions () const |
Returns the sum of last step noise emissions. More... | |
State saving/loading | |
void | saveState (OutputDevice &out) |
Saves the state of this lane into the given stream. More... | |
void | loadState (std::vector< std::string > &vehIDs, MSVehicleControl &vc) |
Loads the state of this segment with the given parameters. More... | |
Static Public Member Functions | |
static void | clear () |
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. More... | |
static MSLane * | dictionary (std::string id) |
Returns the MSLane associated to the key id if exists Otherwise returns 0. More... | |
static size_t | dictSize () |
static void | insertIDs (std::vector< std::string > &into) |
Data Fields | |
PositionVector | myShape |
The shape of the lane. More... | |
Protected Types | |
typedef std::map< std::string, MSLane * > | DictType |
definition of the static dictionary type More... | |
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. More... | |
virtual void | swapAfterLaneChange (SUMOTime t) |
moves myTmpVehicles int myVehicles after a lane change procedure More... | |
Protected Attributes | |
std::map< MSEdge *, std::vector< MSLane * > > | myApproachingLanes |
MSEdge * | myEdge |
The lane's edge, for routing only. More... | |
std::string | myID |
The name of the object. More... | |
std::vector< IncomingLaneInfo > | myIncomingLanes |
MSVehicle * | myInlappingVehicle |
The vehicle which laps into this lane. More... | |
SUMOReal | myInlappingVehicleEnd |
End position of a vehicle which laps into this lane. More... | |
SUMOReal | myLength |
Lane length [m]. More... | |
const SUMOReal | myLengthGeometryFactor |
MSLinkCont | myLinks |
MSLane * | myLogicalPredecessorLane |
SUMOReal | myMaxSpeed |
Lane-wide speedlimit [m/s]. More... | |
size_t | myNumericalID |
Unique numerical ID (set on reading by netload) More... | |
SVCPermissions | myPermissions |
The vClass permissions for this lane. More... | |
VehCont | myTmpVehicles |
std::vector< MSVehicle * > | myVehBuffer |
SUMOReal | myVehicleLengthSum |
The current length of all vehicles on this lane. More... | |
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. More... | |
SUMOReal | myWidth |
Lane width [m]. More... | |
Static Protected Attributes | |
static DictType | myDict |
Static dictionary to associate string-ids with objects. More... | |
Private Member Functions | |
MSLane (const MSLane &) | |
invalidated copy constructor More... | |
MSLane & | operator= (const MSLane &) |
invalidated assignment operator More... | |
Private Attributes | |
std::vector< MSMoveReminder * > | myMoveReminders |
This lane's move reminder. More... | |
Friends | |
class | MSLaneChanger |
needs access to myTmpVehicles (this maybe should be done via double-buffering!!!) More... | |
class | MSQueueExport |
class | MSXMLRawOut |
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.
|
protected |
typedef std::vector< MSVehicle* > MSLane::VehCont |
MSLane::MSLane | ( | 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 | Encoding of the Vehicle classes that may drive on this lane |
Definition at line 85 of file MSLane.cpp.
|
virtual |
|
private |
invalidated copy constructor
void MSLane::addApproachingLane | ( | MSLane * | lane) |
Definition at line 988 of file MSLane.cpp.
References getEdge(), and myApproachingLanes.
Referenced by NLHandler::addConnection().
Definition at line 978 of file MSLane.cpp.
References getLength(), MSLane::IncomingLaneInfo::lane, MSLane::IncomingLaneInfo::length, myIncomingLanes, and MSLane::IncomingLaneInfo::viaLink.
Referenced by NLHandler::addConnection().
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.
[in] | link | An outgoing link |
Definition at line 105 of file MSLane.cpp.
References myLinks.
Referenced by NLHandler::addConnection().
|
virtual |
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 112 of file MSLane.cpp.
References myMoveReminders, and myVehicles.
Referenced by MSMoveReminder::MSMoveReminder().
|
inherited |
Adds a parameter.
[in] | key | The parameter's name |
[in] | value | The parameter's value |
Definition at line 53 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by NLHandler::addParam(), SUMORouteHandler::addParam(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), and NIImporter_MATSim::EdgesHandler::myStartElement().
|
inherited |
Adds all given parameter.
[in] | mapArg | The keys/values to insert |
Definition at line 59 of file Parameterised.cpp.
References Parameterised::myMap.
|
inherited |
Adds all given parameter.
[in] | p | The keys/values to insert |
Definition at line 67 of file Parameterised.cpp.
References Parameterised::myMap.
|
inlineinherited |
Adds this object to the given container.
in,filled] | cont The container to add this item to |
Definition at line 114 of file Named.h.
References Named::StoringVisitor::add().
|
inline |
Definition at line 512 of file MSLane.h.
References myPermissions.
Referenced by GUILane::getColorValue().
Returns the information whether this lane may be used to continue the current route
Definition at line 847 of file MSLane.cpp.
References MSEdge::EDGEFUNCTION_INTERNAL, MSVehicle::getBestLanesContinuation(), MSEdge::getPurpose(), myEdge, myLinks, and succLinkSec().
Referenced by executeMovements().
|
static |
Clears the dictionary
Definition at line 830 of file MSLane.cpp.
References myDict.
Referenced by MSNet::clearAll().
|
inherited |
Clears the parameter map.
Definition at line 91 of file Parameterised.cpp.
References Parameterised::myMap.
Check if vehicles are too close.
Reimplemented in GUILane.
Definition at line 677 of file MSLane.cpp.
References MSVehicleTransfer::addVeh(), MSAbstractLaneChangeModel::endLaneChangeManeuver(), Named::getID(), MSBaseVehicle::getID(), MSVehicleTransfer::getInstance(), MSNet::getInstance(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), MSVehicleType::getLengthWithGap(), MSNet::getVehicleControl(), MSBaseVehicle::getVehicleType(), myVehicleLengthSum, myVehicles, MSVehicleControl::registerCollision(), SUMOReal, time2string(), toString(), and WRITE_WARNING.
Referenced by GUILane::detectCollisions().
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 807 of file MSLane.cpp.
References myDict.
Referenced by NLHandler::addConnection(), NLHandler::addLane(), NLHandler::addPOI(), MSRouteHandler::addStop(), MSVehicle::addStop(), traci::TraCIServer::collectObjectsInRange(), traci::TraCIServer::commandAddVehicle(), MSDevice_Tripinfo::generateOutput(), NLTriggerBuilder::getLane(), NLDetectorBuilder::getLaneChecking(), TraCIServerAPI_Lane::getShape(), MSDevice_BTreceiver::notifyMove(), NLTriggerBuilder::parseAndBuildLaneSpeedTrigger(), NLHandler::parseLanes(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Lane::processSet(), and TraCIServerAPI_Vehicle::processSet().
|
static |
Returns the MSLane associated to the key id if exists Otherwise returns 0.
Definition at line 819 of file MSLane.cpp.
References myDict.
|
inlinestatic |
|
inline |
Returns true if there is not a single vehicle on the lane.
Definition at line 425 of file MSLane.h.
References myVehBuffer, and myVehicles.
void MSLane::enteredByLaneChange | ( | MSVehicle * | v) |
Definition at line 1209 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), and myVehicleLengthSum.
Referenced by MSAbstractLaneChangeModel::startLaneChangeManeuver().
Executes planned vehicle movements with regards to right-of-way.
This method goes through all vehicles calling their executeMove method which causes vehicles to update their positions and speeds. Vehicles wich move to the next lane are stored in the targets lane buffer
Reimplemented in GUILane.
Definition at line 727 of file MSLane.cpp.
References MSVehicleTransfer::addVeh(), MSAbstractLaneChangeModel::alreadyMoved(), appropriate(), MSVehicle::executeMove(), getEdge(), Named::getID(), MSBaseVehicle::getID(), MSVehicle::getInfluencer(), MSVehicleTransfer::getInstance(), MSNet::getInstance(), MSVehicle::getLane(), MSVehicle::getLaneChangeModel(), getLength(), MSVehicleType::getLengthWithGap(), MSVehicle::getPositionOnLane(), MSAbstractLaneChangeModel::getShadowLane(), MSVehicle::getSpeed(), getSpeedLimit(), MSNet::getVehicleControl(), MSBaseVehicle::getVehicleType(), MSVehicle::getWaitingTime(), MSGlobals::gTimeToGridlock, MSGlobals::gTimeToGridlockHighways, MSVehicle::hasArrived(), MSVehicle::hasInfluencer(), MSAbstractLaneChangeModel::isChangingLanes(), MSVehicle::isParking(), MSVehicle::isStopped(), MSEdge::isVaporizing(), MSVehicle::Influencer::isVTDControlled(), MSVehicle::leaveLane(), myVehBuffer, myVehicleLengthSum, myVehicles, MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_VAPORIZED, MSVehicle::onRemovalFromNet(), MSVehicleControl::registerTeleport(), MSVehicleControl::scheduleVehicleRemoval(), SPEED2DIST, SUMOReal, time2string(), MSVehicle::workOnMoveReminders(), and WRITE_WARNING.
Referenced by GUILane::executeMovements().
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 617 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.
[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 268 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().
Definition at line 330 of file MSLane.h.
References interpolateLanePosToGeometryPos(), myShape, and PositionVector::positionAtOffset().
Referenced by NLHandler::addPOI(), GUIE3Collector::MyWrapper::buildDefinition(), GUIVehicle::drawGL(), MSVehicle::getPosition(), GUIInstantInductLoop::MyWrapper::MyWrapper(), and GUIInductLoop::MyWrapper::MyWrapper().
|
inline |
Returns the lane's edge.
Definition at line 442 of file MSLane.h.
References myEdge.
Referenced by addApproachingLane(), MSVehicle::addStop(), NLDetectorBuilder::buildInductLoop(), MSVehicle::checkRewindLinkLanes(), MSEdge::closeBuilding(), traci::TraCIServer::commandAddVehicle(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), MSVehicle::enterLaneAtMove(), MSVehicle::executeMove(), executeMovements(), MS_E2_ZS_CollectorOverLanes::extendTo(), MSVehicle::getBestLanes(), MSVehicle::getDistanceToPosition(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), getLogicalPredecessorLane(), MSVehicle::getPosition(), GUIVehicle::getPreviousLane(), isInsertionSuccess(), MSLane::edge_finder::operator()(), NLTriggerBuilder::parseAndBuildCalibrator(), MSLCM_DK2004::patchSpeed(), MSVehicle::planMoveInternal(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_Lane::processSet(), TraCIServerAPI_Vehicle::processSet(), succLinkSec(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
|
virtual |
Definition at line 892 of file MSLane.cpp.
References myVehicles.
Referenced by getFollowerOnConsecutive(), and getMissingRearGap().
std::pair< MSVehicle *const, SUMOReal > MSLane::getFollowerOnConsecutive | ( | SUMOReal | dist, |
SUMOReal | seen, | ||
SUMOReal | leaderSpeed, | ||
SUMOReal | backOffset, | ||
SUMOReal | predMaxDecel | ||
) | const |
Definition at line 1063 of file MSLane.cpp.
References MSVehicle::getCarFollowModel(), getFirstVehicle(), getIncomingLanes(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::IncomingLaneInfo::lane, MSLane::IncomingLaneInfo::length, MSCFModel::maxNextSpeed(), myIncomingLanes, SUMOReal, and MSLane::IncomingLaneInfo::viaLink.
SUMOReal MSLane::getHarmonoise_NoiseEmissions | ( | ) | const |
Returns the sum of last step noise emissions.
Definition at line 1316 of file MSLane.cpp.
References getVehiclesSecure(), releaseVehicles(), HelpersHarmonoise::sum(), and SUMOReal.
Referenced by GUILane::getColorValue(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
SUMOReal MSLane::getHBEFA_CO2Emissions | ( | ) | const |
Returns the sum of last step CO2 emissions.
Definition at line 1244 of file MSLane.cpp.
References getVehiclesSecure(), releaseVehicles(), and SUMOReal.
Referenced by GUILane::getNormedHBEFA_CO2Emissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
SUMOReal MSLane::getHBEFA_COEmissions | ( | ) | const |
Returns the sum of last step CO emissions.
Definition at line 1256 of file MSLane.cpp.
References getVehiclesSecure(), releaseVehicles(), and SUMOReal.
Referenced by GUILane::getNormedHBEFA_COEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
SUMOReal MSLane::getHBEFA_FuelConsumption | ( | ) | const |
Returns the sum of last step fuel consumption.
Definition at line 1304 of file MSLane.cpp.
References getVehiclesSecure(), releaseVehicles(), and SUMOReal.
Referenced by GUILane::getNormedHBEFA_FuelConsumption(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
SUMOReal MSLane::getHBEFA_HCEmissions | ( | ) | const |
Returns the sum of last step HC emissions.
Definition at line 1292 of file MSLane.cpp.
References getVehiclesSecure(), releaseVehicles(), and SUMOReal.
Referenced by GUILane::getNormedHBEFA_HCEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
SUMOReal MSLane::getHBEFA_NOxEmissions | ( | ) | const |
Returns the sum of last step NOx emissions.
Definition at line 1280 of file MSLane.cpp.
References getVehiclesSecure(), releaseVehicles(), and SUMOReal.
Referenced by GUILane::getNormedHBEFA_NOxEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
SUMOReal MSLane::getHBEFA_PMxEmissions | ( | ) | const |
Returns the sum of last step PMx emissions.
Definition at line 1268 of file MSLane.cpp.
References getVehiclesSecure(), releaseVehicles(), and SUMOReal.
Referenced by GUILane::getNormedHBEFA_PMxEmissions(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
|
inlineinherited |
Returns the id.
Definition at line 60 of file Named.h.
References Named::myID.
Referenced by NIImporter_SUMO::_loadNetwork(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), GUITrafficLightLogicWrapper::begin2TrackPhases(), 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(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), 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(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), RODFNet::getDetectorEdge(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), RODFDetectorCon::guessEmptyFlows(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), 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_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::notifyMove(), GUIViewTraffic::onGamingClick(), 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_Lane::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::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(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), GUITrafficLightLogicWrapper::switchTLSLogic(), 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(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().
|
inline |
Definition at line 525 of file MSLane.h.
References myIncomingLanes.
Referenced by getFollowerOnConsecutive(), getMissingRearGap(), and TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane().
|
virtual |
returns the last vehicle
Definition at line 883 of file MSLane.cpp.
References myVehicles.
Referenced by MSVehicle::checkRewindLinkLanes(), getLeaderOnConsecutive(), MSLaneChanger::getRealThisLeader(), isInsertionSuccess(), and MSLink::maybeOccupied().
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 645 of file MSLane.cpp.
References MSVehicleType::getLength(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getVehicleType(), myInlappingVehicle, myInlappingVehicleEnd, myVehicles, and SUMOReal.
Referenced by MSVehicle::planMoveInternal().
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.
[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 1113 of file MSLane.cpp.
References MSCFModel::brakeGap(), MSVehicle::getCarFollowModel(), MSNet::getCurrentTimeStep(), MSVehicle::getImpatience(), MSNet::getInstance(), getLastVehicle(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), getPartialOccupator(), getPartialOccupatorEnd(), getVehicleMaxSpeed(), MSBaseVehicle::getVehicleType(), isLinkEnd(), LINKSTATE_TL_RED, succLinkSec(), and TIME2STEPS.
Referenced by pWagGenericInsertion(), and pWagSimpleInsertion().
|
inline |
Returns the lane's length.
Definition at line 360 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(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUIVehicle::drawAction_drawRailCarriages(), MSVehicle::executeMove(), executeMovements(), MS_E2_ZS_CollectorOverLanes::extendTo(), MSVehicle::fixPosition(), freeInsertion(), MSVehicle::getBestLanes(), MSVehicle::getDistanceToPosition(), TraCIServerAPI_Simulation::getLaneChecking(), getLeaderOnConsecutive(), GUILane::getNormedHBEFA_CO2Emissions(), GUILane::getNormedHBEFA_COEmissions(), GUILane::getNormedHBEFA_FuelConsumption(), GUILane::getNormedHBEFA_HCEmissions(), GUILane::getNormedHBEFA_NOxEmissions(), GUILane::getNormedHBEFA_PMxEmissions(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), MSVehicle::getSpaceTillLastStanding(), MSActuatedTrafficLightLogic::init(), MS_E2_ZS_CollectorOverLanes::init(), insertVehicle(), isInsertionSuccess(), maxSpeedGapInsertion(), MSLink::maybeOccupied(), NLTriggerBuilder::parseAndBuildBusStop(), MSVehicle::planMoveInternal(), TraCIServerAPI_Lane::processGet(), pWagGenericInsertion(), pWagSimpleInsertion(), GUIVehicle::selectBlockingFoes(), MSVehicle::setBlinkerInformation(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_DK2004::wantsChangeToLeft(), MSLCM_DK2004::wantsChangeToRight(), MSMeanData::writeEdge(), and MSQueueExport::writeLane().
const MSLinkCont & MSLane::getLinkCont | ( | ) | const |
returns the container with all links !!!
Definition at line 945 of file MSLane.cpp.
References myLinks.
Referenced by MSVehicle::fixContinuations(), MSLinkContHelper::getConnectingLink(), MSEdge::parallelLane(), MSRightOfWayJunction::postloadInit(), TraCIServerAPI_Lane::processGet(), MSVehicle::setBlinkerInformation(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
MSLane * MSLane::getLogicalPredecessorLane | ( | ) | const |
Definition at line 1175 of file MSLane.cpp.
References getEdge(), MSEdge::getIncomingEdges(), myEdge, myIncomingLanes, and myLogicalPredecessorLane.
Referenced by MSAbstractLaneChangeModel::continueLaneChangeManeuver(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), MSEdge::parallelLane(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
|
inlineinherited |
Returns the inner key/value 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.
Definition at line 1228 of file MSLane.cpp.
References getVehiclesSecure(), myMaxSpeed, myVehicles, releaseVehicles(), and SUMOReal.
Referenced by TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
SUMOReal MSLane::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
Definition at line 1022 of file MSLane.cpp.
References MSVehicle::getCarFollowModel(), getFirstVehicle(), getIncomingLanes(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSCFModel::getSecureGap(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSLane::IncomingLaneInfo::lane, MSLane::IncomingLaneInfo::length, MAX2(), MSCFModel::maxNextSpeed(), myIncomingLanes, SUMOReal, and MSLane::IncomingLaneInfo::viaLink.
Referenced by isInsertionSuccess().
|
inline |
Return the list of this lane's move reminders.
Definition at line 146 of file MSLane.h.
References myMoveReminders.
Referenced by MSVehicle::adaptLaneEntering2MoveReminder(), MSVehicle::enterLaneAtInsertion(), and MSVehicle::enterLaneAtLaneChange().
|
inline |
Returns this lane's numerical id.
Definition at line 310 of file MSLane.h.
References myNumericalID.
SUMOReal MSLane::getOccupancy | ( | ) | const |
Returns the occupancy of this lane during the last step.
Definition at line 1216 of file MSLane.cpp.
References myLength, and myVehicleLengthSum.
Referenced by GUILane::getColorValue(), TraCIServerAPI_Lane::processGet(), and MSFullExport::writeLane().
Returns the lane with the given offset parallel to this one or 0 if it does not exist.
[in] | offset | The offset of the result lane |
Definition at line 972 of file MSLane.cpp.
References myEdge, and MSEdge::parallelLane().
Referenced by MSAbstractLaneChangeModel::continueLaneChangeManeuver(), and MSEdge::parallelLane().
|
inherited |
Returns the value for a given key.
[in] | key | The key to ask for |
[in] | defaultValue | The default value to return if no value is stored under the key |
Definition at line 81 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by MSDevice_Example::buildVehicleDevices(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSAgentbasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSAgentbasedTrafficLightLogic::MSAgentbasedTrafficLightLogic(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
|
inline |
Returns the vehicle which laps into this lane.
Definition at line 248 of file MSLane.h.
References myInlappingVehicle.
Referenced by MSVehicle::checkRewindLinkLanes(), MSE2Collector::detectorUpdate(), freeInsertion(), getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), MSLaneChanger::getRealThisLeader(), isInsertionSuccess(), maxSpeedGapInsertion(), MSLink::maybeOccupied(), MSE2Collector::by_vehicle_position_sorter::operator()(), MSVehicle::planMoveInternal(), and planMovements().
|
inline |
Returns the position of the in-lapping vehicle's end.
Definition at line 256 of file MSLane.h.
References myInlappingVehicleEnd.
Referenced by MSVehicle::checkRewindLinkLanes(), MSE2Collector::detectorUpdate(), freeInsertion(), getLeaderOnConsecutive(), MSLaneChanger::getRealLeader(), MSLaneChanger::getRealThisLeader(), isInsertionSuccess(), maxSpeedGapInsertion(), MSLink::maybeOccupied(), and MSVehicle::planMoveInternal().
|
inline |
Returns the vehicle class permissions for this lane.
Definition at line 368 of file MSLane.h.
References myPermissions.
Referenced by TraCIServerAPI_Lane::processGet().
|
inline |
Returns this lane's shape.
Definition at line 318 of file MSLane.h.
References myShape.
Referenced by NLHandler::addConnection(), GUIE3Collector::MyWrapper::buildDefinition(), traci::TraCIServer::collectObjectsInRange(), GUIVehicle::drawAction_drawRailCarriages(), GUIVehicle::drawGLAdditional(), GUILane::drawLane2LaneConnections(), MSVTypeProbe::execute(), MSVehicle::getAngle(), MSPerson::MSPersonStage::getEdgePosition(), TraCIServerAPI_InductionLoop::getPosition(), TraCIServerAPI_Lane::getShape(), MSVTKExport::getSpeed(), TraCIServerAPI_InductionLoop::getTree(), GUIBusStop::GUIBusStop(), MSCFModel_KraussPS::maxNextSpeed(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), MSLane::by_connections_to_sorter::operator()(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingNearest(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSFCDExport::write(), MSEmissionExport::write(), and MSFullExport::writeVehicles().
|
inline |
Returns the lane's maximum allowed speed.
Definition at line 352 of file MSLane.h.
References myMaxSpeed.
Referenced by MSVehicleTransfer::checkInsertions(), MSAbstractLaneChangeModel::congested(), executeMovements(), GUILane::getColorValue(), GUILane::getParameterWindow(), MSActuatedTrafficLightLogic::init(), MSVehicle::MSVehicle(), TraCIServerAPI_Lane::processGet(), MSMeanData::writeEdge(), and MSFullExport::writeLane().
|
inline |
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
[in] | The | vehicle to return the adapted speed limit for |
Definition at line 344 of file MSLane.h.
References SUMOVehicle::getChosenSpeedFactor(), and myMaxSpeed.
Referenced by traci::TraCIServer::commandAddVehicle(), MSCFModel_IDM::desiredSpeed(), MSVehicle::estimateLeaveSpeed(), getLeaderOnConsecutive(), insertVehicle(), MSCFModel::interactionGap(), isInsertionSuccess(), MSCFModel_SmartSK::moveHelper(), MSCFModel_Daniel1::moveHelper(), MSCFModel_KraussOrig1::moveHelper(), MSCFModel::moveHelper(), MSVehicle::planMoveInternal(), MSVehicle::setBlinkerInformation(), MSLCM_DK2004::wantsChangeToLeft(), and MSLCM_DK2004::wantsChangeToRight().
|
inline |
Returns the number of vehicles on this lane.
Definition at line 280 of file MSLane.h.
References myVehicles.
Referenced by MSVehicle::checkRewindLinkLanes(), MSEdge::getFreeLane(), TraCIServerAPI_Lane::processGet(), MSQueueExport::writeLane(), MSFullExport::writeLane(), and MSXMLRawOut::writeLane().
|
inlinevirtual |
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.
Definition at line 291 of file MSLane.h.
References myVehicles.
Referenced by traci::TraCIServer::collectObjectsInRange(), getHarmonoise_NoiseEmissions(), getHBEFA_CO2Emissions(), getHBEFA_COEmissions(), getHBEFA_FuelConsumption(), getHBEFA_HCEmissions(), getHBEFA_NOxEmissions(), getHBEFA_PMxEmissions(), getMeanSpeed(), MSVehicle::getSpaceTillLastStanding(), MSDevice_BTreceiver::notifyMove(), and TraCIServerAPI_Lane::processGet().
SUMOReal MSLane::getVehLenSum | ( | ) | const |
Returns the sum of lengths of vehicles which were on the lane during the last step.
Definition at line 1222 of file MSLane.cpp.
References myVehicleLengthSum.
Referenced by MSVehicle::checkRewindLinkLanes().
|
inline |
Returns the lane's width.
Definition at line 376 of file MSLane.h.
References myWidth.
Referenced by MSAbstractLaneChangeModel::continueLaneChangeManeuver(), and TraCIServerAPI_Lane::processGet().
|
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
[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.
Definition at line 123 of file MSLane.cpp.
References MSVehicle::enterLaneAtInsertion(), MSNet::getEdgeControl(), MSNet::getInstance(), MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSEdgeControl::gotActive(), myLength, myVehicleLengthSum, and myVehicles.
Referenced by forceVehicleInsertion(), GUILane::incorporateVehicle(), isInsertionSuccess(), loadState(), maxSpeedGapInsertion(), pWagGenericInsertion(), and pWagSimpleInsertion().
|
static |
Definition at line 839 of file MSLane.cpp.
References myDict.
Referenced by TraCIServerAPI_Lane::processGet().
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 335 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().
Insert buffered vehicle into the real lane.
Reimplemented in GUILane.
Definition at line 857 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), myVehBuffer, myVehicleLengthSum, and myVehicles.
Referenced by GUILane::integrateNewVehicle().
Definition at line 336 of file MSLane.h.
References myLengthGeometryFactor.
Referenced by GUILane::getPopUpMenu(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
Definition at line 324 of file MSLane.h.
References myLengthGeometryFactor.
Referenced by geometryPositionAtOffset(), MSPerson::MSPersonStage::getEdgePosition(), MSVehicle::getPosition(), and MSCFModel_KraussPS::maxNextSpeed().
Definition at line 998 of file MSLane.cpp.
References myApproachingLanes.
Definition at line 1004 of file MSLane.cpp.
References myApproachingLanes.
|
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.
[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 405 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(), MSVehicle::getImpatience(), 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(), LINKSTATE_ALLWAY_STOP, LINKSTATE_EQUAL, LINKSTATE_MINOR, LINKSTATE_STOP, MIN2(), myLength, myMaxSpeed, myVehicles, MSMoveReminder::NOTIFICATION_TELEPORT, MSCFModel::stopSpeed(), 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 871 of file MSLane.cpp.
References myLinks.
Referenced by getLeaderOnConsecutive(), MSLaneChanger::getRealThisLeader(), isInsertionSuccess(), and MSVehicle::planMoveInternal().
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 877 of file MSLane.cpp.
References myLinks.
|
inherited |
Returns whether the parameter is known.
[in] | key | The key to ask for |
Definition at line 75 of file Parameterised.cpp.
References Parameterised::myMap.
Referenced by MSDevice_Example::buildVehicleDevices(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
void MSLane::leftByLaneChange | ( | MSVehicle * | v) |
Definition at line 1203 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), and myVehicleLengthSum.
Referenced by MSAbstractLaneChangeModel::startLaneChangeManeuver().
void MSLane::loadState | ( | std::vector< std::string > & | vehIDs, |
MSVehicleControl & | vc | ||
) |
Loads the state of this segment with the given parameters.
This method is called for every internal que the segment has. Every vehicle is retrieved from the given MSVehicleControl and added to this lane.
[in] | vehIDs | The vehicle ids for the current que |
[in] | vc | The vehicle control to retrieve references vehicles from |
What about throwing an IOError?
What about throwing an error if something else fails (a vehicle can not be referenced)?
Definition at line 1376 of file MSLane.cpp.
References MSVehicle::getBestLanes(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSVehicleControl::getVehicle(), incorporateVehicle(), myVehicles, and MSMoveReminder::NOTIFICATION_JUNCTION.
Definition at line 219 of file MSLane.cpp.
References MSVehicle::getCarFollowModel(), MSCFModel::getHeadwayTime(), MSVehicleType::getLength(), getLength(), MSVehicleType::getLengthWithGap(), MSCFModel::getMaxDecel(), getPartialOccupator(), getPartialOccupatorEnd(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), incorporateVehicle(), isInsertionSuccess(), MIN2(), myLength, myVehicles, and SUMOReal.
Referenced by insertVehicle().
|
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.
Reimplemented in GUILane.
Definition at line 662 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), getPartialOccupator(), MSBaseVehicle::getVehicleType(), myVehicles, and SUMOReal.
Referenced by GUILane::planMovements().
bool MSLane::pWagGenericInsertion | ( | MSVehicle & | veh, |
SUMOReal | speed, | ||
SUMOReal | maxPos, | ||
SUMOReal | minPos | ||
) |
Definition at line 141 of file MSLane.cpp.
References MSCFModel::brakeGap(), MSCFModel::followSpeed(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), getLeaderOnConsecutive(), MSVehicleType::getLength(), getLength(), MSCFModel::getMaxDecel(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), incorporateVehicle(), myVehicles, and SUMOReal.
Referenced by insertVehicle().
bool MSLane::pWagSimpleInsertion | ( | MSVehicle & | veh, |
SUMOReal | speed, | ||
SUMOReal | maxPos, | ||
SUMOReal | minPos | ||
) |
Definition at line 187 of file MSLane.cpp.
References MSCFModel::brakeGap(), MSVehicle::getBestLanes(), MSVehicle::getBestLanesContinuation(), MSVehicle::getCarFollowModel(), MSCFModel::getHeadwayTime(), getLeaderOnConsecutive(), MSVehicleType::getLength(), getLength(), MSVehicleType::getMinGap(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), incorporateVehicle(), myVehicles, and SUMOReal.
Referenced by insertVehicle().
|
inlinevirtual |
Allows to use the container for microsimulation again.
Reimplemented in GUILane.
Definition at line 298 of file MSLane.h.
Referenced by traci::TraCIServer::collectObjectsInRange(), getHarmonoise_NoiseEmissions(), getHBEFA_CO2Emissions(), getHBEFA_COEmissions(), getHBEFA_FuelConsumption(), getHBEFA_HCEmissions(), getHBEFA_NOxEmissions(), getHBEFA_PMxEmissions(), getMeanSpeed(), MSVehicle::getSpaceTillLastStanding(), MSDevice_BTreceiver::notifyMove(), and TraCIServerAPI_Lane::processGet().
|
virtual |
remove the vehicle from this lane
Reimplemented in GUILane.
Definition at line 958 of file MSLane.cpp.
References MSVehicleType::getLengthWithGap(), MSBaseVehicle::getVehicleType(), MSVehicle::leaveLane(), myVehicleLengthSum, and myVehicles.
Referenced by MSCalibrator::execute(), MSVehicle::Influencer::postProcessVTD(), TraCIServerAPI_Vehicle::processSet(), MSAbstractLaneChangeModel::removeLaneChangeShadow(), and GUILane::removeVehicle().
void MSLane::resetPartialOccupation | ( | MSVehicle * | v) |
Removes the information about a vehicle lapping into this lane.
[in] | v | The vehicle which laps into this lane |
Definition at line 636 of file MSLane.cpp.
References myInlappingVehicle, and myInlappingVehicleEnd.
void MSLane::saveState | ( | OutputDevice & | out) |
Saves the state of this lane into the given stream.
Basically, a list of vehicle ids
in,filled] | out The (possibly binary) device to write the state into |
Definition at line 1366 of file MSLane.cpp.
References OutputDevice::closeTag(), myVehicles, OutputDevice::openTag(), SUMO_ATTR_VALUE, SUMO_TAG_LANE, SUMO_TAG_VIEWSETTINGS_VEHICLES, and OutputDevice::writeAttr().
|
inlineinherited |
resets the id
[in] | newID | The new id of this object |
Definition at line 68 of file Named.h.
References Named::myID.
Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().
|
inline |
Definition at line 434 of file MSLane.h.
References myLength.
Referenced by TraCIServerAPI_Lane::processSet().
|
inline |
Definition at line 430 of file MSLane.h.
References myMaxSpeed.
Referenced by TraCIServerAPI_Lane::processSet().
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 624 of file MSLane.cpp.
References myInlappingVehicle, myInlappingVehicleEnd, and myLength.
|
inline |
Definition at line 507 of file MSLane.h.
References myPermissions.
Referenced by TraCIServerAPI_Lane::processSet().
|
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 901 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::planMoveInternal(), and MSVehicle::setBlinkerInformation().
|
protectedvirtual |
moves myTmpVehicles int myVehicles after a lane change procedure
Reimplemented in GUILane.
Definition at line 951 of file MSLane.cpp.
References myTmpVehicles, and myVehicles.
Referenced by GUILane::swapAfterLaneChange().
|
friend |
|
friend |
|
friend |
Definition at line 739 of file MSLane.h.
Referenced by addApproachingLane(), and isApproachedFrom().
|
staticprotected |
Static dictionary to associate string-ids with objects.
Definition at line 748 of file MSLane.h.
Referenced by clear(), dictionary(), dictSize(), and insertIDs().
|
protected |
The lane's edge, for routing only.
Definition at line 705 of file MSLane.h.
Referenced by appropriate(), GUILane::drawGL(), GUILane::getColorValue(), getEdge(), GUILane::getEdgeLaneNumber(), getLogicalPredecessorLane(), getParallelLane(), GUILane::getParameterWindow(), GUILane::getStoredEdgeTravelTime(), and MSLane::by_connections_to_sorter::operator()().
|
protectedinherited |
The name of the object.
Definition at line 121 of file Named.h.
Referenced by GUI_E2_ZS_CollectorOverLanes::buildCollector(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSCalibrator::execute(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), RORouteDef::repairCurrentRoute(), Named::setID(), NBEdge::splitGeometry(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MSCalibrator::writeXMLOutput(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
protected |
Definition at line 721 of file MSLane.h.
Referenced by addIncomingLane(), getFollowerOnConsecutive(), getIncomingLanes(), getLogicalPredecessorLane(), and getMissingRearGap().
|
protected |
The vehicle which laps into this lane.
Definition at line 732 of file MSLane.h.
Referenced by getLastVehicleInformation(), getPartialOccupator(), resetPartialOccupation(), and setPartialOccupation().
|
protected |
End position of a vehicle which laps into this lane.
Definition at line 729 of file MSLane.h.
Referenced by getLastVehicleInformation(), getPartialOccupatorEnd(), resetPartialOccupation(), and setPartialOccupation().
|
protected |
Lane length [m].
Definition at line 699 of file MSLane.h.
Referenced by GUILane::getColorValue(), getLength(), getOccupancy(), GUILane::getParameterWindow(), incorporateVehicle(), insertVehicle(), isInsertionSuccess(), maxSpeedGapInsertion(), setLength(), and setPartialOccupation().
|
protected |
Definition at line 742 of file MSLane.h.
Referenced by GUILane::getColorValue(), interpolateGeometryPosToLanePos(), and interpolateLanePosToGeometryPos().
|
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 737 of file MSLane.h.
Referenced by addLink(), appropriate(), GUILane::drawArrows(), GUILane::drawLane2LaneConnections(), GUILane::drawLinkNo(), GUILane::drawLinkRules(), GUILane::drawTLSLinkNo(), getLinkCont(), isLinkEnd(), succLinkSec(), and ~MSLane().
|
mutableprotected |
Definition at line 722 of file MSLane.h.
Referenced by getLogicalPredecessorLane().
|
protected |
Lane-wide speedlimit [m/s].
Definition at line 708 of file MSLane.h.
Referenced by getMeanSpeed(), getSpeedLimit(), getVehicleMaxSpeed(), isInsertionSuccess(), and setMaxSpeed().
|
private |
This lane's move reminder.
Definition at line 752 of file MSLane.h.
Referenced by addMoveReminder(), and getMoveReminders().
|
protected |
Unique numerical ID (set on reading by netload)
Definition at line 687 of file MSLane.h.
Referenced by getNumericalID().
|
protected |
The vClass permissions for this lane.
Definition at line 719 of file MSLane.h.
Referenced by allowsVehicleClass(), GUILane::drawGL(), GUILane::drawLinkRules(), GUILane::getParameterWindow(), getPermissions(), and setPermissions().
PositionVector MSLane::myShape |
The shape of the lane.
Definition at line 493 of file MSLane.h.
Referenced by GUILane::drawGL(), geometryPositionAtOffset(), GUILane::getCenteringBoundary(), GUILane::getPopUpMenu(), GUILane::getShape(), getShape(), and GUILane::GUILane().
|
protected |
Container for lane-changing vehicles. After completion of lane-change- process, the two containers will be swapped.
Definition at line 712 of file MSLane.h.
Referenced by swapAfterLaneChange().
|
protected |
buffer for vehicles that moved from their previous lane onto this one
Definition at line 716 of file MSLane.h.
Referenced by empty(), executeMovements(), integrateNewVehicle(), MSQueueExport::writeLane(), and MSXMLRawOut::writeLane().
|
protected |
The current length of all vehicles on this lane.
Definition at line 726 of file MSLane.h.
Referenced by detectCollisions(), enteredByLaneChange(), executeMovements(), getOccupancy(), getVehLenSum(), incorporateVehicle(), integrateNewVehicle(), leftByLaneChange(), and removeVehicle().
|
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 696 of file MSLane.h.
Referenced by addMoveReminder(), detectCollisions(), empty(), executeMovements(), GUILane::firstWaitingTime(), forceVehicleInsertion(), freeInsertion(), getFirstVehicle(), getLastVehicle(), getLastVehicleInformation(), getMeanSpeed(), getVehicleNumber(), GUILane::getVehiclesSecure(), getVehiclesSecure(), incorporateVehicle(), integrateNewVehicle(), isInsertionSuccess(), loadState(), maxSpeedGapInsertion(), planMovements(), pWagGenericInsertion(), pWagSimpleInsertion(), removeVehicle(), saveState(), swapAfterLaneChange(), MSQueueExport::writeLane(), and MSXMLRawOut::writeLane().
|
protected |
Lane width [m].
Definition at line 702 of file MSLane.h.
Referenced by GUILane::drawLinkNo(), GUILane::drawLinkRules(), GUILane::drawTLSLinkNo(), getWidth(), and GUILane::GUILane().