65 fclass = fclass.substr(0, fclass.find_first_of(
"@"));
75 if (microVeh !=
nullptr) {
92 for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
98 const std::vector<MSLane*>& lanes = edge.
getLanes();
99 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
124 for (std::vector<std::string>::const_iterator id_it = ids.begin(); id_it != ids.end(); ++id_it) {
128 std::vector<std::string> laneIDs;
129 for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
131 for (MSTrafficLightLogic::LaneVector::const_iterator j = llanes.begin(); j != llanes.end(); ++j) {
132 laneIDs.push_back((*j)->getID());
136 std::string lane_output =
"";
137 for (
int i1 = 0; i1 < (int)laneIDs.size(); ++i1) {
138 lane_output += laneIDs[i1] +
" ";
std::vector< MSEdge * > MSEdgeVector
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
static double naviDegree(const double angle)
static double computeNoise(SUMOEmissionClass c, double v, double a)
Returns the noise produced by the a vehicle of the given type at the given speed.
double getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
Stores edges and lanes, performs moving of vehicle.
const MSEdgeVector & getEdges() const
Returns loaded edges.
A road/street connecting two junctions.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
bool isNormal() const
return whether this edge is an internal edge
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
static void writeVehicles(OutputDevice &of)
Writes the XML Nodes for the vehicles (e.g. speed, position, emissions)
static void writeTLS(OutputDevice &of, SUMOTime timestep)
Writes the XML Nodes for the traffic lights (e.g. actual state)
static void write(OutputDevice &of, SUMOTime timestep)
Dumping a hugh List of Parameters available in the Simulation.
static void writeEdge(OutputDevice &of)
Writes the XML Nodes for the edges (e.g. traveltime)
static void writeLane(OutputDevice &of, const MSLane &lane)
Writes the XML Nodes for the lanes (e.g. emissions, occupancy)
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
Representation of a lane in the micro simulation.
double getNettoOccupancy() const
Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps)
int getVehicleNumber() const
Returns the number of vehicles on this lane (for which this lane is responsible)
double getSpeedLimit() const
Returns the lane's maximum allowed speed.
double getHarmonoise_NoiseEmissions() const
Returns the sum of last step noise emissions.
double getEmissions() const
Returns the sum of last step emissions The value is always per 1s, so multiply by step length if nece...
double getMeanSpeed() const
Returns the mean speed on this lane.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
MSEdgeControl & getEdgeControl()
Returns the edge control.
const std::string & getState() const
Returns the state within this phase.
Storage for all programs of a single tls.
MSTrafficLightLogic * getActive() const
A class that stores and controls tls and switching of their programs.
std::vector< std::string > getAllTLIds() const
TLSLogicVariants & get(const std::string &id) const
Returns the variants of a named tls.
std::vector< LaneVector > LaneVectorVector
Definition of a list that holds lists of lanes that do have the same attribute.
virtual const MSPhaseDefinition & getCurrentPhaseDef() const =0
Returns the definition of the current phase.
std::vector< MSLane * > LaneVector
Definition of the list of arrival lanes subjected to this tls.
const LaneVectorVector & getLaneVectors() const
Returns the list of lists of all lanes controlled by this tls.
The class responsible for building and deletion of vehicles.
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
Representation of a vehicle in the micro simulation.
const MSLane * getLane() const
Returns the lane the vehicle is on.
const std::string & getID() const
Returns the name of the vehicle type.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
const std::string & getID() const
Returns the id.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope, const EnergyParams *param)
Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fu...
double x() const
Returns the x-position.
double y() const
Returns the y-position.
virtual double getAcceleration() const =0
Returns the object's acceleration.
virtual const MSVehicleType & getVehicleType() const =0
Returns the object's "vehicle" type.
virtual double getSlope() const =0
Returns the slope of the road at object's position in degrees.
virtual double getSpeed() const =0
Returns the object's current speed.
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
virtual double getPositionOnLane() const =0
Get the object's position along the lane.
Representation of a vehicle.
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
virtual EnergyParams * getEmissionParameters() const =0
Returns the vehicle's emission model parameter.
virtual double getAngle() const =0
Get the vehicle's angle.
virtual const MSRoute & getRoute() const =0
Returns the current route.
Storage for collected values of all emission types.