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