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