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

#include <MSRoute.h>

Inheritance diagram for MSRoute:
Named Parameterised

Public Member Functions

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 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...
 
SUMOReal getCosts () const
 Returns the costs of the route. More...
 
SUMOReal getDistanceBetween (SUMOReal fromPos, SUMOReal 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...
 
SUMOReal getDistanceBetween (SUMOReal fromPos, SUMOReal 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...
 
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[] (unsigned index) const
 
void release () const
 deletes the route if there are no further references to it More...
 
void setCosts (SUMOReal costs)
 Sets the costs of the route. More...
 
void setID (const std::string &newID)
 resets the id More...
 
unsigned size () const
 Returns the number of edges to pass. 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...
 
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, MTRand *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...
 
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...
 
SUMOReal myCosts
 The assigned or calculated costs. More...
 
ConstMSEdgeVector myEdges
 The list of edges to pass. More...
 
unsigned int myReferenceCounter
 Information by how many vehicles the route is used. More...
 
std::vector
< SUMOVehicleParameter::Stop
myStops
 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 70 of file MSRoute.h.

Member Typedef Documentation

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

Definition of the dictionary container.

Definition at line 249 of file MSRoute.h.

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

Definition of the dictionary container.

Definition at line 255 of file MSRoute.h.

Constructor & Destructor Documentation

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 60 of file MSRoute.cpp.

MSRoute::~MSRoute ( )
virtual

Destructor.

Definition at line 69 of file MSRoute.cpp.

References myColor.

Member Function Documentation

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

Adds all given parameter.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 59 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::addParameter ( const Parameterised p)
inherited

Adds all given parameter.

Parameters
[in]pThe keys/values to insert

Definition at line 67 of file Parameterised.cpp.

References Parameterised::myMap.

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

Adds this object to the given container.

Parameters
in,filled]cont The container to add this item to

Definition at line 121 of file Named.h.

References Named::StoringVisitor::add().

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

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

Definition at line 173 of file MSRoute.cpp.

References myDistDict.

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

void MSRoute::clear ( )
static

Clears the dictionary (delete all known routes, too)

Definition at line 160 of file MSRoute.cpp.

References myDict, and myDistDict.

Referenced by MSNet::clearAll().

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 91 of file Parameterised.cpp.

References Parameterised::myMap.

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

Definition at line 106 of file MSRoute.h.

References myEdges.

Referenced by containsAnyOf(), MSCalibrator::execute(), and MSVehicle::replaceRoute().

bool MSRoute::containsAnyOf ( const MSEdgeVector edgelist) const

Definition at line 220 of file MSRoute.cpp.

References contains().

Referenced by MSTriggeredRerouter::getCurrentReroute().

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 238 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 MSStateHandler::saveState().

bool MSRoute::dictionary ( const std::string &  id,
const MSRoute route 
)
static
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 126 of file MSRoute.cpp.

References myDict, and myDistDict.

const MSRoute * MSRoute::dictionary ( const std::string &  id,
MTRand 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 136 of file MSRoute.cpp.

References myDict, and myDistDict.

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 150 of file MSRoute.cpp.

References myDistDict.

Referenced by MSInsertionControl::add(), MSDevice_Vehroutes::generateOutput(), and MSRouteProbe::MSRouteProbe().

const RGBColor & MSRoute::getColor ( ) const

Returns the color.

Definition at line 328 of file MSRoute.cpp.

References RGBColor::DEFAULT_COLOR, and myColor.

Referenced by MSBaseVehicle::replaceRouteEdges(), and GUIVehicle::setFunctionalColor().

SUMOReal 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 162 of file MSRoute.h.

References myCosts.

SUMOReal MSRoute::getDistanceBetween ( SUMOReal  fromPos,
SUMOReal  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

Definition at line 255 of file MSRoute.cpp.

References max, and myEdges.

Referenced by TraCIServerAPI_Vehicle::commandDistanceRequest(), TraCIServerAPI_Simulation::commandDistanceRequest(), MSDevice_Tripinfo::generateOutput(), MSVehicle::getDistanceToPosition(), and TraCIServerAPI_Vehicle::processGet().

SUMOReal MSRoute::getDistanceBetween ( SUMOReal  fromPos,
SUMOReal  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 277 of file MSRoute.cpp.

References end(), max, SUMOReal, and UNUSED_PARAMETER.

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

Returns the id.

Returns
The stored id

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBEdge::addSidewalk(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NBNode::buildCrossings(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBNode::buildInnerEdges(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBNode::buildWalkingAreas(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPModel_Striping::getNextLane(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), MSVehicleControl::getWaitingVehicle(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollision(), NBEdgeCont::ignoreFilterMatch(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), NIImporter_OpenDrive::loadNetwork(), ODDistrictCont::makeDistricts(), MSPModel_Striping::moveInDirection(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTsender::notifyMove(), MSDevice_BTreceiver::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), 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()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), MSCalibrator::removePending(), 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(), MSLink::setRequestInformation(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), MSLCM_JE2013::wantsChange(), 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(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

const MSEdge * MSRoute::getLastEdge ( ) const
const std::map<std::string, std::string>& Parameterised::getMap ( ) const
inlineinherited
const std::vector< SUMOVehicleParameter::Stop > & MSRoute::getStops ( ) const

Returns the stops.

Definition at line 337 of file MSRoute.cpp.

References myStops.

Referenced by MSBaseVehicle::addStops(), MSVehicle::replaceRoute(), and MSBaseVehicle::replaceRouteEdges().

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

Definition at line 187 of file MSRoute.cpp.

References myDict, and myDistDict.

Referenced by TraCIServerAPI_Route::processGet().

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

Returns whether the parameter is known.

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

Definition at line 75 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSDevice_Example::buildVehicleDevices(), and MSDevice::equippedByDefaultAssignmentOptions().

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

invalid assignment operator

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

Definition at line 232 of file MSRoute.cpp.

References myEdges.

void MSRoute::release ( ) const
void MSRoute::setCosts ( SUMOReal  costs)
inline

Sets the costs of the route.

Parameters
[in]costsThe new route costs

Definition at line 170 of file MSRoute.h.

References myCosts.

Referenced by MSRouteHandler::closeRoute().

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

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

unsigned MSRoute::size ( ) const
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 199 of file MSRoute.cpp.

References myEdges.

Referenced by MSDevice_Vehroutes::writeXMLRoute().

Field Documentation

const bool MSRoute::myAmPermanent
private

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

Definition at line 233 of file MSRoute.h.

const RGBColor* const MSRoute::myColor
private

The color.

Definition at line 239 of file MSRoute.h.

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

SUMOReal MSRoute::myCosts
private

The assigned or calculated costs.

Definition at line 242 of file MSRoute.h.

Referenced by getCosts(), and setCosts().

MSRoute::RouteDict MSRoute::myDict
staticprivate

The dictionary container.

Definition at line 252 of file MSRoute.h.

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

MSRoute::RouteDistDict MSRoute::myDistDict
staticprivate

The dictionary container.

Definition at line 258 of file MSRoute.h.

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

ConstMSEdgeVector MSRoute::myEdges
private

The list of edges to pass.

Definition at line 230 of file MSRoute.h.

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

unsigned int MSRoute::myReferenceCounter
mutableprivate

Information by how many vehicles the route is used.

Definition at line 236 of file MSRoute.h.

Referenced by addReference(), and release().

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

List of the stops on the parsed route.

Definition at line 245 of file MSRoute.h.

Referenced by getStops().


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