 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
43 const std::string& vTypes) :
53 while (seg !=
nullptr) {
59 for (std::vector<MSLane*>::const_iterator it = edge->
getLanes().begin(); it != edge->
getLanes().end(); ++it) {
60 (*it)->addMoveReminder(
this);
75 SUMOVehicle* vehicle = dynamic_cast<SUMOVehicle*>(&veh);
76 if (vehicle !=
nullptr) {
93 for (
int j = 0; j < (int)routes.size(); ++j) {
97 if (i != r->
begin()) {
100 dev << (*i)->getID();
102 dev <<
"\" probability=\"" << probs[j] <<
"\"";
static void checkDist(const std::string &id)
Checks the distribution whether it is permanent and deletes it if not.
The vehicle changes lanes (micro only)
Representation of a vehicle or person.
Base of value-generating classes (detectors)
Representation of a lane in the micro simulation.
A single mesoscopic segment (cell)
Static storage of an output device and its base (abstract) implementation.
MSRouteIterator end() const
Returns the end of the list of edges to pass.
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Writes values into the given stream.
ConstMSEdgeVector::const_iterator MSRouteIterator
void addDetector(MSMoveReminder *data)
Adds a data collector for a detector to this segment.
Representation of a vehicle.
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
Something on a lane to be noticed about vehicle movement.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
std::pair< std::string, RandomDistributor< const MSRoute * > * > myCurrentRouteDistribution
The current distribution of routes (probability->route)
virtual const MSRoute & getRoute() const =0
Returns the current route.
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
std::pair< std::string, RandomDistributor< const MSRoute * > * > myLastRouteDistribution
The previous distribution of routes (probability->route)
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
std::string time2string(SUMOTime t)
MSRouteProbe(const std::string &id, const MSEdge *edge, const std::string &distID, const std::string &lastID, const std::string &vTypes)
Constructor.
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
A road/street connecting two junctions.
const MSRoute * getRoute() const
virtual ~MSRouteProbe()
Destructor.
The vehicle changes the segment (meso only)
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Returns whether the vehicle shall be aware of this entry.
static MELoop * gMesoNet
mesoscopic simulation infrastructure
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
bool vehicleApplies(const SUMOTrafficObject &veh) const
Checks whether the detector measures vehicles of the given type.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
void addReference() const
increments the reference counter for the route
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >())
Writes an XML header with optional configuration.
const std::string & getID() const
Returns the id.
Notification
Definition of a vehicle state.