31 std::vector<std::string>
33 std::vector<std::string> ids;
80 for (
auto lane : lanes) {
81 wtime += lane->getWaitingSeconds();
86 const std::vector<std::string>
88 std::vector<std::string> personIDs;
90 personIDs.reserve(persons.size());
92 personIDs.push_back(p->getID());
97 const std::vector<std::string>
99 std::vector<std::string> vehIDs;
101 for (
auto lane : lanes) {
103 for (
auto veh : vehs) {
104 vehIDs.push_back(veh->getID());
106 lane->releaseVehicles();
116 for (
auto lane : lanes) {
117 sum += lane->getCO2Emissions();
126 for (
auto lane : lanes) {
127 sum += lane->getCOEmissions();
136 for (
auto lane : lanes) {
137 sum += lane->getHCEmissions();
146 for (
auto lane : lanes) {
147 sum += lane->getPMxEmissions();
156 for (
auto lane : lanes) {
157 sum += lane->getNOxEmissions();
166 for (
auto lane : lanes) {
167 sum += lane->getFuelConsumption();
176 for (
auto lane : lanes) {
177 sum += pow(10., (lane->getHarmonoise_NoiseEmissions() / 10.));
189 for (
auto lane : lanes) {
190 sum += lane->getElectricityConsumption();
199 for (
auto lane : lanes) {
200 sum += lane->getVehicleNumber();
214 for (
auto lane : lanes) {
215 sum += lane->getNettoOccupancy();
217 return sum / (double) lanes.size();
224 for (
auto lane : lanes) {
226 for (
auto veh : vehs) {
231 lane->releaseVehicles();
238 double lengthSum = 0;
241 for (
auto lane : lanes) {
243 for (
auto veh : vehs) {
244 lengthSum += veh->getVehicleType().getLength();
246 noVehicles += (int) vehs.size();
247 lane->releaseVehicles();
249 if (noVehicles == 0) {
252 return lengthSum / (double) noVehicles;
275 const std::vector<MSLane*>& lanes = e->
getLanes();
276 for (
auto lane : lanes) {
295 for (
auto lane : lanes) {
296 lane->setMaxSpeed(value);
308 shape = lanes.front()->getShape();
309 if (lanes.size() > 1) {
310 copy(lanes.back()->getShape().begin(), lanes.back()->getShape().end(), back_inserter(shape));
static double getCO2Emissions(const std::string &id)
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
static void setAllowedVehicleClasses(const std::string &id, std::vector< std::string > vector)
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
static double getVehicleAverageLength(const std::string &id)
static double getPMxEmissions(const std::string &id)
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
static double getMeanSpeed(const std::string &id)
static std::vector< std::string > getIDList()
static void setDisallowedVehicleClasses(const std::string &id, std::vector< std::string > classes)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
static double retrieveExistingEffort(const std::string &id, double time)
static int getVehicleNumber(const std::string &id)
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's persons sorted by pos.
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary...
static double getHCEmissions(const std::string &id)
static const std::vector< std::string > getVehicleIDs(const std::string &id)
static MSEdge * getEdge(const std::string &id)
SVCPermissions invertPermissions(SVCPermissions permissions)
negate the given permissions and ensure that only relevant bits are set
static void getShape(const std::string &id, PositionVector &shape)
A road/street connecting two junctions.
static void addEffort(const std::string &id, double begTime, double endTime, double value)
void rebuildAllowedLanes()
static void addTravelTime(const std::string &id, double begTime, double endTime, double value)
static double retrieveExistingTravelTime(const std::string &id, double time)
void addTravelTime(const MSEdge *const e, double begin, double end, double value)
Adds a travel time information for an edge and a time span.
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
static void setParameter(const std::string &id, const std::string &name, const std::string &value)
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
std::vector< MSVehicle * > VehCont
Container for vehicles.
static std::string getParameter(const std::string &id, const std::string ¶mName)
static const std::vector< std::string > getPersonIDs(const std::string &id)
static double getOccupancy(const std::string &id)
static int getVehicleHaltingNumber(const std::string &id)
static double getNoiseEmissions(const std::string &id)
static double getFuelConsumption(const std::string &id)
static double getWaitingSeconds(const std::string &id)
static double getCurrentTravelTime(const std::string &id)
static double getCOEmissions(const std::string &id)
static double getElectricityConsumption(const std::string &id)
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
static void setAllowedSVCPermissions(const std::string &id, SVCPermissions permissions)
static const long CHANGE_PERMISSIONS_PERMANENT
double getMeanSpeed() const
get the mean speed
static double getNOxEmissions(const std::string &id)
static double sum(double val)
Computes the resulting noise.
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
static void setMaxSpeed(const std::string &id, double value)
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net's internal edge travel times/efforts container.
void addEffort(const MSEdge *const e, double begin, double end, double value)
Adds an effort information for an edge and a time span.