 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
71 const bool isPermanent,
const RGBColor*
const c,
72 const std::vector<SUMOVehicleParameter::Stop>& stops);
138 double getDistanceBetween(
double fromPos,
double toPos,
const MSEdge* fromEdge,
const MSEdge* toEdge,
bool includeInternal =
true,
int routePosition = 0)
const;
188 const std::vector<SUMOVehicleParameter::Stop>&
getStops()
const;
237 static void checkDist(
const std::string&
id);
239 static void insertIDs(std::vector<std::string>& into);
261 std::vector<SUMOVehicleParameter::Stop>
myStops;
265 typedef std::map<std::string, const MSRoute*>
RouteDict;
271 typedef std::map<std::string, std::pair<RandomDistributor<const MSRoute*>*,
bool> >
RouteDistDict;
277 static FXMutex myDictMutex;
static void checkDist(const std::string &id)
Checks the distribution whether it is permanent and deletes it if not.
static RouteDict myDict
The dictionary container.
const RGBColor *const myColor
The color.
void release() const
deletes the route if there are no further references to it
An upper class for objects with additional parameters.
Base class for objects which have an id.
Static storage of an output device and its base (abstract) implementation.
MSRouteIterator end() const
Returns the end of the list of edges to pass.
ConstMSEdgeVector::const_iterator MSRouteIterator
double mySavings
The estimated savings when rerouting.
std::map< std::string, const MSRoute * > RouteDict
Definition of the dictionary container.
const MSEdge * getLastEdge() const
returns the destination edge
std::vector< const MSEdge * > ConstMSEdgeVector
void setCosts(double costs)
Sets the costs of the route.
const ConstMSEdgeVector & getEdges() const
const RGBColor & getColor() const
Returns the color.
MSRoute & operator=(const MSRoute &s)
static void insertIDs(std::vector< std::string > &into)
double getCosts() const
Returns the costs of the route.
MSRoute(const std::string &id, const ConstMSEdgeVector &edges, const bool isPermanent, const RGBColor *const c, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
int size() const
Returns the number of edges to pass.
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
std::vector< SUMOVehicleParameter::Stop > myStops
List of the stops on the parsed route.
virtual ~MSRoute()
Destructor.
static void clear()
Clears the dictionary (delete all known routes, too)
static void dict_saveState(OutputDevice &out)
Saves all known routes into the given stream.
const MSEdge * operator[](int index) const
double getSavings() const
Returns the estimated savings due to using this route (compare to the route before rerouting)
A road/street connecting two junctions.
std::vector< const MSEdge * > ConstMSEdgeVector
static RouteDistDict myDistDict
The dictionary container.
int myReferenceCounter
Information by how many vehicles the route is used.
int writeEdgeIDs(OutputDevice &os, const MSEdge *const from, const MSEdge *const upTo=0) const
Output the edge ids up to but not including the id of the given edge.
std::map< std::string, std::pair< RandomDistributor< const MSRoute * > *, bool > > RouteDistDict
Definition of the dictionary container.
std::vector< MSEdge * > MSEdgeVector
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
const bool myAmPermanent
whether the route may be deleted after the last vehicle abandoned it
std::vector< MSEdge * > MSEdgeVector
void setSavings(double savings)
Sets the savings of the route.
void addReference() const
increments the reference counter for the route
bool containsAnyOf(const MSEdgeVector &edgelist) const
ConstMSEdgeVector myEdges
The list of edges to pass.
bool contains(const MSEdge *const edge) const
double getDistanceBetween(double fromPos, double toPos, const MSEdge *fromEdge, const MSEdge *toEdge, bool includeInternal=true, int routePosition=0) const
Compute the distance between 2 given edges on this route, including the length of internal lanes....
double myCosts
The assigned or calculated costs.