Eclipse SUMO - Simulation of Urban MObility
RODFNet Class Reference

A DFROUTER-network. More...

#include <RODFNet.h>

Inheritance diagram for RODFNet:
Collaboration diagram for RODFNet:

Data Structures

class  DFRouteDescByTimeComperator
 
struct  idComp
 comparator for maps using edges as key, used only in myDetectorsOnEdges to make tests comparable More...
 
struct  IterationEdge
 

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...
 
void buildApproachList ()
 
void buildDetectorDependencies (RODFDetectorCon &detectors)
 
void buildEdgeFlowMap (const RODFDetectorFlows &flows, const RODFDetectorCon &detectors, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset)
 
void buildRoutes (RODFDetectorCon &det, bool keepUnfoundEnds, bool includeInBetween, bool keepShortestOnly, int maxFollowingLength) const
 
void computeTypes (RODFDetectorCon &dets, bool sourcesStrict) const
 
double getAbsPos (const RODFDetector &det) const
 
double getAvgSpeedFactorLKW () const
 
double getAvgSpeedFactorPKW () const
 
const std::vector< std::string > & getDetectorList (ROEdge *edge) const
 
double getMaxSpeedFactorLKW () const
 
double getMaxSpeedFactorPKW () const
 
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...
 
bool hasDetector (ROEdge *edge) const
 
void mesoJoin (RODFDetectorCon &detectors, RODFDetectorFlows &flows)
 
void removeEmptyDetectors (RODFDetectorCon &detectors, RODFDetectorFlows &flows)
 
void reportEmptyDetectors (RODFDetectorCon &detectors, RODFDetectorFlows &flows)
 
void revalidateFlows (const RODFDetectorCon &detectors, RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset)
 
 RODFNet (bool amInHighwayMode)
 Constructor. More...
 
 ~RODFNet ()
 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)
 
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...
 
ROEdgegetEdge (const std::string &name) const
 Retrieves an edge from the network. More...
 
ROEdgegetEdgeForLaneID (const std::string &laneID) const
 Retrieves an edge from the network when the lane id is given. More...
 
void addNode (RONode *node)
 
RONodegetNode (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::StopgetStoppingPlace (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...
 
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...
 
SUMOVTypeParametergetVehicleTypeSecure (const std::string &id)
 Retrieves the named vehicle type. More...
 
bool addRouteDef (RORouteDef *def)
 
RORouteDefgetRouteDef (const std::string &name) const
 Returns the named route definition. More...
 
virtual bool addVehicle (const std::string &id, ROVehicle *veh)
 
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 RONetgetInstance ()
 Returns the pointer to the unique instance of RONet (singleton). More...
 

Protected Member Functions

void buildDetectorEdgeDependencies (RODFDetectorCon &dets) const
 
void computeRoutesFor (ROEdge *edge, RODFRouteDesc &base, int no, bool keepUnfoundEnds, bool keepShortestOnly, ROEdgeVector &visited, const RODFDetector &det, RODFRouteCont &into, const RODFDetectorCon &detectors, int maxFollowingLength, ROEdgeVector &seen) const
 
ROEdgegetDetectorEdge (const RODFDetector &det) const
 
bool hasApproached (ROEdge *edge) const
 
bool hasApproaching (ROEdge *edge) const
 
bool hasInBetweenDetectorsOnly (ROEdge *edge, const RODFDetectorCon &detectors) const
 
bool hasSourceDetector (ROEdge *edge, const RODFDetectorCon &detectors) const
 
bool isDestination (const RODFDetector &det, const RODFDetectorCon &detectors) const
 
bool isDestination (const RODFDetector &det, ROEdge *edge, ROEdgeVector &seen, const RODFDetectorCon &detectors) const
 
bool isFalseSource (const RODFDetector &det, const RODFDetectorCon &detectors) const
 
bool isFalseSource (const RODFDetector &det, ROEdge *edge, ROEdgeVector &seen, const RODFDetectorCon &detectors) const
 
bool isSource (const RODFDetector &det, const RODFDetectorCon &detectors, bool strict) const
 
bool isSource (const RODFDetector &det, ROEdge *edge, ROEdgeVector &seen, const RODFDetectorCon &detectors, bool strict) const
 
void revalidateFlows (const RODFDetector *detector, RODFDetectorFlows &flows, SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset)
 

Private Attributes

bool myAmInHighwayMode
 
std::map< ROEdge *, ROEdgeVectormyApproachedEdges
 Map of edge name->list of names of edges approached by this edge. More...
 
std::map< ROEdge *, ROEdgeVectormyApproachingEdges
 Map of edge name->list of names of this edge approaching edges. More...
 
double myAvgSpeedFactorLKW
 
double myAvgSpeedFactorPKW
 
std::map< std::string, ROEdge * > myDetectorEdges
 
std::map< ROEdge *, std::vector< std::string >, idCompmyDetectorsOnEdges
 
std::vector< std::string > myDisallowedEdges
 List of ids of edges that shall not be used. More...
 
int myInBetweenNumber
 
int myInvalidNumber
 
bool myKeepTurnarounds
 
double myMaxSpeedFactorLKW
 
double myMaxSpeedFactorPKW
 maximum speed factor in measurements More...
 
int mySinkNumber
 
int mySourceNumber
 

Processing stored vehicle definitions

std::set< std::string > myVehIDs
 Known vehicle ids. 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...
 
OutputDevicemyRoutesOutput
 The file to write the computed routes into. More...
 
OutputDevicemyRouteAlternativesOutput
 The file to write the computed route alternatives into. More...
 
OutputDevicemyTypesOutput
 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...
 
MsgHandlermyErrorHandler
 handler for ignorable error messages More...
 
const bool myKeepVTypeDist
 whether to keep the the vtype distribution in output 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 ()
 
OutputDevicegetRouteOutput (const bool alternative=false)
 
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 RONetmyInstance = nullptr
 Unique instance of RONet. More...
 
static void adaptIntermodalRouter (ROIntermodalRouter &router)
 
void checkFlows (SUMOTime time, MsgHandler *errorHandler)
 
void createBulkRouteRequests (const RORouterProvider &provider, const SUMOTime time, const bool removeLoops)
 

Detailed Description

A DFROUTER-network.

Definition at line 45 of file RODFNet.h.

Member Typedef Documentation

◆ ContainerMap

typedef std::multimap<const SUMOTime, const std::string> RONet::ContainerMap
privateinherited

Known containers.

Definition at line 494 of file RONet.h.

◆ RoutablesMap

typedef std::map<const SUMOTime, std::vector<RORoutable*> > RONet::RoutablesMap
inherited

Definition at line 67 of file RONet.h.

◆ VTypeDistDictType

typedef std::map< std::string, RandomDistributor<SUMOVTypeParameter*>* > RONet::VTypeDistDictType
privateinherited

Vehicle type distribution dictionary type.

Definition at line 468 of file RONet.h.

Constructor & Destructor Documentation

◆ RODFNet()

RODFNet::RODFNet ( bool  amInHighwayMode)

Constructor.

Parameters
[in]amInHighwayModeWhether search for following edges shall stop at slow edges

Definition at line 46 of file RODFNet.cpp.

References OptionsCont::getBool(), OptionsCont::getOptions(), OptionsCont::getStringVector(), myDisallowedEdges, and myKeepTurnarounds.

◆ ~RODFNet()

RODFNet::~RODFNet ( )

Destructor.

Definition at line 58 of file RODFNet.cpp.

Member Function Documentation

◆ adaptIntermodalRouter()

◆ addContainer()

void RONet::addContainer ( const SUMOTime  depart,
const std::string  desc 
)
inherited

Definition at line 403 of file RONet.cpp.

References RONet::myContainers.

Referenced by RORouteHandler::closeContainer().

◆ addDistrict()

bool RONet::addDistrict ( const std::string  id,
ROEdge source,
ROEdge sink 
)
inherited

◆ addDistrictEdge()

bool RONet::addDistrictEdge ( const std::string  tazID,
const std::string  edgeID,
const bool  isSource 
)
inherited

◆ addEdge()

bool RONet::addEdge ( ROEdge edge)
virtualinherited

◆ addFlow()

◆ addNode()

void RONet::addNode ( RONode node)
inherited

Definition at line 191 of file RONet.cpp.

References NamedObjectCont< T >::add(), Named::getID(), RONet::myNodes, and WRITE_ERROR.

Referenced by RONetHandler::parseEdge().

◆ addPerson()

bool RONet::addPerson ( ROPerson person)
inherited

◆ addRestriction()

void RONet::addRestriction ( const std::string &  id,
const SUMOVehicleClass  svc,
const double  speed 
)
inherited

Adds a restriction for an edge type.

Parameters
[in]idThe id of the type
[in]svcThe vehicle class the restriction refers to
[in]speedThe restricted speed

Definition at line 122 of file RONet.cpp.

References RONet::myRestrictions.

Referenced by RONetHandler::myStartElement().

◆ addRouteDef()

bool RONet::addRouteDef ( RORouteDef def)
inherited

◆ addStoppingPlace()

void RONet::addStoppingPlace ( const std::string &  id,
const SumoXMLTag  category,
SUMOVehicleParameter::Stop stop 
)
inherited

◆ addVehicle()

bool RONet::addVehicle ( const std::string &  id,
ROVehicle veh 
)
virtualinherited

◆ addVehicleType()

bool RONet::addVehicleType ( SUMOVTypeParameter type)
virtualinherited

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.

Parameters
[in]defThe vehicle type to add
Returns
Whether the vehicle type could be added

Definition at line 334 of file RONet.cpp.

References NamedObjectCont< T >::add(), RONet::checkVType(), SUMOVTypeParameter::id, RONet::myVehicleTypes, and WRITE_ERROR.

Referenced by RORouteHandler::closeVType().

◆ addVTypeDistribution()

bool RONet::addVTypeDistribution ( const std::string &  id,
RandomDistributor< SUMOVTypeParameter * > *  vehTypeDistribution 
)
inherited

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.

Parameters
[in]idThe id of the distribution to add
[in]vehTypeDistributionThe vehicle type distribution to add
Returns
Whether the vehicle type could be added

Definition at line 347 of file RONet.cpp.

References RONet::checkVType(), and RONet::myVTypeDistDict.

Referenced by RORouteHandler::closeVehicleTypeDistribution().

◆ buildApproachList()

◆ buildDetectorDependencies()

◆ buildDetectorEdgeDependencies()

void RODFNet::buildDetectorEdgeDependencies ( RODFDetectorCon dets) const
protected

◆ buildEdgeFlowMap()

◆ buildRoutes()

◆ checkFlows()

◆ checkVType()

bool RONet::checkVType ( const std::string &  id)
inherited

Checks whether the vehicle type (distribution) may be added.

This method checks also whether the default type may still be replaced

Parameters
[in]idThe id of the vehicle type (distribution) to add
Returns
Whether the type (distribution) may be added

Definition at line 309 of file RONet.cpp.

References DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, NamedObjectCont< T >::get(), RONet::myDefaultPedTypeMayBeDeleted, RONet::myDefaultVTypeMayBeDeleted, RONet::myVehicleTypes, RONet::myVTypeDistDict, and NamedObjectCont< T >::remove().

Referenced by RONet::addVehicleType(), and RONet::addVTypeDistribution().

◆ cleanup()

void RONet::cleanup ( )
inherited

closes the file output for computed routes and deletes associated threads if necessary

Definition at line 255 of file RONet.cpp.

References RouteCostCalculator< R, E, V >::cleanup(), OutputDevice::close(), RONet::myRouteAlternativesOutput, RONet::myRoutesOutput, and RONet::myTypesOutput.

Referenced by computeRoutes().

◆ computeRoutesFor()

◆ computeTypes()

◆ createBulkRouteRequests()

◆ furtherStored()

bool RONet::furtherStored ( )
inherited

Returns the information whether further vehicles, persons or containers are stored.

Definition at line 643 of file RONet.cpp.

References RONet::myContainers, RONet::myFlows, RONet::myHaveActiveFlows, RONet::myRoutables, and NamedObjectCont< T >::size().

Referenced by ROLoader::openRoutes(), and ROLoader::processRoutes().

◆ getAbsPos()

double RODFNet::getAbsPos ( const RODFDetector det) const

Definition at line 671 of file RODFNet.cpp.

References getDetectorEdge(), ROEdge::getLength(), and RODFDetector::getPos().

Referenced by isDestination(), and isSource().

◆ getAvgSpeedFactorLKW()

double RODFNet::getAvgSpeedFactorLKW ( ) const
inline

Definition at line 99 of file RODFNet.h.

References myAvgSpeedFactorLKW.

Referenced by RODFDetectorCon::writeEmitters().

◆ getAvgSpeedFactorPKW()

double RODFNet::getAvgSpeedFactorPKW ( ) const
inline

Definition at line 95 of file RODFNet.h.

References myAvgSpeedFactorPKW.

Referenced by RODFDetectorCon::writeEmitters().

◆ getDetectorEdge()

ROEdge * RODFNet::getDetectorEdge ( const RODFDetector det) const
protected

◆ getDetectorList()

const std::vector< std::string > & RODFNet::getDetectorList ( ROEdge edge) const

Definition at line 665 of file RODFNet.cpp.

References myDetectorsOnEdges.

◆ getDistricts()

const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >& RONet::getDistricts ( ) const
inlineinherited

Retrieves all TAZ (districts) from the network.

Returns
The map of all districts

Definition at line 141 of file RONet.h.

References RONet::myDistricts.

Referenced by main().

◆ getEdge()

◆ getEdgeForLaneID()

ROEdge* RONet::getEdgeForLaneID ( const std::string &  laneID) const
inlineinherited

Retrieves an edge from the network when the lane id is given.

Parameters
[in]laneIDThe name of the lane to retrieve the edge for
Returns
The edge of the named lane if known, otherwise 0

Definition at line 163 of file RONet.h.

References RONet::getEdge().

Referenced by RONet::adaptIntermodalRouter(), ROVehicle::addStop(), RONetHandler::parseAccess(), and RONetHandler::parseStoppingPlace().

◆ getEdgeMap()

◆ getEdgeNumber()

int RONet::getEdgeNumber ( ) const
inherited

Returns the total number of edges the network contains including internal edges.

Definition at line 649 of file RONet.cpp.

References RONet::myEdges, and NamedObjectCont< T >::size().

Referenced by computeAllPairs(), computeRoutes(), and main().

◆ getInstance()

RONet * RONet::getInstance ( void  )
staticinherited

Returns the pointer to the unique instance of RONet (singleton).

Returns
Pointer to the unique RONet-instance

Definition at line 56 of file RONet.cpp.

References RONet::myInstance.

Referenced by ROPerson::addTrip(), ROEdge::getStopPosition(), ROEdge::getSuccessors(), ROEdge::getViaSuccessors(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), and ROPerson::Walk::saveAsXML().

◆ getInternalEdgeNumber()

int RONet::getInternalEdgeNumber ( ) const
inherited

Returns the number of internal edges the network contains.

Definition at line 655 of file RONet.cpp.

References RONet::myNumInternalEdges.

Referenced by computeAllPairs().

◆ getMaxSpeedFactorLKW()

double RODFNet::getMaxSpeedFactorLKW ( ) const
inline

Definition at line 91 of file RODFNet.h.

References myMaxSpeedFactorLKW.

Referenced by RODFDetectorCon::writeEmitters().

◆ getMaxSpeedFactorPKW()

double RODFNet::getMaxSpeedFactorPKW ( ) const
inline

Definition at line 87 of file RODFNet.h.

References myMaxSpeedFactorPKW.

Referenced by RODFDetectorCon::writeEmitters().

◆ getNode()

RONode* RONet::getNode ( const std::string &  id) const
inlineinherited

Retrieves an node from the network.

Parameters
[in]nameThe name of the node to retrieve
Returns
The named node if known, otherwise 0
Todo:
Check whether a const pointer may be returned

Definition at line 185 of file RONet.h.

References NamedObjectCont< T >::get(), and RONet::myNodes.

Referenced by RONetHandler::parseEdge(), and RONetHandler::parseJunction().

◆ getRestrictions()

const std::map< SUMOVehicleClass, double > * RONet::getRestrictions ( const std::string &  id) const
inherited

Returns the restrictions for an edge type If no restrictions are present, 0 is returned.

Parameters
[in]idThe id of the type
Returns
The mapping of vehicle classes to maximum speeds

Definition at line 128 of file RONet.cpp.

References RONet::myRestrictions.

Referenced by RONetHandler::parseEdge().

◆ getRouteDef()

RORouteDef* RONet::getRouteDef ( const std::string &  name) const
inlineinherited

Returns the named route definition.

Parameters
[in]nameThe name of the route definition to retrieve
Returns
The named route definition if known, otherwise 0
Todo:

Check whether a const pointer may be returned

Rename myRoutes to myRouteDefinitions

Definition at line 294 of file RONet.h.

References NamedObjectCont< T >::get(), and RONet::myRoutes.

Referenced by RONet::adaptIntermodalRouter(), RORouteHandler::addWalk(), RONet::checkFlows(), RORouteHandler::closeFlow(), RORouteHandler::closeRoute(), RORouteHandler::closeVehicle(), RORouteHandler::openRoute(), and RORouteHandler::openRouteDistribution().

◆ getRouteOutput()

OutputDevice* RONet::getRouteOutput ( const bool  alternative = false)
inlineinherited

Definition at line 403 of file RONet.h.

References RONet::myRouteAlternativesOutput, and RONet::myRoutesOutput.

Referenced by computeRoutes().

◆ getStoppingPlace()

const SUMOVehicleParameter::Stop* RONet::getStoppingPlace ( const std::string &  id,
const SumoXMLTag  category 
) const
inlineinherited

Retrieves a stopping place from the network.

Parameters
[in]idThe name of the stop to retrieve
[in]categoryThe type of stop
Returns
The named stop if known, otherwise 0

Definition at line 208 of file RONet.h.

References RONet::myStoppingPlaces.

Referenced by RORouteHandler::addPersonTrip(), RORouteHandler::addStop(), and RORouteHandler::myStartElement().

◆ getStoppingPlaceName()

const std::string RONet::getStoppingPlaceName ( const std::string &  id) const
inherited

return the name for the given stopping place id

Definition at line 704 of file RONet.cpp.

References SUMOVehicleParameter::Stop::busstop, and RONet::myStoppingPlaces.

Referenced by ROPerson::Ride::saveAsXML(), and ROPerson::Walk::saveAsXML().

◆ getVehicleTypeSecure()

SUMOVTypeParameter * RONet::getVehicleTypeSecure ( const std::string &  id)
inherited

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

Parameters
[in]idThe id of the vehicle type to return
Returns
The named vehicle type
Todo:
Check whether a const pointer may be returned

Definition at line 279 of file RONet.cpp.

References DEFAULT_BIKETYPE_ID, DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, NamedObjectCont< T >::get(), RONet::myDefaultBikeTypeMayBeDeleted, RONet::myDefaultPedTypeMayBeDeleted, RONet::myDefaultVTypeMayBeDeleted, RONet::myVehicleTypes, and RONet::myVTypeDistDict.

Referenced by ROPerson::addTrip(), RONet::checkFlows(), RORouteHandler::closeFlow(), RORouteHandler::closeVehicle(), computeRoutes(), RORouteHandler::myStartElement(), RORouteHandler::openVehicleTypeDistribution(), RORouteHandler::parseGeoEdges(), and ROMAAssignments::ROMAAssignments().

◆ hasApproached()

bool RODFNet::hasApproached ( ROEdge edge) const
protected

Definition at line 647 of file RODFNet.cpp.

References myApproachedEdges.

Referenced by computeRoutesFor(), and isDestination().

◆ hasApproaching()

bool RODFNet::hasApproaching ( ROEdge edge) const
protected

Definition at line 638 of file RODFNet.cpp.

References myApproachingEdges.

Referenced by isSource().

◆ hasDetector()

◆ hasInBetweenDetectorsOnly()

bool RODFNet::hasInBetweenDetectorsOnly ( ROEdge edge,
const RODFDetectorCon detectors 
) const
protected

◆ hasPermissions()

bool RONet::hasPermissions ( ) const
inherited

Definition at line 693 of file RONet.cpp.

References RONet::myHavePermissions.

Referenced by computeRoutes().

◆ hasSourceDetector()

bool RODFNet::hasSourceDetector ( ROEdge edge,
const RODFDetectorCon detectors 
) const
protected

◆ isDestination() [1/2]

bool RODFNet::isDestination ( const RODFDetector det,
const RODFDetectorCon detectors 
) const
protected

Definition at line 694 of file RODFNet.cpp.

References getDetectorEdge().

Referenced by computeTypes(), and isDestination().

◆ isDestination() [2/2]

◆ isFalseSource() [1/2]

bool RODFNet::isFalseSource ( const RODFDetector det,
const RODFDetectorCon detectors 
) const
protected

Definition at line 687 of file RODFNet.cpp.

References getDetectorEdge().

Referenced by computeTypes(), and isFalseSource().

◆ isFalseSource() [2/2]

◆ isSource() [1/2]

bool RODFNet::isSource ( const RODFDetector det,
const RODFDetectorCon detectors,
bool  strict 
) const
protected

Definition at line 679 of file RODFNet.cpp.

References getDetectorEdge().

Referenced by computeTypes(), and isSource().

◆ isSource() [2/2]

bool RODFNet::isSource ( const RODFDetector det,
ROEdge edge,
ROEdgeVector seen,
const RODFDetectorCon detectors,
bool  strict 
) const
protected

◆ mesoJoin()

◆ openOutput()

void RONet::openOutput ( const OptionsCont options)
inherited

Opens the output for computed routes.

If one of the file outputs can not be build, an IOError is thrown.

Parameters
[in]optionsThe options to be asked for "output-file", "alternatives-output" and "vtype-output"

Definition at line 215 of file RONet.cpp.

References OptionsCont::exists(), OptionsCont::getBool(), OutputDevice::getDevice(), OptionsCont::getString(), OptionsCont::isSet(), RONet::myRouteAlternativesOutput, RONet::myRoutesOutput, RONet::myTypesOutput, SUMO_TAG_ROUTES, OutputDevice::writeAttr(), and OutputDevice::writeHeader().

Referenced by computeRoutes().

◆ removeEmptyDetectors()

void RODFNet::removeEmptyDetectors ( RODFDetectorCon detectors,
RODFDetectorFlows flows 
)

◆ reportEmptyDetectors()

void RODFNet::reportEmptyDetectors ( RODFDetectorCon detectors,
RODFDetectorFlows flows 
)

Definition at line 608 of file RODFNet.cpp.

References RODFDetectorCon::getDetectors(), RODFDetectorFlows::knows(), and WRITE_MESSAGE.

Referenced by startComputation().

◆ revalidateFlows() [1/2]

◆ revalidateFlows() [2/2]

void RODFNet::revalidateFlows ( const RODFDetectorCon detectors,
RODFDetectorFlows flows,
SUMOTime  startTime,
SUMOTime  endTime,
SUMOTime  stepOffset 
)

Definition at line 571 of file RODFNet.cpp.

References RODFDetectorCon::getDetectors().

Referenced by startComputation().

◆ saveAndRemoveRoutesUntil()

SUMOTime RONet::saveAndRemoveRoutesUntil ( OptionsCont options,
const RORouterProvider provider,
SUMOTime  time 
)
inherited

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.

Parameters
[in]optionsThe options used during this process
[in]providerThe router provider for routes computation
[in]timeThe time until which route definitions shall be processed
Returns
The last seen departure time>=time

Definition at line 535 of file RONet.cpp.

References RONet::checkFlows(), RORoutable::computeRoute(), RONet::createBulkRouteRequests(), OptionsCont::getBool(), MsgHandler::getErrorInstance(), Named::getID(), OptionsCont::getInt(), ROVehicle::getRouteDefinition(), RORoutable::getRoutingSuccess(), MsgHandler::getWarningInstance(), RORoutable::isPartOfFlow(), RORoutable::isPublicTransport(), MIN2(), RONet::myContainers, RONet::myDiscardedRouteNo, RONet::myErrorHandler, RONet::myHaveActiveFlows, RONet::myRoutables, RONet::myRouteAlternativesOutput, RONet::myRoutes, RONet::myRoutesOutput, RONet::myTypesOutput, RONet::myVehIDs, RONet::myWrittenRouteNo, NamedObjectCont< T >::remove(), SUMOTime_MAX, toString(), RORoutable::write(), WRITE_MESSAGE, and OutputDevice::writePreformattedTag().

Referenced by ROLoader::processRoutes().

◆ setPermissionsFound()

void RONet::setPermissionsFound ( )
inherited

Definition at line 699 of file RONet.cpp.

References RONet::myHavePermissions.

Referenced by RONetHandler::parseLane().

◆ writeIntermodal()

void RONet::writeIntermodal ( const OptionsCont options,
ROIntermodalRouter router 
) const
inherited

Writes the intermodal network and weights if requested.

If one of the file outputs can not be build, an IOError is thrown.

Parameters
[in]optionsThe options to be asked for "intermodal-network-output" and "intermodal-weight-output"

Definition at line 236 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().

Field Documentation

◆ myAmInHighwayMode

bool RODFNet::myAmInHighwayMode
private

Definition at line 178 of file RODFNet.h.

Referenced by computeRoutesFor(), isDestination(), isFalseSource(), and isSource().

◆ myApproachedEdges

std::map<ROEdge*, ROEdgeVector > RODFNet::myApproachedEdges
private

Map of edge name->list of names of edges approached by this edge.

Definition at line 173 of file RODFNet.h.

Referenced by buildApproachList(), computeRoutesFor(), hasApproached(), isDestination(), isFalseSource(), and revalidateFlows().

◆ myApproachingEdges

std::map<ROEdge*, ROEdgeVector > RODFNet::myApproachingEdges
private

Map of edge name->list of names of this edge approaching edges.

Definition at line 170 of file RODFNet.h.

Referenced by buildApproachList(), hasApproaching(), isSource(), and revalidateFlows().

◆ myAvgSpeedFactorLKW

double RODFNet::myAvgSpeedFactorLKW
private

Definition at line 191 of file RODFNet.h.

Referenced by buildEdgeFlowMap(), and getAvgSpeedFactorLKW().

◆ myAvgSpeedFactorPKW

double RODFNet::myAvgSpeedFactorPKW
private

Definition at line 190 of file RODFNet.h.

Referenced by buildEdgeFlowMap(), and getAvgSpeedFactorPKW().

◆ myContainers

ContainerMap RONet::myContainers
privateinherited

◆ myDefaultBikeTypeMayBeDeleted

bool RONet::myDefaultBikeTypeMayBeDeleted
privateinherited

Whether the default bicycle type was already used or can still be replaced.

Definition at line 479 of file RONet.h.

Referenced by RONet::getVehicleTypeSecure().

◆ myDefaultPedTypeMayBeDeleted

bool RONet::myDefaultPedTypeMayBeDeleted
privateinherited

Whether the default pedestrian type was already used or can still be replaced.

Definition at line 476 of file RONet.h.

Referenced by RONet::checkVType(), and RONet::getVehicleTypeSecure().

◆ myDefaultVTypeMayBeDeleted

bool RONet::myDefaultVTypeMayBeDeleted
privateinherited

Whether the default vehicle type was already used or can still be replaced.

Definition at line 473 of file RONet.h.

Referenced by RONet::checkVType(), and RONet::getVehicleTypeSecure().

◆ myDepartures

std::map<std::string, std::vector<SUMOTime> > RONet::myDepartures
privateinherited

Departure times for randomized flows.

Definition at line 501 of file RONet.h.

Referenced by RONet::addFlow(), and RONet::checkFlows().

◆ myDetectorEdges

std::map<std::string, ROEdge*> RODFNet::myDetectorEdges
mutableprivate

◆ myDetectorsOnEdges

◆ myDisallowedEdges

std::vector<std::string> RODFNet::myDisallowedEdges
private

List of ids of edges that shall not be used.

Definition at line 182 of file RODFNet.h.

Referenced by buildApproachList(), and RODFNet().

◆ myDiscardedRouteNo

int RONet::myDiscardedRouteNo
privateinherited

The number of discarded routes.

Definition at line 519 of file RONet.h.

Referenced by RONet::saveAndRemoveRoutesUntil().

◆ myDistricts

std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > > RONet::myDistricts
privateinherited

traffic assignment zones with sources and sinks

Definition at line 504 of file RONet.h.

Referenced by RONet::addDistrict(), RONet::addDistrictEdge(), and RONet::getDistricts().

◆ myEdges

NamedObjectCont<ROEdge*> RONet::myEdges
privateinherited

Known edges.

Definition at line 459 of file RONet.h.

Referenced by RONet::addEdge(), RONet::getEdge(), RONet::getEdgeMap(), and RONet::getEdgeNumber().

◆ myErrorHandler

MsgHandler* RONet::myErrorHandler
privateinherited

handler for ignorable error messages

Definition at line 534 of file RONet.h.

Referenced by RONet::createBulkRouteRequests(), and RONet::saveAndRemoveRoutesUntil().

◆ myFlows

NamedObjectCont<SUMOVehicleParameter*> RONet::myFlows
privateinherited

Known flows.

Definition at line 488 of file RONet.h.

Referenced by RONet::adaptIntermodalRouter(), RONet::addFlow(), RONet::checkFlows(), and RONet::furtherStored().

◆ myHaveActiveFlows

bool RONet::myHaveActiveFlows
privateinherited

whether any flows are still active

Definition at line 491 of file RONet.h.

Referenced by RONet::checkFlows(), RONet::furtherStored(), and RONet::saveAndRemoveRoutesUntil().

◆ myHavePermissions

bool RONet::myHavePermissions
privateinherited

Whether the network contains edges which not all vehicles may pass.

Definition at line 525 of file RONet.h.

Referenced by RONet::hasPermissions(), and RONet::setPermissionsFound().

◆ myInBetweenNumber

int RODFNet::myInBetweenNumber
mutableprivate

Definition at line 179 of file RODFNet.h.

Referenced by computeTypes().

◆ myInstance

RONet * RONet::myInstance = nullptr
staticprivateinherited

Unique instance of RONet.

Definition at line 447 of file RONet.h.

Referenced by RONet::adaptIntermodalRouter(), RONet::getInstance(), and RONet::RONet().

◆ myInvalidNumber

int RODFNet::myInvalidNumber
mutableprivate

Definition at line 179 of file RODFNet.h.

Referenced by computeTypes().

◆ myKeepTurnarounds

bool RODFNet::myKeepTurnarounds
private

Definition at line 185 of file RODFNet.h.

Referenced by buildApproachList(), and RODFNet().

◆ myKeepVTypeDist

const bool RONet::myKeepVTypeDist
privateinherited

whether to keep the the vtype distribution in output

Definition at line 537 of file RONet.h.

Referenced by RONet::checkFlows().

◆ myMaxSpeedFactorLKW

double RODFNet::myMaxSpeedFactorLKW
private

Definition at line 189 of file RODFNet.h.

Referenced by buildEdgeFlowMap(), and getMaxSpeedFactorLKW().

◆ myMaxSpeedFactorPKW

double RODFNet::myMaxSpeedFactorPKW
private

maximum speed factor in measurements

Definition at line 188 of file RODFNet.h.

Referenced by buildEdgeFlowMap(), and getMaxSpeedFactorPKW().

◆ myNodes

NamedObjectCont<RONode*> RONet::myNodes
privateinherited

Known nodes.

Definition at line 456 of file RONet.h.

Referenced by RONet::addNode(), and RONet::getNode().

◆ myNumInternalEdges

int RONet::myNumInternalEdges
privateinherited

The number of internal edges in the dictionary.

Definition at line 531 of file RONet.h.

Referenced by RONet::addEdge(), and RONet::getInternalEdgeNumber().

◆ myPersonIDs

std::set<std::string> RONet::myPersonIDs
privateinherited

Known person ids.

Definition at line 453 of file RONet.h.

Referenced by RONet::addPerson().

◆ myPTVehicles

std::vector<const RORoutable*> RONet::myPTVehicles
privateinherited

vehicles to keep for public transport routing

Definition at line 498 of file RONet.h.

Referenced by RONet::adaptIntermodalRouter(), RONet::addVehicle(), and RONet::~RONet().

◆ myReadRouteNo

int RONet::myReadRouteNo
privateinherited

The number of read routes.

Definition at line 516 of file RONet.h.

◆ myRestrictions

std::map<std::string, std::map<SUMOVehicleClass, double> > RONet::myRestrictions
privateinherited

The vehicle class specific speed restrictions.

Definition at line 528 of file RONet.h.

Referenced by RONet::addRestriction(), and RONet::getRestrictions().

◆ myRoutables

RoutablesMap RONet::myRoutables
privateinherited

◆ myRouteAlternativesOutput

OutputDevice* RONet::myRouteAlternativesOutput
privateinherited

The file to write the computed route alternatives into.

Definition at line 510 of file RONet.h.

Referenced by RONet::cleanup(), RONet::getRouteOutput(), RONet::openOutput(), and RONet::saveAndRemoveRoutesUntil().

◆ myRoutes

NamedObjectCont<RORouteDef*> RONet::myRoutes
privateinherited

Known routes.

Definition at line 482 of file RONet.h.

Referenced by RONet::addRouteDef(), RONet::getRouteDef(), RONet::saveAndRemoveRoutesUntil(), and RONet::~RONet().

◆ myRoutesOutput

OutputDevice* RONet::myRoutesOutput
privateinherited

The file to write the computed routes into.

Definition at line 507 of file RONet.h.

Referenced by RONet::cleanup(), RONet::getRouteOutput(), RONet::openOutput(), and RONet::saveAndRemoveRoutesUntil().

◆ mySinkNumber

int RODFNet::mySinkNumber
mutableprivate

Definition at line 179 of file RODFNet.h.

Referenced by computeTypes().

◆ mySourceNumber

int RODFNet::mySourceNumber
mutableprivate

Definition at line 179 of file RODFNet.h.

Referenced by computeTypes().

◆ myStoppingPlaces

std::map<SumoXMLTag, NamedObjectCont<SUMOVehicleParameter::Stop*> > RONet::myStoppingPlaces
privateinherited

Known bus / train / container stops and parking areas.

Definition at line 462 of file RONet.h.

Referenced by RONet::adaptIntermodalRouter(), RONet::addStoppingPlace(), RONet::getStoppingPlace(), and RONet::getStoppingPlaceName().

◆ myTypesOutput

OutputDevice* RONet::myTypesOutput
privateinherited

The file to write the vehicle types into.

Definition at line 513 of file RONet.h.

Referenced by RONet::cleanup(), RONet::openOutput(), and RONet::saveAndRemoveRoutesUntil().

◆ myVehicleTypes

NamedObjectCont<SUMOVTypeParameter*> RONet::myVehicleTypes
privateinherited

Known vehicle types.

Definition at line 465 of file RONet.h.

Referenced by RONet::addVehicleType(), RONet::checkVType(), RONet::getVehicleTypeSecure(), and RONet::RONet().

◆ myVehIDs

std::set<std::string> RONet::myVehIDs
privateinherited

Known vehicle ids.

Definition at line 450 of file RONet.h.

Referenced by RONet::addVehicle(), and RONet::saveAndRemoveRoutesUntil().

◆ myVTypeDistDict

VTypeDistDictType RONet::myVTypeDistDict
privateinherited

A distribution of vehicle types (probability->vehicle type)

Definition at line 470 of file RONet.h.

Referenced by RONet::addVTypeDistribution(), RONet::checkVType(), and RONet::getVehicleTypeSecure().

◆ myWrittenRouteNo

int RONet::myWrittenRouteNo
privateinherited

The number of written routes.

Definition at line 522 of file RONet.h.

Referenced by RONet::saveAndRemoveRoutesUntil().


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