71 const bool isPermanent,
const RGBColor*
const c,
72 const std::vector<SUMOVehicleParameter::Stop>& stops,
74 int replacedIndex = 0);
226 const std::vector<SUMOVehicleParameter::Stop>&
getStops()
const;
263 static bool hasRoute(
const std::string&
id);
278 static void checkDist(
const std::string&
id);
280 static void insertIDs(std::vector<std::string>& into);
305 std::vector<SUMOVehicleParameter::Stop>
myStops;
315 typedef std::map<std::string, ConstMSRoutePtr>
RouteDict;
321 typedef std::map<std::string, std::pair<RandomDistributor<ConstMSRoutePtr>*,
bool> >
RouteDistDict;
328 static FXMutex myDictMutex;
std::vector< MSEdge * > MSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
ConstMSEdgeVector::const_iterator MSRouteIterator
std::vector< MSEdge * > MSEdgeVector
std::shared_ptr< const MSRoute > ConstMSRoutePtr
std::shared_ptr< const MSRoute > ConstMSRoutePtr
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
A road/street connecting two junctions.
Representation of a lane in the micro simulation.
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 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.
const ConstMSEdgeVector & getEdges() const
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.
int getReplacedIndex() const
Returns the index at which this route was replaced.
MSRouteIterator end() const
Returns the end of the list of edges to pass.
int writeEdgeIDs(OutputDevice &os, int firstIndex=0, int lastIndex=-1, bool withInternal=false, SUMOVehicleClass svc=SVC_IGNORING) const
Output the edge ids up to but not including the id of the given edge.
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
std::map< std::string, ConstMSRoutePtr > RouteDict
Definition of the dictionary container.
virtual ~MSRoute()
Destructor.
void checkRemoval() const
removes the route from the internal dict if it is not marked as permanent
const MSEdge * operator[](int index) const
bool contains(const MSEdge *const edge) const
const MSEdge * getLastEdge() const
returns the destination edge
SUMOTime myReplacedTime
The time where this route was replaced with an alternative route (or -1)
SUMOTime myPeriod
The period when repeating this route.
ConstMSEdgeVector myEdges
The list of edges to pass.
static void insertIDs(std::vector< std::string > &into)
bool containsAnyOf(const MSEdgeVector &edgelist) const
int myReplacedIndex
The index where this route was replaced with an alternative route.
std::map< std::string, std::pair< RandomDistributor< ConstMSRoutePtr > *, bool > > RouteDistDict
Definition of the dictionary container.
static bool dictionary(const std::string &id, ConstMSRoutePtr route)
Adds a route to the dictionary.
const RGBColor & getColor() const
Returns the color.
static RandomDistributor< ConstMSRoutePtr > * distDictionary(const std::string &id)
Returns the named route distribution.
void setPeriod(SUMOTime period)
sets the period
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
double getDistanceBetween(double fromPos, double toPos, const MSLane *fromLane, const MSLane *toLane, int routePosition=0) const
Compute the distance between 2 given edges on this route, optionally including the length of internal...
const bool myAmPermanent
whether the route may be deleted after the last vehicle abandoned it
SUMOTime getReplacedTime() const
Returns the time at which this route was replaced (or -1)
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.
MSRoute & operator=(const MSRoute &s)
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.
Represents a generic random distribution.