 |
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) {
68 while (seg !=
nullptr) {
76 const std::vector<MSLane*>& lanes = edge.
getLanes();
77 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
78 if (((**lane).getVehicleNumber() != 0)) {
86 const std::vector<MSTransportable*>& persons = edge.
getSortedPersons(timestep);
88 if (dump || persons.size() > 0 || containers.size() > 0) {
93 while (seg !=
nullptr) {
98 const std::vector<MSLane*>& lanes = edge.
getLanes();
99 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
105 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
109 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
138 const MSVehicle& microVeh = static_cast<const MSVehicle&>(veh);
146 if (personNumber > 0) {
150 if (containerNumber > 0) {
153 const std::vector<MSTransportable*>& persons = microVeh.
getPersons();
154 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
157 const std::vector<MSTransportable*>& containers = microVeh.
getContainers();
158 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
int getContainerNumber() const
Returns the number of containers.
Representation of a lane in the micro simulation.
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's persons sorted by pos.
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.
A single mesoscopic segment (cell)
Static storage of an output device and its base (abstract) implementation.
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
static double naviDegree(const double angle)
double getSpeedLat() const
return the lateral speed of the current lane change maneuver
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
const std::vector< MSTransportable * > & getContainers() const
retrieve riding containers
static void writeEdge(OutputDevice &of, const MSEdge &edge, SUMOTime timestep)
Writes the dump of the given edge into the given device.
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
MSAbstractLaneChangeModel & getLaneChangeModel()
std::string time2string(SUMOTime t)
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
A road/street connecting two junctions.
virtual bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
static bool haveLateralDynamics()
whether any kind of lateral dynamics is active
virtual double getEdgePos() const
Return the position on the edge.
static void writeLane(OutputDevice &of, const MSLane &lane)
Writes the dump of the given lane into the given device.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
static MELoop * gMesoNet
mesoscopic simulation infrastructure
static void writeTransportable(OutputDevice &of, const MSTransportable *p, SumoXMLTag tag)
write transportable
const std::vector< MSTransportable * > & getPersons() const
retrieve riding persons
std::vector< MSEdge * > MSEdgeVector
int getPersonNumber() const
Returns the number of persons.
const std::string & getID() const
returns the id of the transportable
The base class for microscopic and mesoscopic vehicles.
const std::string & getID() const
Returns the name of the vehicle.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Stores edges and lanes, performs moving of vehicle.
int gPrecision
the precision for floating point outputs
void writeVehicles(OutputDevice &of) const
virtual double getPositionOnLane() const =0
Get the vehicle's position along the lane.
static bool gOmitEmptyEdgesOnDump
Information whether empty edges shall be written on dump.
const std::string & getID() const
Returns the id.
virtual double getAngle() const
return the current angle of the transportable
static void writeVehicle(OutputDevice &of, const MSBaseVehicle &veh)
Writes the dump of the given vehicle into the given device.
const MSEdgeVector & getEdges() const
Returns loaded edges.
int getCarNumber() const
Returns the total number of cars on the segment.
virtual double getSpeed() const =0
Returns the vehicle's current speed.
Representation of a vehicle in the micro simulation.
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's containers sorted by pos.