 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
66 typedef std::map<const SUMOTime, std::vector<RORoutable*> >
RoutablesMap;
95 const std::map<SUMOVehicleClass, double>*
getRestrictions(
const std::string&
id)
const;
134 bool addDistrictEdge(
const std::string tazID,
const std::string edgeID,
const bool isSource);
140 const std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >&
getDistricts()
const {
163 return getEdge(laneID.substr(0, laneID.rfind(
"_")));
419 virtual ~WorkerThread() {
426 BulkmodeTask(
const bool value) : myValue(value) {}
428 static_cast<WorkerThread*
>(context)->getVehicleRouter().setBulkMode(myValue);
434 BulkmodeTask&
operator=(
const BulkmodeTask&);
503 std::map<std::string, std::pair<std::vector<std::string>, std::vector<std::string> > >
myDistricts;
543 : myRoutable(v), myRemoveLoops(removeLoops),
myErrorHandler(errorHandler) {}
547 const bool myRemoveLoops;
551 RoutingTask&
operator=(
const RoutingTask&);
OutputDevice * getRouteOutput(const bool alternative=false)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
bool myHaveActiveFlows
whether any flows are still active
int myDiscardedRouteNo
The number of discarded routes.
std::map< std::string, std::vector< SUMOTime > > myDepartures
Departure times for randomized flows.
void openOutput(const OptionsCont &options)
Opens the output for computed routes.
int getEdgeNumber() const
Returns the total number of edges the network contains including internal edges.
bool myHavePermissions
Whether the network contains edges which not all vehicles may pass.
MsgHandler * myErrorHandler
handler for ignorable error messages
bool addDistrictEdge(const std::string tazID, const std::string edgeID, const bool isSource)
RONode * getNode(const std::string &id) const
Retrieves an node from the network.
int myNumInternalEdges
The number of internal edges in the dictionary.
Static storage of an output device and its base (abstract) implementation.
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
OutputDevice * myRouteAlternativesOutput
The file to write the computed route alternatives into.
void addNode(RONode *node)
virtual bool addEdge(ROEdge *edge)
bool hasPermissions() const
RORouteDef * getRouteDef(const std::string &name) const
Returns the named route definition.
OutputDevice * myRoutesOutput
The file to write the computed routes into.
void writeIntermodal(const OptionsCont &options, ROIntermodalRouter &router) const
Writes the intermodal network and weights if requested.
Base class for a vehicle's route definition.
static void adaptIntermodalRouter(ROIntermodalRouter &router)
The router's network representation.
A person as used by router.
int myWrittenRouteNo
The number of written routes.
A vehicle as used by router.
Structure representing possible vehicle parameter.
std::vector< const RORoutable * > myPTVehicles
vehicles to keep for public transport routing
bool addPerson(ROPerson *person)
static RONet * getInstance()
Returns the pointer to the unique instance of RONet (singleton).
int getInternalEdgeNumber() const
Returns the number of internal edges the network contains.
bool addRouteDef(RORouteDef *def)
SumoXMLTag
Numbers representing SUMO-XML - element names.
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction for an edge type.
NamedObjectCont< ROEdge * > myEdges
Known edges.
std::map< const SUMOTime, std::vector< RORoutable * > > RoutablesMap
void addStoppingPlace(const std::string &id, const SumoXMLTag category, SUMOVehicleParameter::Stop *stop)
std::set< std::string > myPersonIDs
Known person ids.
std::map< std::string, std::map< SUMOVehicleClass, double > > myRestrictions
The vehicle class specific speed restrictions.
std::map< SumoXMLTag, NamedObjectCont< SUMOVehicleParameter::Stop * > > myStoppingPlaces
Known bus / train / container stops and parking areas.
const std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > & getDistricts() const
Retrieves all TAZ (districts) from the network.
std::map< std::string, std::pair< std::vector< std::string >, std::vector< std::string > > > myDistricts
traffic assignment zones with sources and sinks
Structure representing possible vehicle parameter.
OutputDevice * myTypesOutput
The file to write the vehicle types into.
void addContainer(const SUMOTime depart, const std::string desc)
const SUMOVehicleParameter::Stop * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Retrieves a stopping place from the network.
void createBulkRouteRequests(const RORouterProvider &provider, const SUMOTime time, const bool removeLoops)
A storage for options typed value containers)
std::map< std::string, RandomDistributor< SUMOVTypeParameter * > * > VTypeDistDictType
Vehicle type distribution dictionary type.
bool myDefaultVTypeMayBeDeleted
Whether the default vehicle type was already used or can still be replaced.
NamedObjectCont< SUMOVTypeParameter * > myVehicleTypes
Known vehicle types.
virtual bool addVehicle(const std::string &id, ROVehicle *veh)
bool addVTypeDistribution(const std::string &id, RandomDistributor< SUMOVTypeParameter * > *vehTypeDistribution)
Adds a vehicle type distribution.
A routable thing such as a vehicle or person.
const NamedObjectCont< ROEdge * > & getEdgeMap() const
VTypeDistDictType myVTypeDistDict
A distribution of vehicle types (probability->vehicle type)
void cleanup()
closes the file output for computed routes and deletes associated threads if necessary
NamedObjectCont< RONode * > myNodes
Known nodes.
static RONet * myInstance
Unique instance of RONet.
A pool of worker threads which distributes the tasks and collects the results.
T get(const std::string &id) const
Retrieves an item.
bool addDistrict(const std::string id, ROEdge *source, ROEdge *sink)
ContainerMap myContainers
void setPermissionsFound()
RoutablesMap myRoutables
Known routables.
virtual ~RONet()
Destructor.
int myReadRouteNo
The number of read routes.
A basic edge for routing applications.
bool furtherStored()
Returns the information whether further vehicles, persons or containers are stored.
bool addFlow(SUMOVehicleParameter *flow, const bool randomize)
NamedObjectCont< RORouteDef * > myRoutes
Known routes.
void checkFlows(SUMOTime time, MsgHandler *errorHandler)
const std::string getStoppingPlaceName(const std::string &id) const
return the name for the given stopping place id
std::set< std::string > myVehIDs
Known vehicle ids.
bool myDefaultBikeTypeMayBeDeleted
Whether the default bicycle type was already used or can still be replaced.
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 checkVType(const std::string &id)
Checks whether the vehicle type (distribution) may be added.
Abstract superclass of a task to be run with an index to keep track of pending tasks.
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.
SUMOVTypeParameter * getVehicleTypeSecure(const std::string &id)
Retrieves the named vehicle type.
Base class for nodes used by the router.
bool myDefaultPedTypeMayBeDeleted
Whether the default pedestrian type was already used or can still be replaced.
ROEdge * getEdgeForLaneID(const std::string &laneID) const
Retrieves an edge from the network when the lane id is given.
std::multimap< const SUMOTime, const std::string > ContainerMap
Known containers.
NamedObjectCont< SUMOVehicleParameter * > myFlows
Known flows.
const bool myKeepVTypeDist
whether to keep the the vtype distribution in output
A thread repeatingly calculating incoming tasks.
Definition of vehicle stop (position and duration)
virtual bool addVehicleType(SUMOVTypeParameter *type)
Adds a read vehicle type definition to the network.