40 #include <mesosim/MELoop.h>
41 #include <mesosim/MESegment.h>
44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
64 const std::vector<MSEdge*>& edges = ec.
getEdges();
65 for (std::vector<MSEdge*>::const_iterator e = edges.begin(); e != edges.end(); ++e) {
67 const std::vector<MSLane*>& lanes = edge.
getLanes();
68 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
80 double queueing_time = 0.0;
81 double queueing_length = 0.0;
82 double queueing_length2 = 0.0;
85 for (std::vector<MSVehicle*>::const_iterator veh = lane.
myVehBuffer.begin(); veh != lane.
myVehBuffer.end(); ++veh) {
95 if (tmp_length > queueing_length) {
96 queueing_length = tmp_length;
101 for (MSLane::VehCont::const_iterator veh = lane.
myVehicles.begin(); veh != lane.
myVehicles.end(); ++veh) {
112 if (tmp_length > queueing_length) {
113 queueing_length = tmp_length;
120 double tmp_length2 = 0.0;
121 for (MSLane::VehCont::const_iterator veh = lane.
myVehicles.begin(); veh != lane.
myVehicles.end(); ++veh) {
123 double threshold_velocity = 5 / 3.6;
132 if (tmp_length2 > queueing_length2) {
133 queueing_length2 = tmp_length2;
139 if (queueing_length > 1 || queueing_length2 > 1) {
static void writeEdge(OutputDevice &of)
Iterates through all the edges and extract the lanes.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
VehCont myVehicles
The lane's vehicles. The entering vehicles are inserted at the front of this container and the leavin...
Representation of a vehicle in the micro simulation.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
SUMOReal getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
SUMOReal getLength() const
Returns the lane's length.
std::string time2string(SUMOTime t)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOReal getPositionOnLane() const
Get the vehicle's position along the lane.
static void write(OutputDevice &of, SUMOTime timestep)
Export the queueing length in front of a junction (very experimental!)
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
static void writeLane(OutputDevice &of, const MSLane &lane)
Iterates through the lanes and check for available vehicle queues.
std::vector< MSVehicle * > myVehBuffer
Stores edges and lanes, performs moving of vehicle.
unsigned int getVehicleNumber() const
Returns the number of vehicles on this lane.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
SUMOReal getSpeed() const
Returns the vehicle's current speed.
SUMOReal getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
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.
MSEdgeControl & getEdgeControl()
Returns the edge control.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
MSLane * getLane() const
Returns the lane the vehicle is on.
Representation of a lane in the micro simulation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.