SUMO - Simulation of Urban MObility
MSRoute Class Reference

#include <MSRoute.h>

Inheritance diagram for MSRoute:
Inheritance graph
Collaboration diagram for MSRoute:
Collaboration graph

Public Member Functions

void addReference () const
 increments the reference counter for the route More...
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
MSRouteIterator begin () const
 Returns the begin of the list of edges to pass. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
bool contains (const MSEdge *const edge) const
 
bool containsAnyOf (const MSEdgeVector &edgelist) const
 
MSRouteIterator end () const
 Returns the end of the list of edges to pass. More...
 
const RGBColorgetColor () const
 Returns the color. More...
 
double getCosts () const
 Returns the costs of the route. More...
 
double getDistanceBetween (double fromPos, double toPos, const MSEdge *fromEdge, const MSEdge *toEdge, bool includeInternal=true) const
 Compute the distance between 2 given edges on this route, including the length of internal lanes. Note, that for edges which contain loops: More...
 
double getDistanceBetween (double fromPos, double toPos, const MSRouteIterator &fromEdge, const MSRouteIterator &toEdge, bool includeInternal=true) const
 Compute the distance between 2 given edges on this route, including the length of internal lanes. This has the same semantics as above but uses iterators instead of edge points so looping routes are not an issue. More...
 
double getDouble (const std::string &key, const double defaultValue) const
 Returns the value for a given key converted to a double. More...
 
const ConstMSEdgeVectorgetEdges () const
 
const std::string & getID () const
 Returns the id. More...
 
const MSEdgegetLastEdge () const
 returns the destination edge More...
 
const std::map< std::string, std::string > & getMap () const
 Returns the inner key/value map. More...
 
const std::string getParameter (const std::string &key, const std::string &defaultValue="") const
 Returns the value for a given key. More...
 
const std::vector< SUMOVehicleParameter::Stop > & getStops () const
 Returns the stops. More...
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
 MSRoute (const std::string &id, const ConstMSEdgeVector &edges, const bool isPermanent, const RGBColor *const c, const std::vector< SUMOVehicleParameter::Stop > &stops)
 Constructor. More...
 
const MSEdgeoperator[] (int index) const
 
void release () const
 deletes the route if there are no further references to it More...
 
void setCosts (double costs)
 Sets the costs of the route. More...
 
void setID (const std::string &newID)
 resets the id More...
 
void setParameter (const std::string &key, const std::string &value)
 Sets a parameter. More...
 
int size () const
 Returns the number of edges to pass. More...
 
void unsetParameter (const std::string &key)
 Removes a parameter. More...
 
void updateParameter (const std::map< std::string, std::string > &mapArg)
 Adds or updates all given parameters from the map. More...
 
int writeEdgeIDs (OutputDevice &os, const MSEdge *const from, const MSEdge *const upTo=0) const
 Output the edge ids up to but not including the id of the given edge. More...
 
void writeParams (OutputDevice &out) const
 
virtual ~MSRoute ()
 Destructor. More...
 

Static Public Member Functions

static void checkDist (const std::string &id)
 Checks the distribution whether it is permanent and deletes it if not. More...
 
static void clear ()
 Clears the dictionary (delete all known routes, too) More...
 
static bool dictionary (const std::string &id, const MSRoute *route)
 Adds a route to the dictionary. More...
 
static bool dictionary (const std::string &id, RandomDistributor< const MSRoute *> *const routeDist, const bool permanent=true)
 Adds a route distribution to the dictionary. More...
 
static const MSRoutedictionary (const std::string &id, std::mt19937 *rng=0)
 Returns the named route or a sample from the named distribution. More...
 
static RandomDistributor< const MSRoute * > * distDictionary (const std::string &id)
 Returns the named route distribution. More...
 
template<class T >
static std::string getIDSecure (const T *obj, const std::string &fallBack="NULL")
 get an identifier for Named-like object which may be Null More...
 
static void insertIDs (std::vector< std::string > &into)
 
State I/O (mesosim only)
static void dict_saveState (OutputDevice &out)
 Saves all known routes into the given stream. More...
 

Protected Attributes

std::string myID
 The name of the object. More...
 

Private Types

typedef std::map< std::string, const MSRoute * > RouteDict
 Definition of the dictionary container. More...
 
typedef std::map< std::string, std::pair< RandomDistributor< const MSRoute * > *, bool > > RouteDistDict
 Definition of the dictionary container. More...
 

Private Member Functions

MSRouteoperator= (const MSRoute &s)
 

Private Attributes

const bool myAmPermanent
 whether the route may be deleted after the last vehicle abandoned it More...
 
const RGBColor *const myColor
 The color. More...
 
double myCosts
 The assigned or calculated costs. More...
 
ConstMSEdgeVector myEdges
 The list of edges to pass. More...
 
int myReferenceCounter
 Information by how many vehicles the route is used. More...
 
std::vector< SUMOVehicleParameter::StopmyStops
 List of the stops on the parsed route. More...
 

Static Private Attributes

static RouteDict myDict
 The dictionary container. More...
 
static RouteDistDict myDistDict
 The dictionary container. More...
 

Detailed Description

Definition at line 73 of file MSRoute.h.

Member Typedef Documentation

◆ RouteDict

typedef std::map<std::string, const MSRoute*> MSRoute::RouteDict
private

Definition of the dictionary container.

Definition at line 252 of file MSRoute.h.

◆ RouteDistDict

typedef std::map<std::string, std::pair<RandomDistributor<const MSRoute*>*, bool> > MSRoute::RouteDistDict
private

Definition of the dictionary container.

Definition at line 258 of file MSRoute.h.

Constructor & Destructor Documentation

◆ MSRoute()

MSRoute::MSRoute ( const std::string &  id,
const ConstMSEdgeVector edges,
const bool  isPermanent,
const RGBColor *const  c,
const std::vector< SUMOVehicleParameter::Stop > &  stops 
)

Constructor.

Definition at line 58 of file MSRoute.cpp.

◆ ~MSRoute()

MSRoute::~MSRoute ( )
virtual

Destructor.

Definition at line 67 of file MSRoute.cpp.

References myColor.

Member Function Documentation

◆ addReference()

◆ addTo()

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters

Definition at line 119 of file Named.h.

References Named::StoringVisitor::add().

◆ begin()

◆ checkDist()

void MSRoute::checkDist ( const std::string &  id)
static

Checks the distribution whether it is permanent and deletes it if not.

Definition at line 189 of file MSRoute.cpp.

References myDistDict.

Referenced by MSInsertionControl::determineCandidates(), setCosts(), MSRouteProbe::writeXMLOutput(), and MSBaseVehicle::~MSBaseVehicle().

◆ clear()

void MSRoute::clear ( )
static

Clears the dictionary (delete all known routes, too)

Definition at line 173 of file MSRoute.cpp.

References myDict, and myDistDict.

Referenced by MSNet::clearAll(), and setCosts().

◆ clearParameter()

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 97 of file Parameterised.cpp.

References Parameterised::myMap.

◆ contains()

bool MSRoute::contains ( const MSEdge *const  edge) const
inline

◆ containsAnyOf()

bool MSRoute::containsAnyOf ( const MSEdgeVector edgelist) const

◆ dict_saveState()

void MSRoute::dict_saveState ( OutputDevice out)
static

Saves all known routes into the given stream.

Parameters
[in]osThe stream to write the routes into (binary)

Definition at line 260 of file MSRoute.cpp.

References OutputDevice::closeTag(), myDict, myDistDict, OutputDevice::openTag(), SUMO_ATTR_EDGES, SUMO_ATTR_ID, SUMO_ATTR_PROBS, SUMO_ATTR_ROUTES, SUMO_ATTR_STATE, SUMO_TAG_ROUTE, SUMO_TAG_ROUTE_DISTRIBUTION, and OutputDevice::writeAttr().

Referenced by contains(), and MSStateHandler::saveState().

◆ dictionary() [1/3]

◆ dictionary() [2/3]

bool MSRoute::dictionary ( const std::string &  id,
RandomDistributor< const MSRoute *> *const  routeDist,
const bool  permanent = true 
)
static

Adds a route distribution to the dictionary.

Returns true if the distribution could be added, false if a route (distribution) with the same name already exists.

Parameters
[in]idthe id for the new route distribution
[in]routeDistpointer to the distribution object
[in]permanentwhether the new route distribution survives more than one vehicle / flow
Returns
whether adding was successful

Definition at line 130 of file MSRoute.cpp.

References myDict, and myDistDict.

◆ dictionary() [3/3]

const MSRoute * MSRoute::dictionary ( const std::string &  id,
std::mt19937 *  rng = 0 
)
static

Returns the named route or a sample from the named distribution.

Returns 0 if no route and no distribution with the given name exists or if the distribution exists and is empty.

Parameters
[in]idthe id of the route or the distribution
Returns
the route (sample)

Definition at line 143 of file MSRoute.cpp.

References myDict, and myDistDict.

◆ distDictionary()

RandomDistributor< const MSRoute * > * MSRoute::distDictionary ( const std::string &  id)
static

Returns the named route distribution.

Returns 0 if no route distribution with the given name exists.

Parameters
[in]idthe id of the route distribution
Returns
the route distribution

Definition at line 160 of file MSRoute.cpp.

References myDistDict.

Referenced by MSRouteProbe::MSRouteProbe(), setCosts(), and MSDevice_Vehroutes::writeOutput().

◆ end()

◆ getColor()

const RGBColor & MSRoute::getColor ( ) const

◆ getCosts()

double MSRoute::getCosts ( ) const
inline

Returns the costs of the route.

Returns
The route's costs (normally the time needed to pass it)

Definition at line 165 of file MSRoute.h.

References myCosts.

◆ getDistanceBetween() [1/2]

double MSRoute::getDistanceBetween ( double  fromPos,
double  toPos,
const MSEdge fromEdge,
const MSEdge toEdge,
bool  includeInternal = true 
) const

Compute the distance between 2 given edges on this route, including the length of internal lanes. Note, that for edges which contain loops:

  • the first occurance of fromEdge will be used
  • the first occurance of toEdge after the first occurance of fromEdge will be used
Parameters
[in]fromPosposition on the first edge, at wich the computed distance begins
[in]toPosposition on the last edge, at which the coumputed distance endsance
[in]fromEdgeedge at wich computation begins
[in]toEdgeedge at which distance computation shall stop
[in]includeInternalWhether the lengths of internal edges shall be counted
Returns
distance between the position fromPos on fromEdge and toPos on toEdge

XXX routes that start and end within the same intersection are not supported

Definition at line 280 of file MSRoute.cpp.

References MSEdge::getLength(), MSEdge::getPredecessors(), MSEdge::getSuccessors(), MSEdge::isInternal(), and myEdges.

Referenced by TraCIServerAPI_Simulation::commandDistanceRequest(), MSDevice_Tripinfo::computeLengthAndDuration(), libsumo::Vehicle::getDistance(), MSVehicle::getDistanceToPosition(), libsumo::Vehicle::getDrivingDistance(), libsumo::Vehicle::getDrivingDistance2D(), getEdges(), MSTriggeredRerouter::rerouteParkingArea(), MSTransportable::Stage_Driving::setArrived(), MSTransportable::Stage_Driving::setVehicle(), and MSDevice_Vehroutes::writeOutput().

◆ getDistanceBetween() [2/2]

double MSRoute::getDistanceBetween ( double  fromPos,
double  toPos,
const MSRouteIterator fromEdge,
const MSRouteIterator toEdge,
bool  includeInternal = true 
) const

Compute the distance between 2 given edges on this route, including the length of internal lanes. This has the same semantics as above but uses iterators instead of edge points so looping routes are not an issue.

Parameters
[in]fromPosposition on the first edge, at wich the computed distance begins
[in]toPosposition on the last edge, at which the coumputed distance endsance
[in]fromEdgeedge at wich computation begins
[in]toEdgeedge at which distance computation shall stop
[in]includeInternalWhether the lengths of internal edges shall be counted
Returns
distance between the position fromPos on fromEdge and toPos on toEdge

Definition at line 323 of file MSRoute.cpp.

References end().

◆ getDouble()

double Parameterised::getDouble ( const std::string &  key,
const double  defaultValue 
) const
inherited

Returns the value for a given key converted to a double.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 87 of file Parameterised.cpp.

References TplConvert::_2double(), and Parameterised::myMap.

Referenced by MSDevice_Battery::buildVehicleDevices().

◆ getEdges()

◆ getID()

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

Returns the id.

Returns
The stored id

Definition at line 74 of file Named.h.

Referenced by NIImporter_SUMO::_loadNetwork(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), LaneStoringVisitor::add(), MSPModel_Striping::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), ShapeContainer::add(), IntermodalRouter< E, L, N, V >::addAccess(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIXMLConnectionsHandler::addCrossing(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), NBEdge::addStraightConnections(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), NBEdge::append(), NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NLDetectorBuilder::buildE2Detector(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSLane::checkForPedestrians(), NBEdge::checkGeometry(), NBEdgeCont::checkGrade(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), NBEdgeCont::checkOverlap(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBEdge::computeAngle(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistricts(), NBEdge::divideOnEdges(), NBEdge::divideSelectedLanesOnEdges(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSTrafficLightLogic::SwitchCommand::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), libsumo::Helper::findCloserLane(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), GNEConnection::getAttribute(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), NBEdge::getConnection(), NBEdge::getConnectionRef(), libsumo::TrafficLight::getControlledLinks(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), MSMeanData::getEdgeID(), NBEdge::getFirstNonPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), libsumo::InductionLoop::getLaneID(), libsumo::LaneArea::getLaneID(), libsumo::Vehicle::getLaneID(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), libsumo::Lane::getLinks(), MSLane::getLinkTo(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), GUITrafficLightLogicWrapper::getParameterWindow(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIMEInductLoop::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBPTStopCont::getReverseStop(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), libsumo::Vehicle::getRouteID(), MSNet::getStoppingPlaceID(), MSDevice_SSM::getUpstreamVehicles(), MSDevice_SSM::getVehiclesOnJunction(), MSTransportable::Stage_Driving::getWaitingDescription(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), NBEdgeCont::ignoreFilterMatch(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NBEdge::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicle(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), RODFNet::isSource(), MSSOTLTrafficLightLogic::isThresholdPassed(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), NBEdge::MainDirections::MainDirections(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), GNEJunction::markAsModified(), MSSOTLE2Sensors::meanVehiclesSpeed(), METriggeredCalibrator::METriggeredCalibrator(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSCalibrator::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSPModel_Striping::nextBlocking(), MSDevice_BTreceiver::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Example::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), GUIViewTraffic::onGamingClick(), GNEViewNet::onLeftBtnPress(), MSLink::opened(), RORouteHandler::openRoute(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NLTriggerBuilder::parseAndBuildCalibrator(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), NBEdge::prepareEdgePriorities(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLinkAproaches(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSDelayBasedTrafficLightLogic::proposeProlongation(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckLanes(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), MSLink::removeApproaching(), NBNodeCont::removeIsolatedRoads(), MSVehicle::removePassedDriveItems(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSVehicle::replaceParkingArea(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIImporter_DlrNavteq::ConnectedLanesHandler::report(), MSBaseVehicle::reroute(), MSTriggeredRerouter::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), NBEdge::restoreRestrictedLane(), GNEEdge::retrieveGNEConnection(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), NBPTLineCont::reviseStops(), MSPerson::MSPersonStage_Walking::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), RONet::saveAndRemoveRoutesUntil(), MSDevice_Vehroutes::saveState(), MSDevice::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), GNEJunction::setLogicValid(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), IntermodalRouter< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSSOTLTrafficLightLogic::trySwitch(), MSDevice_SSM::update(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), GNETLSEditorFrame::updateDescription(), MSVehicle::updateDriveItems(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), MSPModel_Striping::PState::walk(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_DlrNavteq::writeConnectedLanes(), 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_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_OpenDrive::writeNormalEdge(), NWWriter_DlrNavteq::writeProhibitedManoeuvres(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMOPolygon::writeXML(), PointOfInterest::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

◆ getLastEdge()

◆ getMap()

◆ getParameter()

const std::string Parameterised::getParameter ( const std::string &  key,
const std::string &  defaultValue = "" 
) const
inherited

Returns the value for a given key.

Parameters
[in]keyThe key to ask for
[in]defaultValueThe default value to return if no value is stored under the key
Returns
The value stored under the key

Definition at line 77 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), NBEdge::addRestrictedLane(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLRequestTrafficLightLogic::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), MSDevice_SSM::getOutputFilename(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), libsumo::Edge::getParameter(), libsumo::Polygon::getParameter(), libsumo::Route::getParameter(), libsumo::POI::getParameter(), libsumo::TrafficLight::getParameter(), libsumo::VehicleType::getParameter(), libsumo::Person::getParameter(), libsumo::Lane::getParameter(), libsumo::Vehicle::getParameter(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSSOTLTrafficLightLogic::getThreshold(), MSTriggeredRerouter::getWeight(), PushButtonLogic::init(), MSSOTLPhasePolicy::init(), SigmoidLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NIImporter_OpenStreetMap::insertEdge(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSSOTLTrafficLightLogic::isPushButtonPressed(), libsumo::Helper::moveToXYMap(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSSwarmTrafficLightLogic::MSSwarmTrafficLightLogic(), MSSOTLPolicyDesirability::readParameter(), MSDevice_SSM::requestsTrajectories(), NBEdgeCont::splitAt(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), MSDevice_SSM::useGeoCoords(), and NWWriter_DlrNavteq::writeLinksUnsplitted().

◆ getStops()

◆ insertIDs()

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

Definition at line 206 of file MSRoute.cpp.

References myDict, and myDistDict.

Referenced by libsumo::Route::getIDList(), and setCosts().

◆ knowsParameter()

◆ operator=()

MSRoute& MSRoute::operator= ( const MSRoute s)
private

invalid assignment operator

◆ operator[]()

const MSEdge * MSRoute::operator[] ( int  index) const

Definition at line 254 of file MSRoute.cpp.

References myEdges.

Referenced by contains().

◆ release()

◆ setCosts()

void MSRoute::setCosts ( double  costs)
inline

Sets the costs of the route.

Parameters
[in]costsThe new route costs

Definition at line 173 of file MSRoute.h.

References checkDist(), clear(), dictionary(), distDictionary(), getStops(), insertIDs(), and myCosts.

Referenced by MSRouteHandler::closeRoute().

◆ setID()

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

◆ setParameter()

◆ size()

int MSRoute::size ( ) const

Returns the number of edges to pass.

Definition at line 85 of file MSRoute.cpp.

References myEdges.

Referenced by GUIVehicle::drawRouteHelper(), MSEdge::getDepartLane(), MSBaseVehicle::replaceRouteEdges(), and MSDevice_Vehroutes::writeXMLRoute().

◆ unsetParameter()

void Parameterised::unsetParameter ( const std::string &  key)
inherited

Removes a parameter.

Parameters
[in]keyThe parameter's name

Definition at line 57 of file Parameterised.cpp.

References Parameterised::myMap.

◆ updateParameter()

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

Adds or updates all given parameters from the map.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 63 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NIImporter_SUMO::_loadNetwork(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NLJunctionControlBuilder::closeJunction(), NBTrafficLightDefinition::compute(), and NIImporter_OpenStreetMap::insertEdge().

◆ writeEdgeIDs()

int MSRoute::writeEdgeIDs ( OutputDevice os,
const MSEdge *const  from,
const MSEdge *const  upTo = 0 
) const

Output the edge ids up to but not including the id of the given edge.

Parameters
[in]osThe stream to write the routes into (binary)
[in]fromThe first edge to be written
[in]upToThe first edge that shall not be written
Returns
The number of edges written

Definition at line 221 of file MSRoute.cpp.

References myEdges.

Referenced by MSDevice_Vehroutes::writeXMLRoute().

◆ writeParams()

Field Documentation

◆ myAmPermanent

const bool MSRoute::myAmPermanent
private

whether the route may be deleted after the last vehicle abandoned it

Definition at line 236 of file MSRoute.h.

◆ myColor

const RGBColor* const MSRoute::myColor
private

The color.

Definition at line 242 of file MSRoute.h.

Referenced by getColor(), and ~MSRoute().

◆ myCosts

double MSRoute::myCosts
private

The assigned or calculated costs.

Definition at line 245 of file MSRoute.h.

Referenced by getCosts(), and setCosts().

◆ myDict

MSRoute::RouteDict MSRoute::myDict
staticprivate

The dictionary container.

Definition at line 255 of file MSRoute.h.

Referenced by clear(), dict_saveState(), dictionary(), insertIDs(), and release().

◆ myDistDict

MSRoute::RouteDistDict MSRoute::myDistDict
staticprivate

The dictionary container.

Definition at line 261 of file MSRoute.h.

Referenced by checkDist(), clear(), dict_saveState(), dictionary(), distDictionary(), and insertIDs().

◆ myEdges

ConstMSEdgeVector MSRoute::myEdges
private

The list of edges to pass.

Definition at line 233 of file MSRoute.h.

Referenced by begin(), contains(), end(), getDistanceBetween(), getEdges(), getLastEdge(), operator[](), size(), and writeEdgeIDs().

◆ myID

std::string Named::myID
protectedinherited

◆ myReferenceCounter

int MSRoute::myReferenceCounter
mutableprivate

Information by how many vehicles the route is used.

Definition at line 239 of file MSRoute.h.

Referenced by addReference(), and release().

◆ myStops

std::vector<SUMOVehicleParameter::Stop> MSRoute::myStops
private

List of the stops on the parsed route.

Definition at line 248 of file MSRoute.h.

Referenced by getStops().


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