![]() |
Eclipse SUMO - Simulation of Urban MObility
|
The router's network representation. More...
#include <RONet.h>
Public Types | |
typedef std::map< const SUMOTime, std::vector< RORoutable * > > | RoutablesMap |
Public Member Functions | |
void | addRestriction (const std::string &id, const SUMOVehicleClass svc, const double speed) |
Adds a restriction for an edge type. More... | |
const std::map< SUMOVehicleClass, double > * | getRestrictions (const std::string &id) const |
Returns the restrictions for an edge type If no restrictions are present, 0 is returned. More... | |
RONet () | |
Constructor. More... | |
virtual | ~RONet () |
Destructor. More... | |
Insertion and retrieval of graph parts | |
virtual bool | addEdge (ROEdge *edge) |
bool | addDistrict (const std::string id, ROEdge *source, ROEdge *sink) |
bool | addDistrictEdge (const std::string tazID, const std::string edgeID, const bool isSource) |
void | addJunctionTaz (ROAbstractEdgeBuilder &eb) |
add a taz for every junction unless a taz with the same id already exists More... | |
void | setBidiEdges (const std::map< ROEdge *, std::string > &bidiMap) |
add a taz for every junction unless a taz with the same id already exists More... | |
const std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > & | getDistricts () const |
Retrieves all TAZ (districts) from the network. More... | |
ROEdge * | getEdge (const std::string &name) const |
Retrieves an edge from the network. More... | |
ROEdge * | getEdgeForLaneID (const std::string &laneID) const |
Retrieves an edge from the network when the lane id is given. More... | |
ROLane * | getLane (const std::string &laneID) const |
Retrieves a lane rom the network given it's id. More... | |
void | addNode (RONode *node) |
RONode * | getNode (const std::string &id) const |
Retrieves an node from the network. More... | |
void | addStoppingPlace (const std::string &id, const SumoXMLTag category, SUMOVehicleParameter::Stop *stop) |
const SUMOVehicleParameter::Stop * | getStoppingPlace (const std::string &id, const SumoXMLTag category) const |
Retrieves a stopping place from the network. More... | |
const std::string | getStoppingPlaceName (const std::string &id) const |
return the name for the given stopping place id More... | |
const std::string | getStoppingPlaceElement (const std::string &id) const |
return the element name for the given stopping place id More... | |
Insertion and retrieval of vehicle types, vehicles, routes, and route definitions | |
bool | checkVType (const std::string &id) |
Checks whether the vehicle type (distribution) may be added. More... | |
virtual bool | addVehicleType (SUMOVTypeParameter *type) |
Adds a read vehicle type definition to the network. More... | |
bool | addVTypeDistribution (const std::string &id, RandomDistributor< SUMOVTypeParameter * > *vehTypeDistribution) |
Adds a vehicle type distribution. More... | |
SUMOVTypeParameter * | getVehicleTypeSecure (const std::string &id) |
Retrieves the named vehicle type. More... | |
bool | addRouteDef (RORouteDef *def) |
RORouteDef * | getRouteDef (const std::string &name) const |
Returns the named route definition. More... | |
virtual bool | addVehicle (const std::string &id, ROVehicle *veh) |
bool | knowsVehicle (const std::string &id) const |
returns whether a vehicle with the given id was already loaded More... | |
SUMOTime | getDeparture (const std::string &vehID) const |
returns departure time for the given vehicle id More... | |
bool | addFlow (SUMOVehicleParameter *flow, const bool randomize) |
bool | addPerson (ROPerson *person) |
void | addContainer (const SUMOTime depart, const std::string desc) |
Static Public Member Functions | |
static RONet * | getInstance () |
Returns the pointer to the unique instance of RONet (singleton). More... | |
Processing stored vehicle definitions | |
typedef std::map< std::string, RandomDistributor< SUMOVTypeParameter * > * > | VTypeDistDictType |
Vehicle type distribution dictionary type. More... | |
typedef std::multimap< const SUMOTime, const std::string > | ContainerMap |
Known containers. More... | |
static RONet * | myInstance = nullptr |
Unique instance of RONet. More... | |
std::map< std::string, SUMOTime > | myVehIDs |
Known vehicle ids and their departure. More... | |
std::set< std::string > | myPersonIDs |
Known person ids. More... | |
NamedObjectCont< RONode * > | myNodes |
Known nodes. More... | |
NamedObjectCont< ROEdge * > | myEdges |
Known edges. More... | |
std::map< SumoXMLTag, NamedObjectCont< SUMOVehicleParameter::Stop * > > | myStoppingPlaces |
Known bus / train / container stops and parking areas. More... | |
NamedObjectCont< SUMOVTypeParameter * > | myVehicleTypes |
Known vehicle types. More... | |
VTypeDistDictType | myVTypeDistDict |
A distribution of vehicle types (probability->vehicle type) More... | |
bool | myDefaultVTypeMayBeDeleted |
Whether the default vehicle type was already used or can still be replaced. More... | |
bool | myDefaultPedTypeMayBeDeleted |
Whether the default pedestrian type was already used or can still be replaced. More... | |
bool | myDefaultBikeTypeMayBeDeleted |
Whether the default bicycle type was already used or can still be replaced. More... | |
NamedObjectCont< RORouteDef * > | myRoutes |
Known routes. More... | |
RoutablesMap | myRoutables |
Known routables. More... | |
NamedObjectCont< SUMOVehicleParameter * > | myFlows |
Known flows. More... | |
bool | myHaveActiveFlows |
whether any flows are still active More... | |
ContainerMap | myContainers |
std::vector< const RORoutable * > | myPTVehicles |
vehicles to keep for public transport routing More... | |
std::map< std::string, std::vector< SUMOTime > > | myDepartures |
Departure times for randomized flows. More... | |
std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > | myDistricts |
traffic assignment zones with sources and sinks More... | |
OutputDevice * | myRoutesOutput |
The file to write the computed routes into. More... | |
OutputDevice * | myRouteAlternativesOutput |
The file to write the computed route alternatives into. More... | |
OutputDevice * | myTypesOutput |
The file to write the vehicle types into. More... | |
int | myReadRouteNo |
The number of read routes. More... | |
int | myDiscardedRouteNo |
The number of discarded routes. More... | |
int | myWrittenRouteNo |
The number of written routes. More... | |
bool | myHavePermissions |
Whether the network contains edges which not all vehicles may pass. More... | |
std::map< std::string, std::map< SUMOVehicleClass, double > > | myRestrictions |
The vehicle class specific speed restrictions. More... | |
int | myNumInternalEdges |
The number of internal edges in the dictionary. More... | |
MsgHandler * | myErrorHandler |
handler for ignorable error messages More... | |
const bool | myKeepVTypeDist |
whether to keep the the vtype distribution in output More... | |
const bool | myDoPTRouting |
whether to calculate routes for public transport More... | |
bool | myHasBidiEdges |
whether the network contains bidirectional railway edges More... | |
SUMOTime | saveAndRemoveRoutesUntil (OptionsCont &options, const RORouterProvider &provider, SUMOTime time) |
Computes routes described by their definitions and saves them. More... | |
bool | furtherStored () |
Returns the information whether further vehicles, persons or containers are stored. More... | |
void | openOutput (const OptionsCont &options) |
Opens the output for computed routes. More... | |
void | writeIntermodal (const OptionsCont &options, ROIntermodalRouter &router) const |
Writes the intermodal network and weights if requested. More... | |
void | cleanup () |
closes the file output for computed routes and deletes associated threads if necessary More... | |
int | getEdgeNumber () const |
Returns the total number of edges the network contains including internal edges. More... | |
int | getInternalEdgeNumber () const |
Returns the number of internal edges the network contains. More... | |
const NamedObjectCont< ROEdge * > & | getEdgeMap () const |
bool | hasPermissions () const |
void | setPermissionsFound () |
bool | hasBidiEdges () const |
return whether the network contains bidirectional rail edges More... | |
bool | hasLoadedEffort () const |
whether efforts were loaded from file More... | |
OutputDevice * | getRouteOutput (const bool alternative=false) |
static void | adaptIntermodalRouter (ROIntermodalRouter &router) |
void | checkFlows (SUMOTime time, MsgHandler *errorHandler) |
void | createBulkRouteRequests (const RORouterProvider &provider, const SUMOTime time, const bool removeLoops) |
RONet (const RONet &src) | |
Invalidated copy constructor. More... | |
RONet & | operator= (const RONet &src) |
Invalidated assignment operator. More... | |
The router's network representation.
A router network is responsible for watching loaded edges, nodes,!!!
|
private |
typedef std::map<const SUMOTime, std::vector<RORoutable*> > RONet::RoutablesMap |
|
private |
RONet::RONet | ( | ) |
Constructor.
Definition at line 64 of file RONet.cpp.
References NamedObjectCont< T >::add(), DEFAULT_BIKETYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_TAXITYPE_ID, DEFAULT_VTYPE_ID, SUMOVTypeParameter::id, myInstance, myVehicleTypes, SUMOVTypeParameter::onlyReferenced, SUMOVTypeParameter::parametersSet, SVC_BICYCLE, SVC_PASSENGER, SVC_PEDESTRIAN, SVC_TAXI, and VTYPEPARS_VEHICLECLASS_SET.
|
virtual |
Destructor.
Definition at line 105 of file RONet.cpp.
References Named::getID(), ROVehicle::getRouteDefinition(), myPTVehicles, myRoutables, myRoutes, and NamedObjectCont< T >::remove().
|
private |
Invalidated copy constructor.
|
static |
Definition at line 784 of file RONet.cpp.
References IntermodalNetwork< E, L, N, V >::addAccess(), IntermodalNetwork< E, L, N, V >::addCarAccess(), IntermodalNetwork< E, L, N, V >::addSchedule(), ROEdge::getAllEdges(), IntermodalRouter< E, L, N, V >::getCarWalkTransfer(), getEdgeForLaneID(), RORouteDef::getFirstRoute(), IntermodalRouter< E, L, N, V >::getNetwork(), OptionsCont::getOptions(), RORoutable::getParameter(), getRouteDef(), RORoute::getStops(), myFlows, myInstance, myPTVehicles, myStoppingPlaces, STEPS2TIME, string2time(), SUMO_TAG_BUS_STOP, SVC_PEDESTRIAN, SVC_TAXI, and IntermodalNetwork< E, L, N, V >::TAXI_PICKUP_ANYWHERE.
Referenced by computeRoutes().
void RONet::addContainer | ( | const SUMOTime | depart, |
const std::string | desc | ||
) |
Definition at line 500 of file RONet.cpp.
References myContainers.
Referenced by RORouteHandler::closeContainer(), and RORouteHandler::closeContainerFlow().
Definition at line 163 of file RONet.cpp.
References addEdge(), CONNECTOR, myDistricts, ROEdge::setFunction(), ROEdge::setOtherTazConnector(), and WRITE_ERROR.
Referenced by addJunctionTaz(), and RONetHandler::parseDistrict().
bool RONet::addDistrictEdge | ( | const std::string | tazID, |
const std::string | edgeID, | ||
const bool | isSource | ||
) |
Definition at line 186 of file RONet.cpp.
References ROEdge::addSuccessor(), getEdge(), myDistricts, and WRITE_ERROR.
Referenced by RONetHandler::parseDistrict(), and RONetHandler::parseDistrictEdge().
|
virtual |
Definition at line 149 of file RONet.cpp.
References NamedObjectCont< T >::add(), Named::getID(), ROEdge::isInternal(), myEdges, myNumInternalEdges, and WRITE_ERROR.
Referenced by addDistrict(), and RONetHandler::parseEdge().
bool RONet::addFlow | ( | SUMOVehicleParameter * | flow, |
const bool | randomize | ||
) |
Definition at line 470 of file RONet.cpp.
References NamedObjectCont< T >::add(), SUMOVehicleParameter::depart, SUMOVehicleParameter::id, myDepartures, myFlows, myHaveActiveFlows, RandHelper::rand(), SUMOVehicleParameter::repetitionNumber, and SUMOVehicleParameter::repetitionOffset.
Referenced by RORouteHandler::closeFlow().
void RONet::addJunctionTaz | ( | ROAbstractEdgeBuilder & | eb | ) |
add a taz for every junction unless a taz with the same id already exists
Definition at line 208 of file RONet.cpp.
References addDistrict(), ROEdge::addSuccessor(), ROAbstractEdgeBuilder::buildEdge(), RONode::getIncoming(), RONode::getOutgoing(), myDistricts, myNodes, ROEdge::setOtherTazConnector(), TL, and WRITE_WARNINGF.
Referenced by ROLoader::loadNet().
void RONet::addNode | ( | RONode * | node | ) |
Definition at line 257 of file RONet.cpp.
References NamedObjectCont< T >::add(), Named::getID(), myNodes, and WRITE_ERROR.
Referenced by RONetHandler::parseEdge().
bool RONet::addPerson | ( | ROPerson * | person | ) |
Definition at line 488 of file RONet.cpp.
References RORoutable::getDepart(), RORoutable::getID(), myPersonIDs, myRoutables, and WRITE_ERROR.
Referenced by RORouteHandler::addFlowPerson(), and RORouteHandler::closePerson().
void RONet::addRestriction | ( | const std::string & | id, |
const SUMOVehicleClass | svc, | ||
const double | speed | ||
) |
Adds a restriction for an edge type.
[in] | id | The id of the type |
[in] | svc | The vehicle class the restriction refers to |
[in] | speed | The restricted speed |
Definition at line 133 of file RONet.cpp.
References myRestrictions.
Referenced by RONetHandler::myStartElement().
bool RONet::addRouteDef | ( | RORouteDef * | def | ) |
Definition at line 275 of file RONet.cpp.
References NamedObjectCont< T >::add(), Named::getID(), and myRoutes.
Referenced by RORouteHandler::closeRoute(), and RORouteHandler::closeRouteDistribution().
void RONet::addStoppingPlace | ( | const std::string & | id, |
const SumoXMLTag | category, | ||
SUMOVehicleParameter::Stop * | stop | ||
) |
Definition at line 266 of file RONet.cpp.
References myStoppingPlaces, SUMO_TAG_BUS_STOP, SUMO_TAG_TRAIN_STOP, toString(), and WRITE_ERROR.
Referenced by RONetHandler::parseStoppingPlace().
|
virtual |
Definition at line 432 of file RONet.cpp.
References SUMOVehicleParameter::departProcedure, RORoutable::getDepart(), ROVehicle::getDepartureTime(), RORoutable::getParameter(), RORoutable::isPartOfFlow(), RORoutable::isPublicTransport(), myDoPTRouting, myPTVehicles, myRoutables, myVehIDs, TRIGGERED, and WRITE_ERROR.
Referenced by checkFlows(), and RORouteHandler::closeVehicle().
|
virtual |
Adds a read vehicle type definition to the network.
If the vehicle type definition is already known (another one with the same id exists), false is returned, and the vehicle type is deleted.
[in] | def | The vehicle type to add |
Definition at line 408 of file RONet.cpp.
References NamedObjectCont< T >::add(), checkVType(), SUMOVTypeParameter::id, myVehicleTypes, and WRITE_ERROR.
Referenced by RORouteHandler::closeVType().
bool RONet::addVTypeDistribution | ( | const std::string & | id, |
RandomDistributor< SUMOVTypeParameter * > * | vehTypeDistribution | ||
) |
Adds a vehicle type distribution.
If another vehicle type (or distribution) with the same id exists, false is returned. Otherwise, the vehicle type distribution is added to the internal vehicle type distribution container "myVTypeDistDict".
This control get responsible for deletion of the added vehicle type distribution.
[in] | id | The id of the distribution to add |
[in] | vehTypeDistribution | The vehicle type distribution to add |
Definition at line 421 of file RONet.cpp.
References checkVType(), and myVTypeDistDict.
Referenced by RORouteHandler::closeVehicleTypeDistribution().
|
private |
Definition at line 506 of file RONet.cpp.
References addVehicle(), RORouteDef::copy(), DEFAULT_VTYPE_ID, DELTA_T, SUMOVehicleParameter::depart, getRouteDef(), getVehicleTypeSecure(), SUMOVehicleParameter::id, SUMOVTypeParameter::id, SUMOVehicleParameter::incrementFlow(), SUMOVehicleParameter::line, myDepartures, myDoPTRouting, myFlows, myHaveActiveFlows, myKeepVTypeDist, RandHelper::rand(), SUMOVehicleParameter::repetitionEnd, SUMOVehicleParameter::repetitionNumber, SUMOVehicleParameter::repetitionProbability, SUMOVehicleParameter::repetitionsDone, SUMOVehicleParameter::repetitionTotalOffset, SUMOVehicleParameter::routeid, SUMOVehicleParameter::stops, toString(), TS, and SUMOVehicleParameter::vtypeid.
Referenced by saveAndRemoveRoutesUntil().
bool RONet::checkVType | ( | const std::string & | id | ) |
Checks whether the vehicle type (distribution) may be added.
This method checks also whether the default type may still be replaced
[in] | id | The id of the vehicle type (distribution) to add |
Definition at line 383 of file RONet.cpp.
References DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, NamedObjectCont< T >::get(), myDefaultPedTypeMayBeDeleted, myDefaultVTypeMayBeDeleted, myVehicleTypes, myVTypeDistDict, and NamedObjectCont< T >::remove().
Referenced by addVehicleType(), and addVTypeDistribution().
void RONet::cleanup | ( | ) |
closes the file output for computed routes and deletes associated threads if necessary
Definition at line 329 of file RONet.cpp.
References RouteCostCalculator< R, E, V >::cleanup(), OutputDevice::close(), myRouteAlternativesOutput, myRoutesOutput, and myTypesOutput.
Referenced by computeRoutes().
|
private |
Definition at line 592 of file RONet.cpp.
References RORoutable::computeRoute(), RORoutable::getDepartEdge(), RORoutable::getID(), RORoutable::getMaxSpeed(), ROEdge::getNumericalID(), RORoutable::getVClass(), myErrorHandler, myRoutables, RouterProvider< E, L, N, V >::setBulkMode(), and WRITE_WARNING.
Referenced by saveAndRemoveRoutesUntil().
bool RONet::furtherStored | ( | ) |
Returns the information whether further vehicles, persons or containers are stored.
Definition at line 753 of file RONet.cpp.
References myContainers, myFlows, myHaveActiveFlows, myRoutables, and NamedObjectCont< T >::size().
Referenced by ROLoader::openRoutes(), and ROLoader::processRoutes().
SUMOTime RONet::getDeparture | ( | const std::string & | vehID | ) | const |
returns departure time for the given vehicle id
Definition at line 459 of file RONet.cpp.
References myVehIDs.
Referenced by RORouteHandler::addRide(), and RORouteHandler::addTransport().
|
inline |
Retrieves all TAZ (districts) from the network.
Definition at line 145 of file RONet.h.
References myDistricts.
Referenced by main().
|
inline |
Retrieves an edge from the network.
This is not very pretty, but necessary, though, as routes run over instances, not over ids.
[in] | name | The name of the edge to retrieve |
Definition at line 157 of file RONet.h.
References NamedObjectCont< T >::get(), and myEdges.
Referenced by addDistrictEdge(), ROJTRTurnDefLoader::addEdgeRel(), ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), RORouteHandler::addRide(), RORouteHandler::addStop(), ROVehicle::addStop(), ROJTRTurnDefLoader::addToEdge(), ROJTRTurnDefLoader::beginFromEdge(), RORouteHandler::closeRoute(), ROMAAssignments::computePath(), RODFNet::getDetectorEdge(), getEdgeForLaneID(), RORouteHandler::getJunctionTaz(), ROEdge::getStopPosition(), ROMAAssignments::incremental(), loadJTRDefinitions(), RODFDetectorHandler::myStartElement(), ROJTRTurnDefLoader::myStartElement(), RONetHandler::parseConnection(), RORouteHandler::parseEdges(), RORouteHandler::parseFromViaTo(), AGActivityGenHandler::parseStreets(), RORouteHandler::parseWalkPositions(), ROVehicle::ROVehicle(), ROVehicle::saveAsXML(), ROMAAssignments::sue(), RODFDetectorCon::writeEmitters(), and RODFDetectorCon::writeSpeedTrigger().
ROEdge * RONet::getEdgeForLaneID | ( | const std::string & | laneID | ) | const |
Retrieves an edge from the network when the lane id is given.
[in] | laneID | The name of the lane to retrieve the edge for |
Definition at line 771 of file RONet.cpp.
References getEdge(), and SUMOXMLDefinitions::getEdgeIDFromLane().
Referenced by adaptIntermodalRouter(), getLane(), RONetHandler::parseAccess(), and RONetHandler::parseStoppingPlace().
|
inline |
Definition at line 409 of file RONet.h.
References myEdges.
Referenced by RODFNet::buildApproachList(), AGCity::completeStreets(), RORouteHandler::getLaneTree(), ROMAAssignments::incremental(), initNet(), ROLoader::loadNet(), ROLoader::loadWeights(), ROMAAssignments::resetFlows(), ROMAAssignments::sue(), and ROMAAssignments::writeInterval().
int RONet::getEdgeNumber | ( | ) | const |
Returns the total number of edges the network contains including internal edges.
Definition at line 759 of file RONet.cpp.
References myEdges, and NamedObjectCont< T >::size().
Referenced by computeAllPairs(), computeRoutes(), and main().
|
static |
Returns the pointer to the unique instance of RONet (singleton).
Definition at line 56 of file RONet.cpp.
References myInstance.
Referenced by ROPerson::addTrip(), ROEdge::getStopPosition(), ROEdge::getSuccessors(), ROEdge::getViaSuccessors(), ROPerson::Ride::saveAsXML(), ROPerson::Walk::saveAsXML(), ROVehicle::saveAsXML(), and ROPerson::PersonTrip::saveVehicles().
int RONet::getInternalEdgeNumber | ( | ) | const |
Returns the number of internal edges the network contains.
Definition at line 765 of file RONet.cpp.
References myNumInternalEdges.
Referenced by computeAllPairs().
ROLane * RONet::getLane | ( | const std::string & | laneID | ) | const |
Retrieves a lane rom the network given it's id.
[in] | laneID | The name of the lane to retrieve the edge for |
Definition at line 777 of file RONet.cpp.
References getEdgeForLaneID(), SUMOXMLDefinitions::getIndexFromLane(), and ROEdge::getLanes().
Referenced by RONetHandler::parseAccess().
|
inline |
Retrieves an node from the network.
[in] | name | The name of the node to retrieve |
Definition at line 193 of file RONet.h.
References NamedObjectCont< T >::get(), and myNodes.
Referenced by RONetHandler::parseEdge(), and RONetHandler::parseJunction().
const std::map< SUMOVehicleClass, double > * RONet::getRestrictions | ( | const std::string & | id | ) | const |
Returns the restrictions for an edge type If no restrictions are present, 0 is returned.
[in] | id | The id of the type |
Definition at line 139 of file RONet.cpp.
References myRestrictions.
Referenced by RONetHandler::parseEdge().
|
inline |
Returns the named route definition.
[in] | name | The name of the route definition to retrieve |
Check whether a const pointer may be returned
Rename myRoutes to myRouteDefinitions
Definition at line 305 of file RONet.h.
References NamedObjectCont< T >::get(), and myRoutes.
Referenced by adaptIntermodalRouter(), RORouteHandler::addWalk(), checkFlows(), RORouteHandler::closeFlow(), RORouteHandler::closeRoute(), RORouteHandler::closeVehicle(), RORouteHandler::openRoute(), and RORouteHandler::openRouteDistribution().
|
inline |
Definition at line 427 of file RONet.h.
References myRouteAlternativesOutput, and myRoutesOutput.
Referenced by computeRoutes().
|
inline |
Retrieves a stopping place from the network.
[in] | id | The name of the stop to retrieve |
[in] | category | The type of stop |
Definition at line 216 of file RONet.h.
References myStoppingPlaces.
Referenced by RORouteHandler::retrieveStoppingPlace().
const std::string RONet::getStoppingPlaceElement | ( | const std::string & | id | ) | const |
return the element name for the given stopping place id
Definition at line 862 of file RONet.cpp.
References SUMOVehicleParameter::Stop::actType, myStoppingPlaces, SUMO_TAG_BUS_STOP, and toString().
Referenced by ROPerson::Ride::saveAsXML(), and ROPerson::Walk::saveAsXML().
const std::string RONet::getStoppingPlaceName | ( | const std::string & | id | ) | const |
return the name for the given stopping place id
Definition at line 850 of file RONet.cpp.
References SUMOVehicleParameter::Stop::busstop, and myStoppingPlaces.
Referenced by ROPerson::Ride::saveAsXML(), and ROPerson::Walk::saveAsXML().
SUMOVTypeParameter * RONet::getVehicleTypeSecure | ( | const std::string & | id | ) |
Retrieves the named vehicle type.
If the name is "" the default type is returned. If the named vehicle type (or typeDistribution) was not added to the net before 0 is returned
[in] | id | The id of the vehicle type to return |
Definition at line 353 of file RONet.cpp.
References DEFAULT_BIKETYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, NamedObjectCont< T >::get(), myDefaultBikeTypeMayBeDeleted, myDefaultPedTypeMayBeDeleted, myDefaultVTypeMayBeDeleted, myVehicleTypes, and myVTypeDistDict.
Referenced by ROPerson::addTrip(), checkFlows(), RORouteHandler::closeFlow(), RORouteHandler::closePerson(), RORouteHandler::closePersonFlow(), RORouteHandler::closeVehicle(), computeRoutes(), RORouteHandler::openRoute(), RORouteHandler::openVehicleTypeDistribution(), RORouteHandler::parseGeoEdges(), and ROMAAssignments::ROMAAssignments().
|
inline |
return whether the network contains bidirectional rail edges
Definition at line 420 of file RONet.h.
References myHasBidiEdges.
Referenced by computeRoutes().
bool RONet::hasLoadedEffort | ( | ) | const |
whether efforts were loaded from file
Definition at line 840 of file RONet.cpp.
References myEdges.
Referenced by computeRoutes().
bool RONet::hasPermissions | ( | ) | const |
Definition at line 829 of file RONet.cpp.
References myHavePermissions.
Referenced by computeRoutes().
bool RONet::knowsVehicle | ( | const std::string & | id | ) | const |
returns whether a vehicle with the given id was already loaded
Definition at line 454 of file RONet.cpp.
References myVehIDs.
Referenced by RORouteHandler::addRide(), and RORouteHandler::addTransport().
void RONet::openOutput | ( | const OptionsCont & | options | ) |
Opens the output for computed routes.
If one of the file outputs can not be build, an IOError is thrown.
[in] | options | The options to be asked for "output-file", "alternatives-output" and "vtype-output" |
Definition at line 281 of file RONet.cpp.
References OptionsCont::exists(), OptionsCont::getBool(), OutputDevice::getDevice(), OptionsCont::getString(), OutputDevice::isNull(), OptionsCont::isSet(), myRouteAlternativesOutput, myRoutesOutput, myTypesOutput, SUMO_TAG_ROUTES, OutputDevice::writeAttr(), and OutputDevice::writeHeader().
Referenced by computeRoutes().
SUMOTime RONet::saveAndRemoveRoutesUntil | ( | OptionsCont & | options, |
const RORouterProvider & | provider, | ||
SUMOTime | time | ||
) |
Computes routes described by their definitions and saves them.
As long as a vehicle with a departure time smaller than the given exists, its route is computed and it is written and removed from the internal container.
[in] | options | The options used during this process |
[in] | provider | The router provider for routes computation |
[in] | time | The time until which route definitions shall be processed |
Definition at line 642 of file RONet.cpp.
References checkFlows(), RORoutable::computeRoute(), createBulkRouteRequests(), OptionsCont::getBool(), MsgHandler::getErrorInstance(), Named::getID(), OptionsCont::getInt(), ROVehicle::getRouteDefinition(), RORoutable::getRoutingSuccess(), MsgHandler::getWarningInstance(), RORoutable::isPartOfFlow(), RORoutable::isPublicTransport(), MIN2(), myContainers, myDiscardedRouteNo, myErrorHandler, myHaveActiveFlows, myRoutables, myRouteAlternativesOutput, myRoutes, myRoutesOutput, myTypesOutput, myVehIDs, myWrittenRouteNo, NamedObjectCont< T >::remove(), SUMOTime_MAX, toString(), RORoutable::write(), WRITE_MESSAGE, and OutputDevice::writePreformattedTag().
Referenced by ROLoader::processRoutes().
void RONet::setBidiEdges | ( | const std::map< ROEdge *, std::string > & | bidiMap | ) |
add a taz for every junction unless a taz with the same id already exists
Definition at line 244 of file RONet.cpp.
References NamedObjectCont< T >::get(), myEdges, myHasBidiEdges, and WRITE_ERROR.
Referenced by ROLoader::loadNet().
void RONet::setPermissionsFound | ( | ) |
Definition at line 835 of file RONet.cpp.
References myHavePermissions.
Referenced by RONetHandler::parseLane().
void RONet::writeIntermodal | ( | const OptionsCont & | options, |
ROIntermodalRouter & | router | ||
) | const |
Writes the intermodal network and weights if requested.
If one of the file outputs can not be build, an IOError is thrown.
[in] | options | The options to be asked for "intermodal-network-output" and "intermodal-weight-output" |
Definition at line 310 of file RONet.cpp.
References OutputDevice::closeTag(), OutputDevice::createDeviceByOption(), OptionsCont::exists(), OutputDevice::getDevice(), OutputDevice::getDeviceByOption(), OptionsCont::getString(), OptionsCont::isSet(), OutputDevice::openTag(), SUMO_ATTR_BEGIN, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_TAG_INTERVAL, SUMOTime_MAX, OutputDevice::writeAttr(), IntermodalRouter< E, L, N, V >::writeNetwork(), and IntermodalRouter< E, L, N, V >::writeWeights().
Referenced by computeRoutes().
|
private |
Definition at line 519 of file RONet.h.
Referenced by addContainer(), furtherStored(), and saveAndRemoveRoutesUntil().
|
private |
Whether the default bicycle type was already used or can still be replaced.
Definition at line 503 of file RONet.h.
Referenced by getVehicleTypeSecure().
|
private |
Whether the default pedestrian type was already used or can still be replaced.
Definition at line 500 of file RONet.h.
Referenced by checkVType(), and getVehicleTypeSecure().
|
private |
Whether the default vehicle type was already used or can still be replaced.
Definition at line 497 of file RONet.h.
Referenced by checkVType(), and getVehicleTypeSecure().
|
private |
Departure times for randomized flows.
Definition at line 525 of file RONet.h.
Referenced by addFlow(), and checkFlows().
|
private |
The number of discarded routes.
Definition at line 543 of file RONet.h.
Referenced by saveAndRemoveRoutesUntil().
|
private |
traffic assignment zones with sources and sinks
Definition at line 528 of file RONet.h.
Referenced by addDistrict(), addDistrictEdge(), addJunctionTaz(), and getDistricts().
|
private |
whether to calculate routes for public transport
Definition at line 564 of file RONet.h.
Referenced by addVehicle(), and checkFlows().
|
private |
Known edges.
Definition at line 483 of file RONet.h.
Referenced by addEdge(), getEdge(), getEdgeMap(), getEdgeNumber(), hasLoadedEffort(), and setBidiEdges().
|
private |
handler for ignorable error messages
Definition at line 558 of file RONet.h.
Referenced by createBulkRouteRequests(), and saveAndRemoveRoutesUntil().
|
private |
Known flows.
Definition at line 512 of file RONet.h.
Referenced by adaptIntermodalRouter(), addFlow(), checkFlows(), and furtherStored().
|
private |
whether the network contains bidirectional railway edges
Definition at line 567 of file RONet.h.
Referenced by hasBidiEdges(), and setBidiEdges().
|
private |
whether any flows are still active
Definition at line 515 of file RONet.h.
Referenced by addFlow(), checkFlows(), furtherStored(), and saveAndRemoveRoutesUntil().
|
private |
Whether the network contains edges which not all vehicles may pass.
Definition at line 549 of file RONet.h.
Referenced by hasPermissions(), and setPermissionsFound().
|
staticprivate |
Unique instance of RONet.
Definition at line 471 of file RONet.h.
Referenced by adaptIntermodalRouter(), getInstance(), and RONet().
|
private |
whether to keep the the vtype distribution in output
Definition at line 561 of file RONet.h.
Referenced by checkFlows().
|
private |
Known nodes.
Definition at line 480 of file RONet.h.
Referenced by addJunctionTaz(), addNode(), and getNode().
|
private |
The number of internal edges in the dictionary.
Definition at line 555 of file RONet.h.
Referenced by addEdge(), and getInternalEdgeNumber().
|
private |
|
private |
vehicles to keep for public transport routing
Definition at line 522 of file RONet.h.
Referenced by adaptIntermodalRouter(), addVehicle(), and ~RONet().
|
private |
The vehicle class specific speed restrictions.
Definition at line 552 of file RONet.h.
Referenced by addRestriction(), and getRestrictions().
|
private |
Known routables.
Definition at line 509 of file RONet.h.
Referenced by addPerson(), addVehicle(), createBulkRouteRequests(), furtherStored(), saveAndRemoveRoutesUntil(), and ~RONet().
|
private |
The file to write the computed route alternatives into.
Definition at line 534 of file RONet.h.
Referenced by cleanup(), getRouteOutput(), openOutput(), and saveAndRemoveRoutesUntil().
|
private |
Known routes.
Definition at line 506 of file RONet.h.
Referenced by addRouteDef(), getRouteDef(), saveAndRemoveRoutesUntil(), and ~RONet().
|
private |
The file to write the computed routes into.
Definition at line 531 of file RONet.h.
Referenced by cleanup(), getRouteOutput(), openOutput(), and saveAndRemoveRoutesUntil().
|
private |
Known bus / train / container stops and parking areas.
Definition at line 486 of file RONet.h.
Referenced by adaptIntermodalRouter(), addStoppingPlace(), getStoppingPlace(), getStoppingPlaceElement(), and getStoppingPlaceName().
|
private |
The file to write the vehicle types into.
Definition at line 537 of file RONet.h.
Referenced by cleanup(), openOutput(), and saveAndRemoveRoutesUntil().
|
private |
Known vehicle types.
Definition at line 489 of file RONet.h.
Referenced by addVehicleType(), checkVType(), getVehicleTypeSecure(), and RONet().
|
private |
Known vehicle ids and their departure.
Definition at line 474 of file RONet.h.
Referenced by addVehicle(), getDeparture(), knowsVehicle(), and saveAndRemoveRoutesUntil().
|
private |
A distribution of vehicle types (probability->vehicle type)
Definition at line 494 of file RONet.h.
Referenced by addVTypeDistribution(), checkVType(), and getVehicleTypeSecure().
|
private |
The number of written routes.
Definition at line 546 of file RONet.h.
Referenced by saveAndRemoveRoutesUntil().