43 #include <mesosim/MELoop.h>
44 #include <mesosim/MESegment.h>
47 #ifdef CHECK_MEMORY_LEAKS
49 #endif // CHECK_MEMORY_LEAKS
74 for (; it != end; ++it) {
78 fclass = fclass.substr(0, fclass.find_first_of(
"@"));
96 const std::vector<MSEdge*>& edges = ec.
getEdges();
97 for (std::vector<MSEdge*>::const_iterator e = edges.begin(); e != edges.end(); ++e) {
100 const std::vector<MSLane*>& lanes = edge.
getLanes();
101 for (std::vector<MSLane*>::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) {
126 for (std::vector<std::string>::const_iterator id_it = ids.begin(); id_it != ids.end(); ++id_it) {
130 std::vector<std::string> laneIDs;
131 for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
133 for (MSTrafficLightLogic::LaneVector::const_iterator j = llanes.begin(); j != llanes.end(); ++j) {
134 laneIDs.push_back((*j)->getID());
138 std::string lane_output =
"";
139 for (
unsigned int i1 = 0; i1 < laneIDs.size(); ++i1) {
140 lane_output += laneIDs[i1] +
" ";
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static void writeVehicles(OutputDevice &of)
Writes the XML Nodes for the vehicles (e.g. speed, position, emissions)
virtual const MSPhaseDefinition & getCurrentPhaseDef() const =0
Returns the definition of the current phase.
Representation of a vehicle in the micro simulation.
const std::string & getState() const
Returns the state within this phase.
SUMOReal getHBEFA_HCEmissions() const
Returns HC emission of the current state.
Storage for all programs of a single tls.
Position positionAtOffset(SUMOReal pos) const
Returns the position at the given length.
static void writeEdge(OutputDevice &of)
Writes the XML Nodes for the edges (e.g. traveltime)
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
SUMOReal getHBEFA_NOxEmissions() const
Returns NOx emission of the current state.
std::string time2string(SUMOTime t)
SUMOReal getCurrentTravelTime(const SUMOReal minSpeed=0.00001) const
Computes and returns the current travel time for this edge.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOReal getNettoOccupancy() const
Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps)...
const MSRoute & getRoute() const
Returns the current route.
std::vector< std::string > getAllTLIds() const
static void write(OutputDevice &of, SUMOTime timestep)
Dumping a hugh List of Parameters available in the Simulation.
SUMOReal getPositionOnLane() const
Get the vehicle's position along the lane.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
SUMOReal x() const
Returns the x-position.
A class that stores and controls tls and switching of their programs.
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
SUMOReal getHBEFA_HCEmissions() const
Returns the sum of last step HC emissions.
SUMOReal getHBEFA_COEmissions() const
Returns CO emission of the current state.
MSTrafficLightLogic * getActive() const
A point in 2D or 3D with translation and scaling methods.
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
SUMOReal getHBEFA_COEmissions() const
Returns the sum of last step CO emissions.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
SUMOReal getMeanSpeed() const
Returns the mean speed on this lane.
Stores edges and lanes, performs moving of vehicle.
SUMOReal getHBEFA_PMxEmissions() const
Returns PMx emission of the current state.
SUMOReal getSpeedLimit() const
Returns the lane's maximum allowed speed.
SUMOReal getHBEFA_PMxEmissions() const
Returns the sum of last step PMx emissions.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
SUMOReal getHarmonoise_NoiseEmissions() const
Returns noise emissions of the current state.
unsigned int getVehicleNumber() const
Returns the number of vehicles on this lane.
const LaneVectorVector & getLanes() const
Returns the list of lists of all lanes controlled by this tls.
std::vector< MSLane * > LaneVector
Definition of the list of links that participate in this tl-light.
std::vector< LaneVector > LaneVectorVector
Definition of a list that holds lists of links that do have the same attribute.
SUMOReal y() const
Returns the y-position.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
const std::string & getID() const
Returns the name of the vehicle type.
SUMOReal getSpeed() const
Returns the vehicle's current speed.
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
TLSLogicVariants & get(const std::string &id) const
Returns the variants of a named tls.
SUMOReal getWaitingSeconds() const
Returns the number of seconds waited (speed was lesser than 0.1m/s)
SUMOReal getHBEFA_FuelConsumption() const
Returns the sum of last step fuel consumption.
static void writeLane(OutputDevice &of, const MSLane &lane)
Writes the XML Nodes for the lanes (e.g. emissions, occupancy)
SUMOReal getHBEFA_NOxEmissions() const
Returns the sum of last step NOx emissions.
const PositionVector & getShape() const
Returns this lane's shape.
const std::vector< MSEdge * > & getEdges() const
Returns loaded edges.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
SUMOReal getHBEFA_CO2Emissions() const
Returns the sum of last step CO2 emissions.
static void writeTLS(OutputDevice &of, SUMOTime timestep)
Writes the XML Nodes for the traffic lights (e.g. actual state)
MSEdgeControl & getEdgeControl()
Returns the edge control.
The class responsible for building and deletion of vehicles.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
SUMOReal getHarmonoise_NoiseEmissions() const
Returns the sum of last step noise emissions.
SUMOEmissionClass getEmissionClass() const
Get this vehicle type's emission class.
MSLane * getLane() const
Returns the lane the vehicle is on.
SUMOReal getHBEFA_CO2Emissions() const
Returns CO2 emission of the current state.
Representation of a lane in the micro simulation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
SUMOReal getAngle() const
Returns the vehicle's direction in degrees.
const std::string & getID() const
Returns the name of the vehicle.