49 #ifdef CHECK_MEMORY_LEAKS 51 #endif // CHECK_MEMORY_LEAKS 87 if (microVeh != 0 && signals) {
97 for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
98 const std::vector<MSTransportable*>& persons = (*e)->getSortedPersons(timestep);
99 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
125 const std::vector<MSEdge*>& edges = ec.
getEdges();
126 for (std::vector<MSEdge*>::const_iterator e = edges.begin(); e != edges.end(); ++e) {
127 const std::vector<MSTransportable*>& containers = (*e)->getSortedContainers(timestep);
128 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
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.
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.
virtual SUMOReal getAngle() const
return the current angle of the transportable
SUMOReal x() const
Returns the x-position.
static OptionsCont & getOptions()
Retrieves the options.
static void write(OutputDevice &of, SUMOTime timestep, bool elevation)
Writes the posion and the angle of each vehcile into the given device.
const std::string & getID() const
Returns the id.
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.
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)
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.
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.