84 if (microVeh != 0 && signals) {
90 const std::vector<MSTransportable*>& persons = microVeh->
getPersons();
91 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
94 const std::vector<MSTransportable*>& containers = microVeh->
getContainers();
95 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
105 for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
106 const std::vector<MSTransportable*>& persons = (*e)->getSortedPersons(timestep);
107 for (std::vector<MSTransportable*>::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) {
115 const std::vector<MSEdge*>& edges = ec.
getEdges();
116 for (std::vector<MSEdge*>::const_iterator e = edges.begin(); e != edges.end(); ++e) {
117 const std::vector<MSTransportable*>& containers = (*e)->getSortedContainers(timestep);
118 for (std::vector<MSTransportable*>::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) {
virtual double getAngle() const =0
Get the vehicle's angle.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
double z() const
Returns the z-position.
SumoXMLTag
Numbers representing SUMO-XML - element names.
MSEdge & getEdge() const
Returns the lane's edge.
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
virtual double getAngle() const
return the current angle of the transportable
virtual double getEdgePos() const
Return the position on the edge.
Representation of a vehicle in the micro simulation.
virtual bool isRemoteControlled() const =0
Returns the information whether the vehicle is fully controlled via TraCI.
virtual double getSlope() const =0
Returns the slope of the road at vehicle's position.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
double x() const
Returns the x-position.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
std::string time2string(SUMOTime t)
void setPrecision(int precision=gPrecision)
Sets the precison or resets it to default.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
virtual double getPositionOnLane() const =0
Get the vehicle's position along the lane.
const std::string & getID() const
returns the id of the transportable
static void writeTransportable(OutputDevice &of, const MSEdge *e, MSTransportable *p, SumoXMLTag tag, bool useGeo, bool elevation)
write transportable
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
static OptionsCont & getOptions()
Retrieves the options.
virtual double getSpeed() const
the current speed of the transportable
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.
static double naviDegree(const double angle)
virtual double getSpeed() const =0
Returns the vehicle's current speed.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Representation of a vehicle.
virtual MSTransportableControl & getPersonControl()
Returns the person control.
A point in 2D or 3D with translation and scaling methods.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
double y() const
Returns the y-position.
Stores edges and lanes, performs moving of vehicle.
const std::vector< MSTransportable * > & getContainers() const
retrieve riding containers
virtual bool isParking() const =0
Returns the information whether the vehicle is parked.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.
const std::vector< MSTransportable * > & getPersons() const
retrieve riding persons
trigger: the time of the step
bool hasTransportables() const
checks whether any transportable waits to finish her plan
const std::string & getID() const
Returns the name of the vehicle type.
virtual const std::string & getID() const =0
Get the vehicle's ID.
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
MSLane * getLane() const
Returns the lane the vehicle is on.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
const MSEdgeVector & getEdges() const
Returns loaded edges.