77 const bool isPermanent,
const RGBColor*
const c,
78 const std::vector<SUMOVehicleParameter::Stop>& stops);
178 const std::vector<SUMOVehicleParameter::Stop>&
getStops()
const;
227 static void checkDist(
const std::string&
id);
229 static void insertIDs(std::vector<std::string>& into);
248 std::vector<SUMOVehicleParameter::Stop>
myStops;
252 typedef std::map<std::string, const MSRoute*>
RouteDict;
258 typedef std::map<std::string, std::pair<RandomDistributor<const MSRoute*>*,
bool> >
RouteDistDict;
264 static FXMutex myDictMutex;
std::vector< const MSEdge * > ConstMSEdgeVector
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)
const MSEdge * getLastEdge() const
returns the destination edge
std::vector< const MSEdge * > ConstMSEdgeVector
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
void setCosts(double costs)
Sets the costs of the route.
static void dict_saveState(OutputDevice &out)
Saves all known routes into the given stream.
static void insertIDs(std::vector< std::string > &into)
double getCosts() const
Returns the costs of the route.
A road/street connecting two junctions.
static void clear()
Clears the dictionary (delete all known routes, too)
static RouteDistDict myDistDict
The dictionary container.
int size() const
Returns the number of edges to pass.
MSRoute(const std::string &id, const ConstMSEdgeVector &edges, const bool isPermanent, const RGBColor *const c, const std::vector< SUMOVehicleParameter::Stop > &stops)
Constructor.
ConstMSEdgeVector::const_iterator MSRouteIterator
bool contains(const MSEdge *const edge) const
const ConstMSEdgeVector & getEdges() const
std::map< std::string, std::pair< RandomDistributor< const MSRoute * > *, bool > > RouteDistDict
Definition of the dictionary container.
virtual ~MSRoute()
Destructor.
std::vector< MSEdge * > MSEdgeVector
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.
ConstMSEdgeVector myEdges
The list of edges to pass.
int myReferenceCounter
Information by how many vehicles the route is used.
double getDistanceBetween(double fromPos, double 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...
Static storage of an output device and its base (abstract) implementation.
const RGBColor & getColor() const
Returns the color.
const MSEdge * operator[](int index) const
std::vector< MSEdge * > MSEdgeVector
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.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
bool containsAnyOf(const MSEdgeVector &edgelist) const
double myCosts
The assigned or calculated costs.