71 typedef std::map<const SUMOTime, std::vector<RORoutable*> >
RoutablesMap;
100 const std::map<SUMOVehicleClass, double>*
getRestrictions(
const std::string&
id)
const;
139 bool addDistrictEdge(
const std::string tazID,
const std::string edgeID,
const bool isSource);
145 const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >&
getDistricts()
const {
168 return getEdge(laneID.substr(0, laneID.rfind(
"_")));
424 virtual ~WorkerThread() {
431 BulkmodeTask(
const bool value) : myValue(value) {}
433 static_cast<WorkerThread*
>(context)->getVehicleRouter().setBulkMode(myValue);
439 BulkmodeTask&
operator=(
const BulkmodeTask&);
508 std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >
myDistricts;
548 : myRoutable(v), myRemoveLoops(removeLoops),
myErrorHandler(errorHandler) {}
552 const bool myRemoveLoops;
556 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)
std::map< SumoXMLTag, NamedObjectCont< SUMOVehicleParameter::Stop * > > myStoppingPlaces
Known bus / train / container stops and parking areas.
OutputDevice * myRouteAlternativesOutput
The file to write the computed route alternatives into.
int getEdgeNumber() const
Returns the total number of edges the network contains including internal edges.
SumoXMLTag
Numbers representing SUMO-XML - element names.
OutputDevice * getRouteOutput(const bool alternative=false)
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...
void writeIntermodal(const OptionsCont &options, ROIntermodalRouter &router) const
Writes the intermodal network and weights if requested.
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.
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.
bool myHaveActiveFlows
whether any flows are still active
NamedObjectCont< ROEdge * > myEdges
Known edges.
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.
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.
std::vector< const RORoutable * > myPTVehicles
vehicles to keep for public transport routing
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).
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.
void openOutput(const OptionsCont &options)
Opens the output for computed routes.
RouterProvider< ROEdge, ROLane, RONode, ROVehicle > RORouterProvider
A vehicle as used by router.
std::map< const SUMOTime, std::vector< RORoutable * > > RoutablesMap
void cleanup()
closes the file output for computed routes and deletes associated threads if necessary ...
bool addRouteDef(RORouteDef *def)
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction for an edge type.
OutputDevice * myRoutesOutput
The file to write the computed routes into.
const SUMOVehicleParameter::Stop * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Retrieves a stopping place from the network.
void addContainer(const SUMOTime depart, const std::string desc)
RoutablesMap myRoutables
Known routables.
bool myDefaultBikeTypeMayBeDeleted
Whether the default bicycle type was already used or can still be replaced.
NamedObjectCont< SUMOVTypeParameter * > myVehicleTypes
Known vehicle types.
ContainerMap myContainers
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 the default vehicle type was already used or can still be replaced.
NamedObjectCont< RORouteDef * > myRoutes
Known routes.
void createBulkRouteRequests(const RORouterProvider &provider, const SUMOTime time, const bool removeLoops)
const bool myKeepVTypeDist
whether to keep the the vtype distribution in output
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.
const NamedObjectCont< ROEdge * > & getEdgeMap() const
int myReadRouteNo
The number of read routes.
void addStoppingPlace(const std::string &id, const SumoXMLTag category, SUMOVehicleParameter::Stop *stop)
std::map< std::string, std::map< SUMOVehicleClass, double > > myRestrictions
The vehicle class specific speed restrictions.
Definition of vehicle stop (position and duration)
std::map< std::string, RandomDistributor< SUMOVTypeParameter * > *> VTypeDistDictType
Vehicle type distribution dictionary type.
A storage for options typed value containers)
VTypeDistDictType myVTypeDistDict
A distribution of vehicle types (probability->vehicle type)
Base class for a vehicle's route definition.
const std::string getStoppingPlaceName(const std::string &id) const
return the name for the given stopping place id
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.
bool addFlow(SUMOVehicleParameter *flow, const bool randomize)
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.
bool myDefaultPedTypeMayBeDeleted
Whether the default pedestrian type was already used or can still be replaced.
void setPermissionsFound()