43 if (period > 0 && (timestep - begin) % period != 0) {
57 for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
59 const std::vector<MSLane*>& lanes = edge.
getLanes();
60 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
71 double queueing_time = 0.0;
73 double queueing_length = 0.0;
75 double queueing_length2 = 0.0;
76 const double threshold_velocity = 5 / 3.6;
79 for (MSLane::VehCont::const_iterator it_veh = lane.
myVehicles.begin(); it_veh != lane.
myVehicles.end(); ++it_veh) {
88 queueing_length =
MAX2(veh_back_to_lane_end, queueing_length);
94 queueing_length2 =
MAX2(veh_back_to_lane_end, queueing_length2);
100 if (queueing_length > 1 || queueing_length2 > 1) {
std::vector< MSEdge * > MSEdgeVector
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
Stores edges and lanes, performs moving of vehicle.
const MSEdgeVector & getEdges() const
Returns loaded edges.
A road/street connecting two junctions.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Representation of a lane in the micro simulation.
bool empty() const
Returns true if there is not a single vehicle on the lane.
VehCont myVehicles
The lane's vehicles. This container holds all vehicles that have their front (longitudinally) and the...
double getLength() const
Returns the lane's length.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSEdgeControl & getEdgeControl()
Returns the edge control.
static void writeLane(OutputDevice &of, const MSLane &lane)
Iterates through the lanes and check for available vehicle queues.
static void write(OutputDevice &of, SUMOTime timestep)
Export the queueing length in front of a junction (very experimental!)
static void writeEdge(OutputDevice &of)
Iterates through all the edges and extract the lanes.
Representation of a vehicle in the micro simulation.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
const MSLane * getLane() const
Returns the lane the vehicle is on.
double getSpeed() const
Returns the vehicle's current speed.
double getPositionOnLane() const
Get the vehicle's position along the lane.
double getLength() const
Get vehicle's length [m].
const std::string & getID() const
Returns the id.
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.