67 const bool isPermanent,
const RGBColor*
const c,
68 const std::vector<SUMOVehicleParameter::Stop>& stops);
137 double getDistanceBetween(
double fromPos,
double toPos,
const MSEdge* fromEdge,
const MSEdge* toEdge,
bool includeInternal =
true,
int routePosition = 0)
const;
205 const std::vector<SUMOVehicleParameter::Stop>&
getStops()
const;
242 static bool hasRoute(
const std::string&
id);
257 static void checkDist(
const std::string&
id);
259 static void insertIDs(std::vector<std::string>& into);
287 std::vector<SUMOVehicleParameter::Stop>
myStops;
291 typedef std::map<std::string, const MSRoute*>
RouteDict;
297 typedef std::map<std::string, std::pair<RandomDistributor<const MSRoute*>*,
bool> >
RouteDistDict;
304 static FXMutex myDictMutex;
std::vector< const MSEdge * > ConstMSEdgeVector
std::vector< MSEdge * > MSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
ConstMSEdgeVector::const_iterator MSRouteIterator
std::vector< MSEdge * > MSEdgeVector
A road/street connecting two junctions.
static void dict_clearState()
Decrement all route references before quick-loading state.
bool myReroute
Whether this route is incomplete and requires rerouting.
double myCosts
The assigned or calculated costs.
void addReference() const
increments the reference counter for the route
void setReroute(bool reroute=true)
int size() const
Returns the number of edges to pass.
static RouteDistDict myDistDict
The dictionary container.
static void dict_saveState(OutputDevice &out)
Saves all known routes into the given stream.
const RGBColor *const myColor
The color.
MSRoute & operator=(const MSRoute &s)
static RouteDict myDict
The dictionary container.
std::vector< SUMOVehicleParameter::Stop > myStops
List of the stops on the parsed route.
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
MSRouteIterator end() const
Returns the end of the list of edges to pass.
int myReferenceCounter
Information by how many vehicles the route is used.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
void setCosts(double costs)
Sets the costs of the route.
double getSavings() const
Returns the estimated savings due to using this route (compare to the route before rerouting)
static bool hasRoute(const std::string &id)
returns whether a route with the given id exists
virtual ~MSRoute()
Destructor.
const MSEdge * operator[](int index) const
bool contains(const MSEdge *const edge) const
void release() const
deletes the route if there are no further references to it
const MSEdge * getLastEdge() const
returns the destination edge
SUMOTime myPeriod
The period when repeating this route.
MSRoute(const std::string &id, const ConstMSEdgeVector &edges, const bool isPermanent, const RGBColor *const c, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
ConstMSEdgeVector myEdges
The list of edges to pass.
std::map< std::string, const MSRoute * > RouteDict
Definition of the dictionary container.
std::map< std::string, std::pair< RandomDistributor< const MSRoute * > *, bool > > RouteDistDict
Definition of the dictionary container.
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
static void insertIDs(std::vector< std::string > &into)
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....
bool containsAnyOf(const MSEdgeVector &edgelist) const
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.
const RGBColor & getColor() const
Returns the color.
void setPeriod(SUMOTime period)
sets the period
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
const bool myAmPermanent
whether the route may be deleted after the last vehicle abandoned it
static void checkDist(const std::string &id)
Checks the distribution whether it is permanent and deletes it if not.
double mySavings
The estimated savings when rerouting.
const ConstMSEdgeVector & getEdges() const
static void clear()
Clears the dictionary (delete all known routes, too)
SUMOTime getPeriod() const
returns the period
void setSavings(double savings)
Sets the savings of the route.
double getCosts() const
Returns the costs of the route.
Base class for objects which have an id.
Static storage of an output device and its base (abstract) implementation.
An upper class for objects with additional parameters.