79 typedef std::map<const SUMOTime, std::deque<RORoutable*> >
RoutablesMap;
108 const std::map<SUMOVehicleClass, SUMOReal>*
getRestrictions(
const std::string&
id)
const;
147 bool addDistrictEdge(
const std::string tazID,
const std::string edgeID,
const bool isSource);
153 const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >&
getDistricts()
const {
176 return getEdge(laneID.substr(0, laneID.rfind(
"_")));
230 std::map<std::string, SUMOVehicleParameter::Stop*>::const_iterator it =
myBusStops.find(
id);
244 std::map<std::string, SUMOVehicleParameter::Stop*>::const_iterator it =
myContainerStops.find(
id);
423 const std::map<std::string, ROEdge*>&
getEdgeMap()
const;
448 virtual ~WorkerThread() {
455 BulkmodeTask(
const bool value) : myValue(value) {}
457 static_cast<WorkerThread*
>(context)->getVehicleRouter().setBulkMode(myValue);
463 BulkmodeTask&
operator=(
const BulkmodeTask&);
490 std::map<std::string, SUMOVehicleParameter::Stop*>
myBusStops;
526 std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >
myDistricts;
563 : myRoutable(v), myRemoveLoops(removeLoops),
myErrorHandler(errorHandler) {}
567 const bool myRemoveLoops;
571 RoutingTask&
operator=(
const RoutingTask&);
RONode * getNode(const std::string &id) const
Retrieves an node from the network.
bool addDistrictEdge(const std::string tazID, const std::string edgeID, const bool isSource)
OutputDevice * myRouteAlternativesOutput
The file to write the computed route alternatives into.
OutputDevice * getRouteOutput(const bool alternative=false)
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const SUMOReal speed)
Adds a restriction for an edge type.
NamedObjectCont< SUMOVehicleParameter * > myFlows
Known flows.
ROEdge * getEdgeForLaneID(const std::string &laneID) const
Retrieves an edge from the network when the lane id is given.
int getInternalEdgeNumber() const
Returns the number of internal edges the network contains.
A single lane the router may use.
std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > myDistricts
traffic assignment zones with sources and sinks
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool myHavePermissions
Whether the network contains edges which not all vehicles may pass.
Represents a generic random distribution.
int myNumInternalEdges
The number of internal edges in the dictionary.
bool checkVType(const std::string &id)
Checks whether the vehicle type (distribution) may be added.
int getEdgeNo() const
Returns the total number of edges the network contains including internal edges.
Structure representing possible vehicle parameter.
static void adaptIntermodalRouter(ROIntermodalRouter &router)
void addNode(RONode *node)
T get(const std::string &id) const
Retrieves an item.
void checkFlows(SUMOTime time, MsgHandler *errorHandler)
const std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > & getDistricts() const
Retrieves all TAZ (districts) from the network.
NamedObjectCont< ROEdge * > myEdges
Known edges.
bool hasPermissions() const
int myDiscardedRouteNo
The number of discarded routes.
A map of named object pointers.
std::map< std::string, std::vector< SUMOTime > > myDepartures
Departure times for randomized flows.
OutputDevice * myTypesOutput
The file to write the vehicle types into.
RORouteDef * getRouteDef(const std::string &name) const
Returns the named route definition.
int myWrittenRouteNo
The number of written routes.
virtual bool addVehicleType(SUMOVTypeParameter *type)
Adds a read vehicle type definition to the network.
virtual bool addVehicle(const std::string &id, ROVehicle *veh)
static RONet * getInstance()
Returns the pointer to the unique instance of RONet (singleton).
void openOutput(const OptionsCont &options, const std::string altFilename="")
Opens the output for computed routes.
bool addVTypeDistribution(const std::string &id, RandomDistributor< SUMOVTypeParameter *> *vehTypeDistribution)
Adds a vehicle type distribution.
std::set< std::string > myPersonIDs
Known person ids.
A routable thing such as a vehicle or person.
RouterProvider< ROEdge, ROLane, RONode, ROVehicle > RORouterProvider
A vehicle as used by router.
void cleanup()
closes the file output for computed routes and deletes associated threads if necessary ...
bool addRouteDef(RORouteDef *def)
OutputDevice * myRoutesOutput
The file to write the computed routes into.
void addContainer(const SUMOTime depart, const std::string desc)
const std::map< SUMOVehicleClass, SUMOReal > * getRestrictions(const std::string &id) const
Returns the restrictions for an edge type If no restrictions are present, 0 is returned.
std::map< std::string, SUMOVehicleParameter::Stop * > myContainerStops
Known container stops.
RoutablesMap myRoutables
Known routables.
NamedObjectCont< SUMOVTypeParameter * > myVehicleTypes
Known vehicle types.
std::map< std::string, std::map< SUMOVehicleClass, SUMOReal > > myRestrictions
The vehicle class specific speed restrictions.
ContainerMap myContainers
virtual bool furtherStored()
Returns the information whether further vehicles, persons or containers are stored.
A person as used by router.
static RONet * myInstance
Unique instance of RONet.
bool myDefaultVTypeMayBeDeleted
Whether no vehicle type has been loaded yet.
NamedObjectCont< RORouteDef * > myRoutes
Known routes.
void createBulkRouteRequests(const RORouterProvider &provider, const SUMOTime time, const bool removeLoops)
A basic edge for routing applications.
A pool of worker threads which distributes the tasks and collects the results.
The router's network representation.
bool addDistrict(const std::string id, ROEdge *source, ROEdge *sink)
Structure representing possible vehicle parameter.
int myReadRouteNo
The number of read routes.
Definition of vehicle stop (position and duration)
const SUMOVehicleParameter::Stop * getContainerStop(const std::string &id) const
Retrieves a container stop from the network.
std::map< std::string, RandomDistributor< SUMOVTypeParameter * > *> VTypeDistDictType
Vehicle type distribution dictionary type.
A storage for options typed value containers)
const std::map< std::string, ROEdge * > & getEdgeMap() const
VTypeDistDictType myVTypeDistDict
A distribution of vehicle types (probability->vehicle type)
Base class for a vehicle's route definition.
void addBusStop(const std::string &id, SUMOVehicleParameter::Stop *stop)
virtual bool addEdge(ROEdge *edge)
Static storage of an output device and its base (abstract) implementation.
Abstract superclass of a task to be run with an index to keep track of pending tasks.
std::set< std::string > myVehIDs
Known vehicle ids.
virtual ~RONet()
Destructor.
SUMOVTypeParameter * getVehicleTypeSecure(const std::string &id)
Retrieves the named vehicle type.
A thread repeatingly calculating incoming tasks.
MsgHandler * myErrorHandler
handler for ignorable error messages
Base class for nodes used by the router.
NamedObjectCont< RONode * > myNodes
Known nodes.
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
std::multimap< const SUMOTime, const std::string > ContainerMap
Known containers.
const SUMOVehicleParameter::Stop * getBusStop(const std::string &id) const
Retrieves a bus stop from the network.
bool addFlow(SUMOVehicleParameter *flow, const bool randomize)
void addContainerStop(const std::string &id, SUMOVehicleParameter::Stop *stop)
bool addPerson(ROPerson *person)
RONet & operator=(const RONet &src)
Invalidated assignment operator.
SUMOTime saveAndRemoveRoutesUntil(OptionsCont &options, const RORouterProvider &provider, SUMOTime time)
Computes routes described by their definitions and saves them.
std::map< std::string, SUMOVehicleParameter::Stop * > myBusStops
Known bus stops.
std::map< const SUMOTime, std::deque< RORoutable * > > RoutablesMap
bool myDefaultPedTypeMayBeDeleted
Whether no pedestrian type has been loaded yet.
void setPermissionsFound()