46 #ifdef CHECK_MEMORY_LEAKS
48 #endif // CHECK_MEMORY_LEAKS
55 const std::string& vTypes) :
71 for (std::vector<MSLane*>::const_iterator it = edge->
getLanes().begin(); it != edge->
getLanes().end(); ++it) {
72 (*it)->addMoveReminder(
this);
99 for (
int j = 0; j < (int)routes.size(); ++j) {
103 if (i != r->
begin()) {
106 dev << (*i)->getID();
108 dev <<
"\" probability=\"" << probs[j] <<
"\"";
virtual const MSRoute & getRoute() const =0
Returns the current route.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Notification
Definition of a vehicle state.
std::string time2string(SUMOTime t)
The vehicle changes the segment (meso only)
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Writes values into the given stream.
std::pair< std::string, RandomDistributor< const MSRoute * > * > myLastRouteDistribution
The previous distribution of routes (probability->route)
virtual ~MSRouteProbe()
Destructor.
bool writeXMLHeader(const std::string &rootElement, const std::string &attrs="", const std::string &comment="")
Writes an XML header with optional configuration.
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
The vehicle changes lanes (micro only) XXX: What if a vehicle changes lanes and passes a junction sim...
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
Representation of a vehicle.
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
std::pair< std::string, RandomDistributor< const MSRoute * > * > myCurrentRouteDistribution
The current distribution of routes (probability->route)
ConstMSEdgeVector::const_iterator MSRouteIterator
void addDetector(MSMoveReminder *data)
Adds a data collector for a detector to this segment.
Something on a lane to be noticed about vehicle movement.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
void addReference() const
increments the reference counter for the route
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Returns whether the vehicle shall be aware of this entry.
const MSRoute * getRoute() const
MSRouteIterator end() const
Returns the end of the list of edges to pass.
A single mesoscopic segment (cell)
MESegment * getSegmentForEdge(const MSEdge &e, SUMOReal pos=0)
Get the segment for a given edge at a given position.
static MELoop * gMesoNet
mesoscopic simulation infrastructure
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
MSRouteProbe(const std::string &id, const MSEdge *edge, const std::string &distID, const std::string &lastID, const std::string &vTypes)
Constructor.
static void checkDist(const std::string &id)
Checks the distribution whether it is permanent and deletes it if not.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Base of value-generating classes (detectors)
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.