45 #include <mesosim/MELoop.h>
46 #include <mesosim/MESegment.h>
49 #ifdef CHECK_MEMORY_LEAKS
51 #endif // CHECK_MEMORY_LEAKS
61 const std::vector<MSEdge*>& edges = ec.
getEdges();
62 for (std::vector<MSEdge*>::const_iterator e = edges.begin(); e != edges.end(); ++e) {
76 MESegment* seg = MSGlobals::gMesoNet->getSegmentForEdge(edge);
78 if (seg->getCarNumber() != 0) {
82 seg = seg->getNextSegment();
86 const std::vector<MSLane*>& lanes = edge.
getLanes();
87 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
88 if (((**lane).getVehicleNumber() != 0)) {
102 MESegment* seg = MSGlobals::gMesoNet->getSegmentForEdge(edge);
104 seg->writeVehicles(of);
105 seg = seg->getNextSegment();
109 const std::vector<MSLane*>& lanes = edge.
getLanes();
110 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
123 of.
openTag(
"lane") <<
" id=\"" << lane.
myID <<
"\"";
125 for (std::vector<MSVehicle*>::const_iterator veh = lane.
myVehBuffer.begin();
129 for (MSLane::VehCont::const_iterator veh = lane.
myVehicles.begin();
141 of.
openTag(
"vehicle") <<
" id=\"" << veh.
getID() <<
"\" pos=\""
static bool gOmitEmptyEdgesOnDump
Information whether empty edges shall be written on dump.
VehCont myVehicles
The lane's vehicles. The entering vehicles are inserted at the front of this container and the leavin...
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
virtual SUMOReal getPositionOnLane() const =0
Get the vehicle's position along the lane.
std::string time2string(SUMOTime t)
virtual bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
static void writeEdge(OutputDevice &of, const MSEdge &edge)
Writes the dump of the given edge into the given device.
The base class for microscopic and mesoscopic vehicles.
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
std::vector< MSVehicle * > myVehBuffer
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.
unsigned int getVehicleNumber() const
Returns the number of vehicles on this lane.
std::string myID
The name of the object.
virtual SUMOReal getSpeed() const =0
Returns the vehicle's current speed.
const std::vector< MSEdge * > & getEdges() const
Returns loaded edges.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
static const bool gUseMesoSim
static void writeVehicle(OutputDevice &of, const MSBaseVehicle &veh)
Writes the dump of the given vehicle into the given device.
Representation of a lane in the micro simulation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
static void write(OutputDevice &of, const MSEdgeControl &ec, SUMOTime timestep)
Writes the complete network state of the given edges into the given device.
const std::string & getID() const
Returns the name of the vehicle.