78 const bool isPermanent,
const RGBColor*
const c,
79 const std::vector<SUMOVehicleParameter::Stop>& stops);
179 const std::vector<SUMOVehicleParameter::Stop>&
getStops()
const;
228 static void checkDist(
const std::string&
id);
230 static void insertIDs(std::vector<std::string>& into);
249 std::vector<SUMOVehicleParameter::Stop>
myStops;
253 typedef std::map<std::string, const MSRoute*>
RouteDict;
259 typedef std::map<std::string, std::pair<RandomDistributor<const MSRoute*>*,
bool> >
RouteDistDict;
265 static FXMutex myDictMutex;
std::vector< const MSEdge * > ConstMSEdgeVector
std::map< std::string, const MSRoute * > RouteDict
Definition of the dictionary container.
const ConstMSEdgeVector & getEdges() const
void release() const
deletes the route if there are no further references to it
Represents a generic random distribution.
MSRoute & operator=(const MSRoute &s)
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...
const RGBColor & getColor() const
Returns the color.
const MSEdge * getLastEdge() const
returns the destination edge
std::vector< const MSEdge * > ConstMSEdgeVector
double getCosts() const
Returns the costs of the route.
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
void setCosts(double costs)
Sets the costs of the route.
int size() const
Returns the number of edges to pass.
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.
static void clear()
Clears the dictionary (delete all known routes, too)
static RouteDistDict myDistDict
The dictionary container.
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
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.
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::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
const MSEdge * operator[](int index) const
bool containsAnyOf(const MSEdgeVector &edgelist) const
ConstMSEdgeVector myEdges
The list of edges to pass.
void addReference() const
increments the reference counter for the route
int myReferenceCounter
Information by how many vehicles the route is used.
Static storage of an output device and its base (abstract) implementation.
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
std::vector< MSEdge * > MSEdgeVector
static void checkDist(const std::string &id)
Checks the distribution whether it is permanent and deletes it if not.
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
MSRouteIterator end() const
Returns the end of the list of edges to pass.
static RouteDict myDict
The dictionary container.
bool contains(const MSEdge *const edge) const
const RGBColor *const myColor
The color.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
double myCosts
The assigned or calculated costs.