SUMO - Simulation of Urban MObility
RORouteDef_Complete Class Reference

A complete route description containing all edges the driver will pass. More...

#include <RORouteDef_Complete.h>

Inheritance diagram for RORouteDef_Complete:
RORouteDef ReferencedItem Named

Public Member Functions

void addAlternative (SUMOAbstractRouter< ROEdge, ROVehicle > &router, const ROVehicle *const, RORoute *current, SUMOTime begin)
 Adds an route alternative (see further comments)
RORoutebuildCurrentRoute (SUMOAbstractRouter< ROEdge, ROVehicle > &router, SUMOTime begin, const ROVehicle &veh) const
 Triggers building of the complete route (via preComputeCurrentRoute) or returns precomputed route.
RORouteDefcopy (const std::string &id) const
 Returns a copy of the route definition.
const RGBColorgetColor () const
 Returns the color of the route.
const ROEdgegetDestination () const
const std::string & getID () const
 Returns the id.
bool isSaved () const
 Returns the information whether this item was already saved.
void markSaved ()
 Marks the item as saved.
void preComputeCurrentRoute (SUMOAbstractRouter< ROEdge, ROVehicle > &router, SUMOTime begin, const ROVehicle &veh) const
 Builds the route.
 RORouteDef_Complete (const std::string &id, const RGBColor *const color, const std::vector< const ROEdge * > &edges, bool tryRepair)
 Constructor.
void setID (const std::string &newID)
 resets the id
virtual OutputDevicewriteXMLDefinition (SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice &dev, const ROVehicle *const veh, bool asAlternatives, bool withExitTimes) const
 Saves the built route / route alternatives.
virtual ~RORouteDef_Complete ()
 Destructor.

Protected Member Functions

const RGBColorcopyColorIfGiven () const

Protected Attributes

const RGBColor *const myColor
 The color the route shall have.
std::vector< const ROEdge * > myEdges
 The list of edges the driver passes.
std::string myID
 The name of the object.
RORoutemyPrecomputed
 precomputed route for out-of-order computation
SUMOTime myStartTime
 The begin of the route.
bool myTryRepair

Private Member Functions

RORouteDef_Completeoperator= (const RORouteDef_Complete &src)
 Invalidated assignment operator.
 RORouteDef_Complete (const RORouteDef_Complete &src)
 Invalidated copy constructor.

Detailed Description

A complete route description containing all edges the driver will pass.

Definition at line 55 of file RORouteDef_Complete.h.


Constructor & Destructor Documentation

RORouteDef_Complete::RORouteDef_Complete ( const std::string &  id,
const RGBColor *const  color,
const std::vector< const ROEdge * > &  edges,
bool  tryRepair 
)

Constructor.

Definition at line 55 of file RORouteDef_Complete.cpp.

Referenced by copy().

Destructor.

Definition at line 63 of file RORouteDef_Complete.cpp.

Invalidated copy constructor.


Member Function Documentation

void RORouteDef_Complete::addAlternative ( SUMOAbstractRouter< ROEdge, ROVehicle > &  router,
const ROVehicle * const  ,
RORoute current,
SUMOTime  begin 
) [virtual]

Adds an route alternative (see further comments)

Here, as in most cases, the alternative is the route that was build as last and will stay the only route known

Implements RORouteDef.

Definition at line 105 of file RORouteDef_Complete.cpp.

References RORoute::getEdgeVector(), myEdges, and myStartTime.

RORoute * RORouteDef::buildCurrentRoute ( SUMOAbstractRouter< ROEdge, ROVehicle > &  router,
SUMOTime  begin,
const ROVehicle veh 
) const [inherited]

Triggers building of the complete route (via preComputeCurrentRoute) or returns precomputed route.

Definition at line 77 of file RORouteDef.cpp.

References RORouteDef::myPrecomputed, and RORouteDef::preComputeCurrentRoute().

Referenced by RONet::computeRoute().

RORouteDef * RORouteDef_Complete::copy ( const std::string &  id) const [virtual]

Returns a copy of the route definition.

Implements RORouteDef.

Definition at line 114 of file RORouteDef_Complete.cpp.

References RORouteDef::copyColorIfGiven(), myEdges, myTryRepair, and RORouteDef_Complete().

Referenced by preComputeCurrentRoute().

const RGBColor* RORouteDef::getColor ( ) const [inline, inherited]

Returns the color of the route.

Definition at line 98 of file RORouteDef.h.

References RORouteDef::myColor.

const ROEdge * RORouteDef_Complete::getDestination ( ) const [virtual]

Implements RORouteDef.

Definition at line 159 of file RORouteDef_Complete.cpp.

References myEdges.

const std::string& Named::getID ( ) const [inline, inherited]

Returns the id.

Returns:
The stored id

Reimplemented in MS_E2_ZS_CollectorOverLanes.

Definition at line 61 of file Named.h.

References Named::myID.

Referenced by MSDetectorControl::add(), ShapeContainer::add(), RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), MSLane::moveCritical(), MSVehicle::MSVehicle(), RORDLoader_SUMOBase::myCharacters(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), preComputeCurrentRoute(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_Vehicle::processGet(), NWWriter_SUMO::prohibitionConnection(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), MSLane::setCritical(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), RORDLoader_SUMOBase::startRoute(), NBEdge::startShapeAt(), NIXMLConnectionsHandler::validateLaneInfo(), MSInstantInductLoop::write(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), MSInductLoop::writeTypedXMLOutput(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

bool ReferencedItem::isSaved ( ) const [inline, inherited]

Returns the information whether this item was already saved.

Returns:
Whether this item was saved

Definition at line 59 of file ReferencedItem.h.

References ReferencedItem::myWasSaved.

Referenced by RONet::computeRoute(), and ROVehicle::saveAllAsXML().

void ReferencedItem::markSaved ( ) [inline, inherited]

Marks the item as saved.

Definition at line 66 of file ReferencedItem.h.

References ReferencedItem::myWasSaved.

RORouteDef_Complete& RORouteDef_Complete::operator= ( const RORouteDef_Complete src) [private]

Invalidated assignment operator.

void Named::setID ( const std::string &  newID) [inline, inherited]

resets the id

Definition at line 67 of file Named.h.

References Named::myID.

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

OutputDevice & RORouteDef_Complete::writeXMLDefinition ( SUMOAbstractRouter< ROEdge, ROVehicle > &  router,
OutputDevice dev,
const ROVehicle *const  veh,
bool  asAlternatives,
bool  withExitTimes 
) const [virtual]

Saves the built route / route alternatives.

Writes the route into the given stream.

Parameters:
[in]devThe device to write the route into
[in]asAlternativesWhether the route shall be saved as route alternatives
Returns:
The same device for further usage

Implements RORouteDef.

Definition at line 120 of file RORouteDef_Complete.cpp.

References OutputDevice::closeOpener(), OutputDevice::closeTag(), ROVehicle::getDepartureTime(), RORouteDef::myColor, myEdges, OutputDevice::openTag(), SUMOAbstractRouter< E, V >::recomputeCosts(), STEPS2TIME, SUMO_ATTR_COLOR, SUMO_ATTR_COST, SUMO_ATTR_EDGES, SUMO_ATTR_LAST, SUMO_ATTR_PROB, SUMO_TAG_ROUTE, SUMO_TAG_ROUTE_DISTRIBUTION, SUMOReal, toString(), and OutputDevice::writeAttr().


Field Documentation

const RGBColor* const RORouteDef::myColor [protected, inherited]
std::vector<const ROEdge*> RORouteDef_Complete::myEdges [mutable, protected]

The list of edges the driver passes.

Definition at line 88 of file RORouteDef_Complete.h.

Referenced by addAlternative(), copy(), getDestination(), preComputeCurrentRoute(), and writeXMLDefinition().

RORoute* RORouteDef::myPrecomputed [mutable, protected, inherited]

The begin of the route.

Definition at line 91 of file RORouteDef_Complete.h.

Referenced by addAlternative().

Definition at line 93 of file RORouteDef_Complete.h.

Referenced by copy(), and preComputeCurrentRoute().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines