101 const std::map<SUMOVehicleClass, SUMOReal>*
getRestrictions(
const std::string&
id)
const;
140 bool addDistrictEdge(
const std::string tazID,
const std::string edgeID,
const bool isSource);
146 const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >&
getDistricts()
const {
213 std::map<std::string, SUMOVehicleParameter::Stop*>::const_iterator it =
myBusStops.find(
id);
227 std::map<std::string, SUMOVehicleParameter::Stop*>::const_iterator it =
myContainerStops.find(
id);
395 void openOutput(
const std::string& filename,
const std::string altFilename,
const std::string typeFilename);
408 const std::map<std::string, ROEdge*>&
getEdgeMap()
const;
427 myThreadPool.unlock();
434 const ROVehicle*
const veh,
const bool removeLoops,
461 std::map<std::string, SUMOVehicleParameter::Stop*>
myBusStops;
487 typedef std::multimap<const SUMOTime, const std::string>
PersonMap;
498 std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >
myDistricts;
540 virtual ~WorkerThread() {
551 : myVehicle(v), myRemoveLoops(removeLoops),
myErrorHandler(errorHandler) {}
555 const bool myRemoveLoops;
559 RoutingTask&
operator=(
const RoutingTask&);
564 BulkmodeTask(
const bool value) : myValue(value) {}
566 static_cast<WorkerThread*
>(context)->getRouter().setBulkMode(myValue);
572 BulkmodeTask&
operator=(
const BulkmodeTask&);
bool addDistrictEdge(const std::string tazID, const std::string edgeID, const bool isSource)
OutputDevice * myRouteAlternativesOutput
The file to write the computed route alternatives into.
bool hasPermissions() const
OutputDevice * getRouteOutput(const bool alternative=false)
const std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > & getDistricts() const
Retrieves all TAZ (districts) from the network.
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const SUMOReal speed)
Adds a restriction for an edge type.
NamedObjectCont< SUMOVehicleParameter * > myFlows
Known flows.
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.
ROVehicleCont & getVehicles()
return vehicles for use by RouteAggregator
int myNumInternalEdges
The number of internal edges in the dictionary.
size_t getEdgeNo() const
Returns the total number of edges the network contains including internal edges.
bool checkVType(const std::string &id)
Checks whether the vehicle type (distribution) may be added.
Structure representing possible vehicle parameter.
void addNode(RONode *node)
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
void createBulkRouteRequests(SUMOAbstractRouter< ROEdge, ROVehicle > &router, const SUMOTime time, const bool removeLoops, const std::map< std::string, ROVehicle * > &mmap)
const SUMOVehicleParameter::Stop * getContainerStop(const std::string &id) const
Retrieves a container stop from the network.
NamedObjectCont< ROEdge * > myEdges
Known edges.
unsigned int myDiscardedRouteNo
The number of discarded routes.
std::map< std::string, std::vector< SUMOTime > > myDepartures
Departure times for randomized flows.
OutputDevice * myTypesOutput
The file to write the vehicle types into.
virtual bool addVehicleType(SUMOVTypeParameter *type)
Adds a read vehicle type definition to the network.
virtual bool addVehicle(const std::string &id, ROVehicle *veh)
const std::map< std::string, ROEdge * > & getEdgeMap() const
static RONet * getInstance()
Returns the pointer to the unique instance of RONet (singleton).
void openOutput(const std::string &filename, const std::string altFilename, const std::string typeFilename)
Opens the output for computed routes.
T get(const std::string &id) const
Retrieves an item.
void checkFlows(SUMOTime time)
const SUMOVehicleParameter::Stop * getBusStop(const std::string &id) const
Retrieves a bus stop from the network.
bool addVTypeDistribution(const std::string &id, RandomDistributor< SUMOVTypeParameter * > *vehTypeDistribution)
Adds a vehicle type distribution.
A vehicle as used by router.
bool addRouteDef(RORouteDef *def)
OutputDevice * myRoutesOutput
The file to write the computed routes into.
void addContainer(const SUMOTime depart, const std::string desc)
std::map< std::string, SUMOVehicleParameter::Stop * > myContainerStops
Known container stops.
NamedObjectCont< SUMOVTypeParameter * > myVehicleTypes
Known vehicle types.
std::map< std::string, std::map< SUMOVehicleClass, SUMOReal > > myRestrictions
The vehicle class specific speed restrictions.
void addPerson(const SUMOTime depart, const std::string desc)
ContainerMap myContainers
virtual bool furtherStored()
Returns the information whether further vehicles, persons or containers are stored.
ROVehicleCont myVehicles
Known vehicles.
static RONet * myInstance
Unique instance of RONet.
unsigned int myReadRouteNo
The number of read routes.
bool myDefaultVTypeMayBeDeleted
Whether no vehicle type was loaded.
NamedObjectCont< RORouteDef * > myRoutes
Known routes.
A basic edge for routing applications.
int getInternalEdgeNumber() const
Returns the number of internal edges the network contains.
A container for vehicles sorted by their departure time.
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.
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.
void addBusStop(const std::string &id, SUMOVehicleParameter::Stop *stop)
RONode * getNode(const std::string &id) const
Retrieves an node from the network.
virtual bool addEdge(ROEdge *edge)
static bool computeRoute(SUMOAbstractRouter< ROEdge, ROVehicle > &router, const ROVehicle *const veh, const bool removeLoops, MsgHandler *errorHandler)
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.
std::multimap< const SUMOTime, const std::string > PersonMap
Known persons.
NamedObjectCont< RONode * > myNodes
Known nodes.
std::multimap< const SUMOTime, const std::string > ContainerMap
Known containers.
bool addFlow(SUMOVehicleParameter *flow, const bool randomize)
SUMOTime saveAndRemoveRoutesUntil(OptionsCont &options, SUMOAbstractRouter< ROEdge, ROVehicle > &router, SUMOTime time)
Computes routes described by their definitions and saves them.
void cleanup(SUMOAbstractRouter< ROEdge, ROVehicle > *router)
closes the file output for computed routes and deletes routers and associated threads if necessary ...
void addContainerStop(const std::string &id, SUMOVehicleParameter::Stop *stop)
RORouteDef * getRouteDef(const std::string &name) const
Returns the named route definition.
RONet & operator=(const RONet &src)
Invalidated assignment operator.
std::map< std::string, SUMOVehicleParameter::Stop * > myBusStops
Known bus stops.
void setPermissionsFound()
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.
unsigned int myWrittenRouteNo
The number of written routes.