73 const bool isPermanent,
const RGBColor*
const c,
74 const std::vector<SUMOVehicleParameter::Stop>& stops);
86 unsigned size()
const;
109 bool containsAnyOf(
const std::vector<MSEdge*>& edgelist)
const;
160 const std::vector<SUMOVehicleParameter::Stop>&
getStops()
const;
209 static void checkDist(
const std::string&
id);
211 static void insertIDs(std::vector<std::string>& into);
230 std::vector<SUMOVehicleParameter::Stop>
myStops;
234 typedef std::map<std::string, const MSRoute*>
RouteDict;
240 typedef std::map<std::string, std::pair<RandomDistributor<const MSRoute*>*,
bool> >
RouteDistDict;
std::map< std::string, const MSRoute * > RouteDict
Definition of the dictionary container.
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.
MSRoute & operator=(const MSRoute &s)
MSEdgeVector::const_iterator MSRouteIterator
const MSEdge * getLastEdge() const
returns the destination edge
const MSEdgeVector & getEdges() const
void setCosts(SUMOReal costs)
Sets the costs of the route.
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
static void dict_saveState(OutputDevice &out)
Saves all known routes into the given stream.
static void insertIDs(std::vector< std::string > &into)
A road/street connecting two junctions.
SUMOReal myCosts
The assigned or calculated costs.
static void clear()
Clears the dictionary (delete all known routes, too)
SUMOReal getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, const MSEdge *fromEdge, const MSEdge *toEdge, bool includeInternal=true) const
Compute the distance between 2 given edges on this route, including the length of internal lanes...
std::vector< const MSEdge * > MSEdgeVector
bool containsAnyOf(const std::vector< MSEdge * > &edgelist) const
static RouteDistDict myDistDict
The dictionary container.
MSEdgeVector myEdges
The list of edges to pass.
bool contains(const MSEdge *const edge) const
std::map< std::string, std::pair< RandomDistributor< const MSRoute * > *, bool > > RouteDistDict
Definition of the dictionary container.
virtual ~MSRoute()
Destructor.
SUMOReal getCosts() const
Returns the costs of the route.
SUMOReal getLength() const
An upper class for objects with additional parameters.
void addReference() const
increments the reference counter for the route
std::vector< SUMOVehicleParameter::Stop > myStops
List of the stops on the parsed route.
Base class for objects which have an id.
const bool myAmPermanent
whether the route may be deleted after the last vehicle abandoned it
MSRouteIterator end() const
Returns the end of the list of edges to pass.
unsigned size() const
Returns the number of edges to pass.
const MSEdge * operator[](unsigned index) const
Static storage of an output device and its base (abstract) implementation.
const RGBColor & getColor() const
Returns the color.
unsigned int myReferenceCounter
Information by how many vehicles the route is used.
void release() const
deletes the route if there are no further references to it
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.
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
MSRoute(const std::string &id, const MSEdgeVector &edges, const bool isPermanent, const RGBColor *const c, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.