SUMO - Simulation of Urban MObility
|
A complete router's route. More...
#include <RORoute.h>
Public Member Functions | |
void | add (ROEdge *edge) |
Adds an edge to the end of the route. | |
const RGBColor * | getColor () const |
Returns this route's color. | |
SUMOReal | getCosts () const |
Returns the costs of the route. | |
const std::vector< const ROEdge * > & | getEdgeVector () const |
Returns the list of edges this route consists of. | |
const ROEdge * | getFirst () const |
Returns the first edge in the route. | |
const std::string & | getID () const |
Returns the id. | |
const ROEdge * | getLast () const |
Returns the last edge in the route. | |
SUMOReal | getProbability () const |
Returns the probability the driver will take this route with. | |
void | recheckForLoops () |
Checks whether this route contains loops and removes such. | |
RORoute (const std::string &id, SUMOReal costs, SUMOReal prob, const std::vector< const ROEdge * > &route, const RGBColor *const color) | |
Constructor. | |
RORoute (const RORoute &src) | |
Copy constructor. | |
void | setCosts (SUMOReal costs) |
Sets the costs of the route. | |
void | setID (const std::string &newID) |
resets the id | |
void | setProbability (SUMOReal prob) |
Sets the probability of the route. | |
unsigned int | size () const |
Returns the number of edges in this route. | |
OutputDevice & | writeXMLDefinition (SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice &dev, const ROVehicle *const veh, bool asAlternatives, bool withExitTimes) const |
~RORoute () | |
Destructor. | |
Protected Attributes | |
std::string | myID |
The name of the object. | |
Private Member Functions | |
RORoute & | operator= (const RORoute &src) |
Invalidated assignment operator. | |
Private Attributes | |
const RGBColor * | myColor |
The color of the route. | |
SUMOReal | myCosts |
The costs of the route. | |
SUMOReal | myProbability |
The probability the driver will take this route with. | |
std::vector< const ROEdge * > | myRoute |
The edges the route consists of. |
A complete router's route.
This class represents a single and complete vehicle route after being computed/imported.
RORoute::RORoute | ( | const std::string & | id, |
SUMOReal | costs, | ||
SUMOReal | prob, | ||
const std::vector< const ROEdge * > & | route, | ||
const RGBColor *const | color | ||
) |
Constructor.
[in] | id | The route's id |
[in] | costs | The route's costs |
[in] | prob | The route's probability |
[in] | route | The list of edges the route is made of |
[in] | color | The (optional) color of this route |
Definition at line 50 of file RORoute.cpp.
RORoute::RORoute | ( | const RORoute & | src | ) |
Copy constructor.
[in] | src | The route to copy |
Definition at line 57 of file RORoute.cpp.
References myColor.
void RORoute::add | ( | ROEdge * | edge | ) |
Adds an edge to the end of the route.
[in] | edge | The edge to add |
Definition at line 72 of file RORoute.cpp.
References myRoute.
const RGBColor* RORoute::getColor | ( | ) | const [inline] |
Returns this route's color.
Definition at line 166 of file RORoute.h.
References myColor.
Referenced by RORouteDef_Alternatives::writeXMLDefinition().
SUMOReal RORoute::getCosts | ( | ) | const [inline] |
Returns the costs of the route.
Definition at line 116 of file RORoute.h.
References myCosts.
Referenced by ROGawronCalculator::calculateProbabilities(), ROLogitCalculator::calculateProbabilities(), ROGawronCalculator::setCosts(), and RORouteDef_Alternatives::writeXMLDefinition().
const std::vector<const ROEdge*>& RORoute::getEdgeVector | ( | ) | const [inline] |
Returns the list of edges this route consists of.
Definition at line 158 of file RORoute.h.
References myRoute.
Referenced by RORouteDef_Alternatives::addAlternative(), RORouteDef_OrigDest::addAlternative(), RORouteDef_Complete::addAlternative(), ROLogitCalculator::calculateProbabilities(), RORouteDef_Alternatives::findRoute(), and RORouteDef_Alternatives::writeXMLDefinition().
const ROEdge* RORoute::getFirst | ( | ) | const [inline] |
const std::string& Named::getID | ( | ) | const [inline, inherited] |
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_Lane::processGet(), TraCIServerAPI_TLS::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().
const ROEdge* RORoute::getLast | ( | ) | const [inline] |
SUMOReal RORoute::getProbability | ( | ) | const [inline] |
Returns the probability the driver will take this route with.
Definition at line 126 of file RORoute.h.
References myProbability.
Referenced by RORouteDef_Alternatives::addAlternative(), ROGawronCalculator::calculateProbabilities(), RORouteDef_Alternatives::ComparatorProbability::operator()(), and RORouteDef_Alternatives::writeXMLDefinition().
void RORoute::recheckForLoops | ( | ) |
Checks whether this route contains loops and removes such.
Definition at line 90 of file RORoute.cpp.
References myRoute.
Referenced by RONet::computeRoute().
void RORoute::setCosts | ( | SUMOReal | costs | ) |
Sets the costs of the route.
Definition at line 78 of file RORoute.cpp.
References myCosts.
Referenced by RORouteDef_OrigDest::addAlternative(), ROGawronCalculator::setCosts(), and ROLogitCalculator::setCosts().
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().
void RORoute::setProbability | ( | SUMOReal | prob | ) |
Sets the probability of the route.
Definition at line 84 of file RORoute.cpp.
References myProbability.
Referenced by RORouteDef_Alternatives::addAlternative(), ROGawronCalculator::calculateProbabilities(), and ROLogitCalculator::calculateProbabilities().
unsigned int RORoute::size | ( | ) | const [inline] |
Returns the number of edges in this route.
Definition at line 149 of file RORoute.h.
References myRoute.
Referenced by RONet::computeRoute().
OutputDevice & RORoute::writeXMLDefinition | ( | SUMOAbstractRouter< ROEdge, ROVehicle > & | router, |
OutputDevice & | dev, | ||
const ROVehicle *const | veh, | ||
bool | asAlternatives, | ||
bool | withExitTimes | ||
) | const |
Definition at line 96 of file RORoute.cpp.
References OutputDevice::closeOpener(), OutputDevice::closeTag(), ROVehicle::getDepartureTime(), myColor, myCosts, myProbability, myRoute, OutputDevice::openTag(), OutputDevice::setPrecision(), 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(), UNUSED_PARAMETER, and OutputDevice::writeAttr().
Referenced by RORouteDef_OrigDest::writeXMLDefinition().
const RGBColor* RORoute::myColor [private] |
The color of the route.
Definition at line 190 of file RORoute.h.
Referenced by getColor(), RORoute(), writeXMLDefinition(), and ~RORoute().
SUMOReal RORoute::myCosts [private] |
The costs of the route.
Definition at line 181 of file RORoute.h.
Referenced by getCosts(), setCosts(), and writeXMLDefinition().
std::string Named::myID [protected, inherited] |
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().
SUMOReal RORoute::myProbability [private] |
The probability the driver will take this route with.
Definition at line 184 of file RORoute.h.
Referenced by getProbability(), setProbability(), and writeXMLDefinition().
std::vector<const ROEdge*> RORoute::myRoute [private] |
The edges the route consists of.
Definition at line 187 of file RORoute.h.
Referenced by add(), getEdgeVector(), getFirst(), getLast(), recheckForLoops(), size(), and writeXMLDefinition().