32 std::vector<std::string>
34 std::vector<std::string> ids;
81 for (
auto lane : lanes) {
82 wtime += lane->getWaitingSeconds();
87 const std::vector<std::string>
89 std::vector<std::string> personIDs;
91 personIDs.reserve(persons.size());
93 personIDs.push_back(p->getID());
98 const std::vector<std::string>
100 std::vector<std::string> vehIDs;
102 for (
auto lane : lanes) {
104 for (
auto veh : vehs) {
105 vehIDs.push_back(veh->getID());
107 lane->releaseVehicles();
117 for (
auto lane : lanes) {
118 sum += lane->getCO2Emissions();
127 for (
auto lane : lanes) {
128 sum += lane->getCOEmissions();
137 for (
auto lane : lanes) {
138 sum += lane->getHCEmissions();
147 for (
auto lane : lanes) {
148 sum += lane->getPMxEmissions();
157 for (
auto lane : lanes) {
158 sum += lane->getNOxEmissions();
167 for (
auto lane : lanes) {
168 sum += lane->getFuelConsumption();
177 for (
auto lane : lanes) {
178 sum += pow(10., (lane->getHarmonoise_NoiseEmissions() / 10.));
190 for (
auto lane : lanes) {
191 sum += lane->getElectricityConsumption();
200 for (
auto lane : lanes) {
201 sum += lane->getVehicleNumber();
215 for (
auto lane : lanes) {
216 sum += lane->getNettoOccupancy();
218 return sum / (double)lanes.size();
225 for (
auto lane : lanes) {
227 for (
auto veh : vehs) {
232 lane->releaseVehicles();
239 double lengthSum = 0;
242 for (
auto lane : lanes) {
244 for (
auto veh : vehs) {
245 lengthSum += veh->getVehicleType().getLength();
247 noVehicles += (int)vehs.size();
248 lane->releaseVehicles();
250 if (noVehicles == 0) {
253 return lengthSum / (double)noVehicles;
276 const std::vector<MSLane*>& lanes = e->
getLanes();
277 for (
auto lane : lanes) {
289 Edge::addEffort(
const std::string&
id,
double begTime,
double endTime,
double value) {
296 for (
auto lane : lanes) {
297 lane->setMaxSpeed(value);
309 shape = lanes.front()->getShape();
310 if (lanes.size() > 1) {
311 copy(lanes.back()->getShape().begin(), lanes.back()->getShape().end(), back_inserter(shape));
static void setAllowedVehicleClasses(const std::string &id, std::vector< std::string > vector)
static void setAllowedSVCPermissions(const std::string &id, SVCPermissions permissions)
static std::vector< std::string > getIDList()
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
static double retrieveExistingEffort(const std::string &id, double time)
static double getOccupancy(const std::string &id)
static double getVehicleAverageLength(const std::string &id)
static void addTravelTime(const std::string &id, double begTime, double endTime, double value)
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
static double getFuelConsumption(const std::string &id)
static void addEffort(const std::string &id, double begTime, double endTime, double value)
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double getMeanSpeed() const
get the mean speed
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 getWaitingSeconds(const std::string &id)
static double getCurrentTravelTime(const std::string &id)
static double retrieveExistingTravelTime(const std::string &id, double time)
static double getNOxEmissions(const std::string &id)
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's persons sorted by pos.
SVCPermissions invertPermissions(SVCPermissions permissions)
negate the given permissions and ensure that only relevant bits are set
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
static const std::vector< std::string > getPersonIDs(const std::string &id)
static int getVehicleNumber(const std::string &id)
A road/street connecting two junctions.
void rebuildAllowedLanes()
static double getNoiseEmissions(const std::string &id)
void addTravelTime(const MSEdge *const e, double begin, double end, double value)
Adds a travel time information for an edge and a time span.
static double getCOEmissions(const std::string &id)
static double getPMxEmissions(const std::string &id)
static void setMaxSpeed(const std::string &id, double value)
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
static double getElectricityConsumption(const std::string &id)
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)
static std::string getParameter(const std::string &id, const std::string ¶mName)
static MSEdge * getEdge(const std::string &id)
std::vector< MSVehicle * > VehCont
Container for vehicles.
static void getShape(const std::string &id, PositionVector &shape)
static double getHCEmissions(const std::string &id)
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
static int getVehicleHaltingNumber(const std::string &id)
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
static double getCO2Emissions(const std::string &id)
static void setDisallowedVehicleClasses(const std::string &id, std::vector< std::string > classes)
static const long CHANGE_PERMISSIONS_PERMANENT
static double getMeanSpeed(const std::string &id)
static double sum(double val)
Computes the resulting noise.
static const std::vector< std::string > getVehicleIDs(const std::string &id)
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.