49 #ifdef CHECK_MEMORY_LEAKS 51 #endif // CHECK_MEMORY_LEAKS 87 if (microVeh != 0 && signals) {
93 const std::vector<MSTransportable*>& persons = microVeh->
getPersons();
94 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
97 const std::vector<MSTransportable*>& containers = microVeh->
getContainers();
98 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
108 for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
109 const std::vector<MSTransportable*>& persons = (*e)->getSortedPersons(timestep);
110 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
118 const std::vector<MSEdge*>& edges = ec.
getEdges();
119 for (std::vector<MSEdge*>::const_iterator e = edges.begin(); e != edges.end(); ++e) {
120 const std::vector<MSTransportable*>& containers = (*e)->getSortedContainers(timestep);
121 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
SumoXMLTag
Numbers representing SUMO-XML - element names.
MSEdge & getEdge() const
Returns the lane's edge.
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
Representation of a vehicle in the micro simulation.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
#define GEO_OUTPUT_ACCURACY
virtual SUMOReal getPositionOnLane() const =0
Get the vehicle's position along the lane.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
virtual SUMOReal getAngle() const =0
Get the vehicle's angle.
std::string time2string(SUMOTime t)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
const std::string & getID() const
returns the id of the transportable
virtual SUMOReal getEdgePos() const
Return the position on the edge.
static void writeTransportable(OutputDevice &of, const MSEdge *e, MSTransportable *p, SumoXMLTag tag, bool useGeo, bool elevation)
write transportable
virtual SUMOReal getAngle() const
return the current angle of the transportable
SUMOReal x() const
Returns the x-position.
virtual bool isParking() const =0
Returns the information whether the vehicle is parked.
static OptionsCont & getOptions()
Retrieves the options.
bool hasPersons() const
checks whether any person waits to finish her plan
static void write(OutputDevice &of, SUMOTime timestep, bool elevation)
Writes the position and the angle of each vehicle into the given device.
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
void setPrecision(unsigned int precision=OUTPUT_ACCURACY)
Sets the precison or resets it to default.
Representation of a vehicle.
A point in 2D or 3D with translation and scaling methods.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
SUMOReal z() const
Returns the z-position.
Stores edges and lanes, performs moving of vehicle.
const std::vector< MSTransportable * > & getContainers() const
retrieve riding containers
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
const std::vector< MSTransportable * > & getPersons() const
retrieve riding persons
static SUMOReal naviDegree(const SUMOReal angle)
virtual SUMOReal getSpeed() const
the current speed of the transportable
virtual SUMOReal getSpeed() const =0
Returns the vehicle's current speed.
virtual MSPersonControl & getPersonControl()
Returns the person control.
SUMOReal y() const
Returns the y-position.
virtual Position getPosition(const SUMOReal offset=0) const =0
Return current position (x/y, cartesian)
const std::string & getID() const
Returns the name of the vehicle type.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
virtual Position getPosition() const
Return the Network coordinate of the transportable.
int getSignals() const
Returns the signals.
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.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
The class responsible for building and deletion of vehicles.
std::vector< MSEdge * > MSEdgeVector
virtual SUMOReal getSlope() const =0
Returns the slope of the road at vehicle's position.
MSLane * getLane() const
Returns the lane the vehicle is on.
virtual const std::string & getID() const =0
Get the vehicle's ID.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
const MSEdgeVector & getEdges() const
Returns loaded edges.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.