50 #ifdef CHECK_MEMORY_LEAKS 52 #endif // CHECK_MEMORY_LEAKS 64 for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
87 const std::vector<MSLane*>& lanes = edge.
getLanes();
88 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
89 if (((**lane).getVehicleNumber() != 0)) {
97 const std::vector<MSTransportable*>& persons = edge.
getSortedPersons(timestep);
99 if (dump || persons.size() > 0 || containers.size() > 0) {
109 const std::vector<MSLane*>& lanes = edge.
getLanes();
110 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
116 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
120 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
130 of.
openTag(
"lane") <<
" id=\"" << lane.
myID <<
"\"";
132 for (std::vector<MSVehicle*>::const_iterator veh = lane.
myVehBuffer.begin();
136 for (MSLane::VehCont::const_iterator veh = lane.
myVehicles.begin();
160 if (personNumber > 0) {
164 if (containerNumber > 0) {
167 const std::vector<MSTransportable*>& persons = microVeh.
getPersons();
168 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
171 const std::vector<MSTransportable*>& containers = microVeh.
getContainers();
172 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.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
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.
int getVehicleNumber() const
Returns the number of vehicles on this lane (for which this lane is responsible)
static void writeTransportable(OutputDevice &of, const MSTransportable *p, SumoXMLTag tag)
write transportable
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)
void setPrecision(int precision=OUTPUT_ACCURACY)
Sets the precison or resets it to default.
virtual bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
const std::string & getID() const
returns the id of the transportable
virtual SUMOReal getEdgePos() const
Return the position on the edge.
The base class for microscopic and mesoscopic vehicles.
virtual SUMOReal getAngle() const
return the current angle of the transportable
SUMOReal getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
int getContainerNumber() const
Returns the number of containers.
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
void writeVehicles(OutputDevice &of) const
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::vector< MSTransportable * > & getContainers() const
retrieve riding containers
int getPersonNumber() const
Returns the number of persons.
const std::vector< MSTransportable * > & getPersons() const
retrieve riding persons
static SUMOReal naviDegree(const SUMOReal angle)
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep) const
Returns this edge's containers sorted by pos.
std::string myID
The name of the object.
virtual SUMOReal getSpeed() const =0
Returns the vehicle's current speed.
A single mesoscopic segment (cell)
static SUMOReal gLateralResolution
MESegment * getSegmentForEdge(const MSEdge &e, SUMOReal pos=0)
Get the segment for a given edge at a given position.
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
int getCarNumber() const
Returns the total number of cars on the segment.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
std::vector< MSEdge * > MSEdgeVector
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
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.
Representation of a lane in the micro simulation.
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep) const
Returns this edge's persons sorted by pos.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
const MSEdgeVector & getEdges() const
Returns loaded edges.
const std::string & getID() const
Returns the name of the vehicle.