54 for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
69 while (seg !=
nullptr) {
77 const std::vector<MSLane*>& lanes = edge.
getLanes();
78 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
79 if (((**lane).getVehicleNumber() != 0)) {
87 const std::vector<MSTransportable*>& persons = edge.
getSortedPersons(timestep);
89 if (dump || persons.size() > 0 || containers.size() > 0) {
94 while (seg !=
nullptr) {
99 const std::vector<MSLane*>& lanes = edge.
getLanes();
100 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
106 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
110 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
120 of.
openTag(
"lane") <<
" id=\"" << lane.
myID <<
"\"";
122 for (std::vector<MSVehicle*>::const_iterator veh = lane.
myVehBuffer.begin();
126 for (MSLane::VehCont::const_iterator veh = lane.
myVehicles.begin();
152 if (personNumber > 0) {
156 if (containerNumber > 0) {
159 const std::vector<MSTransportable*>& persons = microVeh.
getPersons();
160 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
163 const std::vector<MSTransportable*>& containers = microVeh.
getContainers();
164 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
static void write(OutputDevice &of, const MSEdgeControl &ec, SUMOTime timestep, int precision)
Writes the complete network state of the given edges into the given device.
static bool gOmitEmptyEdgesOnDump
Information whether empty edges shall be written on dump.
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
int getContainerNumber() const
Returns the number of containers.
VehCont myVehicles
The lane's vehicles. This container holds all vehicles that have their front (longitudinally) and the...
SumoXMLTag
Numbers representing SUMO-XML - element names.
Representation of a vehicle in the micro simulation.
static void writeTransportable(OutputDevice &of, const MSTransportable *p, SumoXMLTag tag)
write transportable
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
int getCarNumber() const
Returns the total number of cars on the segment.
virtual double getEdgePos() const
Return the position on the edge.
int gPrecision
the precision for floating point outputs
static bool haveLateralDynamics()
whether any kind of lateral dynamics is active
std::string time2string(SUMOTime t)
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
const std::string & getID() const
Returns the id.
The base class for microscopic and mesoscopic vehicles.
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's persons sorted by pos.
void writeVehicles(OutputDevice &of) const
A road/street connecting two junctions.
static double naviDegree(const double angle)
const std::vector< MSTransportable * > & getContainers() const
retrieve riding containers
virtual double getAngle() const
return the current angle of the transportable
int getVehicleNumber() const
Returns the number of vehicles on this lane (for which this lane is responsible)
static void writeLane(OutputDevice &of, const MSLane &lane)
Writes the dump of the given lane into the given device.
Stores edges and lanes, performs moving of vehicle.
const std::string & getID() const
returns the id of the transportable
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
std::string myID
The name of the object.
int getPersonNumber() const
Returns the number of persons.
virtual bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
virtual double getPositionOnLane() const =0
Get the vehicle's position along the lane.
A single mesoscopic segment (cell)
static void writeEdge(OutputDevice &of, const MSEdge &edge, SUMOTime timestep)
Writes the dump of the given edge into the given device.
static MELoop * gMesoNet
mesoscopic simulation infrastructure
const MSEdgeVector & getEdges() const
Returns loaded edges.
Static storage of an output device and its base (abstract) implementation.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
std::vector< MSEdge * > MSEdgeVector
VehCont myVehBuffer
Buffer for vehicles that moved from their previous lane onto this one. Integrated after all vehicles ...
static void writeVehicle(OutputDevice &of, const MSBaseVehicle &veh)
Writes the dump of the given vehicle into the given device.
const std::vector< MSTransportable * > & getPersons() const
retrieve riding persons
virtual double getSpeed() const =0
Returns the vehicle's current speed.
const std::string & getID() const
Returns the name of the vehicle.
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's containers sorted by pos.
Representation of a lane in the micro simulation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.