SUMO - Simulation of Urban MObility
|
Base class for a vehicle's route definition. More...
#include <RORouteDef.h>
Public Member Functions | |
virtual void | addAlternative (SUMOAbstractRouter< ROEdge, ROVehicle > &router, const ROVehicle *const, RORoute *current, SUMOTime begin)=0 |
Adds an alternative to the list of routes. | |
RORoute * | buildCurrentRoute (SUMOAbstractRouter< ROEdge, ROVehicle > &router, SUMOTime begin, const ROVehicle &veh) const |
Triggers building of the complete route (via preComputeCurrentRoute) or returns precomputed route. | |
virtual RORouteDef * | copy (const std::string &id) const =0 |
Returns a copy of the route definition. | |
const RGBColor * | getColor () const |
Returns the color of the route. | |
virtual const ROEdge * | getDestination () const =0 |
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. | |
virtual void | preComputeCurrentRoute (SUMOAbstractRouter< ROEdge, ROVehicle > &router, SUMOTime begin, const ROVehicle &veh) const =0 |
Builds the complete route (or chooses her from the list of alternatives, when existing) | |
RORouteDef (const std::string &id, const RGBColor *const color) | |
Constructor. | |
void | setID (const std::string &newID) |
resets the id | |
virtual OutputDevice & | writeXMLDefinition (SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice &dev, const ROVehicle *const veh, bool asAlternatives, bool withExitTimes) const =0 |
Saves the built route / route alternatives. | |
virtual | ~RORouteDef () |
Destructor. |
Protected Member Functions | |
const RGBColor * | copyColorIfGiven () const |
Protected Attributes | |
const RGBColor *const | myColor |
The color the route shall have. | |
std::string | myID |
The name of the object. | |
RORoute * | myPrecomputed |
precomputed route for out-of-order computation |
Private Member Functions | |
RORouteDef & | operator= (const RORouteDef &src) |
Invalidated assignment operator. | |
RORouteDef (const RORouteDef &src) | |
Invalidated copy constructor. |
Base class for a vehicle's route definition.
This class resembles what a vehicle knows about his route when being loaded into a router. Whether it is just the origin and the destination, the whole route through the network or even a route with alternatives depends on the derived class.
Definition at line 64 of file RORouteDef.h.
RORouteDef::RORouteDef | ( | const std::string & | id, |
const RGBColor *const | color | ||
) |
Constructor.
[in] | id | The id of the route |
[in] | color | The color of the route |
Definition at line 54 of file RORouteDef.cpp.
|
virtual |
|
private |
Invalidated copy constructor.
|
pure virtual |
Adds an alternative to the list of routes.
(This may be the new route)
Implemented in RORouteDef_Complete, RORouteDef_Alternatives, and RORouteDef_OrigDest.
Referenced by RONet::computeRoute().
RORoute * RORouteDef::buildCurrentRoute | ( | SUMOAbstractRouter< ROEdge, ROVehicle > & | router, |
SUMOTime | begin, | ||
const ROVehicle & | veh | ||
) | const |
Triggers building of the complete route (via preComputeCurrentRoute) or returns precomputed route.
Definition at line 77 of file RORouteDef.cpp.
References myPrecomputed, and preComputeCurrentRoute().
Referenced by RONet::computeRoute().
|
pure virtual |
Returns a copy of the route definition.
Implemented in RORouteDef_Complete, RORouteDef_Alternatives, and RORouteDef_OrigDest.
Referenced by RORDGenerator_ODAmounts::FlowDef::addSingleRoute().
|
protected |
Definition at line 68 of file RORouteDef.cpp.
References myColor.
Referenced by RORouteDef_OrigDest::copy(), RORouteDef_Complete::copy(), RORouteDef_OrigDest::preComputeCurrentRoute(), RORouteDef_Alternatives::preComputeCurrentRoute(), and RORouteDef_Complete::preComputeCurrentRoute().
|
inline |
|
pure virtual |
Implemented in RORouteDef_Alternatives, RORouteDef_Complete, and RORouteDef_OrigDest.
|
inlineinherited |
Returns the id.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 61 of file Named.h.
References Named::myID.
Referenced by MSDetectorControl::add(), ShapeContainer::add(), RORouteDef_Alternatives::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIImporter_OpenDrive::addE2EConnectionsSecure(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), NIVisumTL::build(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), ODDistrictHandler::closeDistrict(), NBTrafficLightDefinition::collectEdges(), NBOwnTLDef::collectLinks(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBEdge::connections_sorter(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSE3Collector::enter(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), MSNet::getBusStopID(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), MSLane::moveCritical(), MSVehicle::MSVehicle(), RORDLoader_SUMOBase::myCharacters(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), RORouteDef_Complete::preComputeCurrentRoute(), TraCIServerAPI_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().
|
inlineinherited |
Returns the information whether this item was already saved.
Definition at line 59 of file ReferencedItem.h.
References ReferencedItem::myWasSaved.
Referenced by RONet::computeRoute(), and ROVehicle::saveAllAsXML().
|
inlineinherited |
Marks the item as saved.
Definition at line 66 of file ReferencedItem.h.
References ReferencedItem::myWasSaved.
|
private |
Invalidated assignment operator.
|
pure virtual |
Builds the complete route (or chooses her from the list of alternatives, when existing)
Implemented in RORouteDef_Complete, RORouteDef_Alternatives, and RORouteDef_OrigDest.
Referenced by buildCurrentRoute().
|
inlineinherited |
resets the id
Definition at line 67 of file Named.h.
References Named::myID.
Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().
|
pure virtual |
Saves the built route / route alternatives.
Writes the route into the given stream.
[in] | dev | The device to write the route into |
[in] | asAlternatives | Whether the route shall be saved as route alternatives |
Implemented in RORouteDef_Alternatives, RORouteDef_Complete, and RORouteDef_OrigDest.
Referenced by ROVehicle::saveAllAsXML().
|
protected |
The color the route shall have.
Definition at line 121 of file RORouteDef.h.
Referenced by copyColorIfGiven(), getColor(), RORouteDef_Complete::writeXMLDefinition(), RORouteDef_Alternatives::writeXMLDefinition(), and ~RORouteDef().
|
protectedinherited |
The name of the object.
Reimplemented in MS_E2_ZS_CollectorOverLanes.
Definition at line 83 of file Named.h.
Referenced by NLDetectorBuilder::addE3Entry(), NLDetectorBuilder::addE3Exit(), NBEdge::computeEdgeShape(), Named::getID(), NBEdge::getLaneID(), NBEdge::init(), RORouteDef_OrigDest::preComputeCurrentRoute(), RORouteDef_Alternatives::preComputeCurrentRoute(), RORouteDef_Complete::preComputeCurrentRoute(), MSRoute::release(), Named::setID(), NBEdge::splitGeometry(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), MSE3Collector::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
mutableprotected |
precomputed route for out-of-order computation
Definition at line 124 of file RORouteDef.h.
Referenced by buildCurrentRoute(), RORouteDef_OrigDest::preComputeCurrentRoute(), RORouteDef_Alternatives::preComputeCurrentRoute(), and RORouteDef_Complete::preComputeCurrentRoute().