48 #ifdef CHECK_MEMORY_LEAKS
50 #endif // CHECK_MEMORY_LEAKS
56 using namespace traci;
86 std::vector<std::string> ids;
91 std::vector<std::string> ids;
111 if (!
MSNet::getInstance()->getWeightsStorage().retrieveExistingTravelTime(e, 0, time, value)) {
127 if (!
MSNet::getInstance()->getWeightsStorage().retrieveExistingEffort(e, 0, time, value)) {
139 std::vector<std::string> vehIDs;
140 const std::vector<MSLane*>& lanes = e->
getLanes();
141 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
142 const std::deque<MSVehicle*>& vehs = (*i)->getVehiclesSecure();
143 for (std::deque<MSVehicle*>::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
144 vehIDs.push_back((*j)->getID());
146 (*i)->releaseVehicles();
154 const std::vector<MSLane*>& lanes = e->
getLanes();
155 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
156 sum += (*i)->getHBEFA_CO2Emissions();
164 const std::vector<MSLane*>& lanes = e->
getLanes();
165 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
166 sum += (*i)->getHBEFA_COEmissions();
174 const std::vector<MSLane*>& lanes = e->
getLanes();
175 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
176 sum += (*i)->getHBEFA_HCEmissions();
184 const std::vector<MSLane*>& lanes = e->
getLanes();
185 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
186 sum += (*i)->getHBEFA_PMxEmissions();
194 const std::vector<MSLane*>& lanes = e->
getLanes();
195 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
196 sum += (*i)->getHBEFA_NOxEmissions();
204 const std::vector<MSLane*>& lanes = e->
getLanes();
205 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
206 sum += (*i)->getHBEFA_FuelConsumption();
214 const std::vector<MSLane*>& lanes = e->
getLanes();
215 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
216 sum += (
SUMOReal) pow(10., ((*i)->getHarmonoise_NoiseEmissions() / 10.));
228 const std::vector<MSLane*>& lanes = e->
getLanes();
229 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
230 sum += (*i)->getVehicleNumber();
238 const std::vector<MSLane*>& lanes = e->
getLanes();
239 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
240 sum += (*i)->getMeanSpeed();
248 const std::vector<MSLane*>& lanes = e->
getLanes();
249 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
250 sum += (*i)->getOccupancy();
258 const std::vector<MSLane*>& lanes = e->
getLanes();
259 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
260 const std::deque<MSVehicle*>& vehs = (*i)->getVehiclesSecure();
261 for (std::deque<MSVehicle*>::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
262 if ((*j)->getSpeed() < 0.1) {
266 (*i)->releaseVehicles();
275 const std::vector<MSLane*>& lanes = e->
getLanes();
276 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
277 const std::deque<MSVehicle*>& vehs = (*i)->getVehiclesSecure();
278 for (std::deque<MSVehicle*>::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
279 lengthSum += (*j)->getVehicleType().getLength();
281 noVehicles += (
int) vehs.size();
282 (*i)->releaseVehicles();
285 if (noVehicles == 0) {
305 std::string warning =
"";
328 const std::vector<MSLane*>& lanes = e->
getLanes();
329 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
330 (*i)->setPermissions(permissions);
342 const std::vector<MSLane*>& lanes = e->
getLanes();
343 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
344 (*i)->setPermissions(permissions);
354 int parameterCount = inputStorage.
readInt();
355 if (parameterCount == 3) {
376 }
else if (parameterCount == 1) {
396 int parameterCount = inputStorage.
readInt();
397 if (parameterCount == 3) {
418 }
else if (parameterCount == 1) {
440 const std::vector<MSLane*>& lanes = e->
getLanes();
441 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
442 (*i)->setMaxSpeed(val);
460 const std::vector<MSLane*>& lanes = e->
getLanes();
461 shape.
push_back(lanes.front()->getShape());
462 if (lanes.size() > 1) {
463 shape.
push_back(lanes.back()->getShape().reverse());
473 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
474 const std::vector<MSLane*>& lanes = (*i)->getLanes();
476 for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
477 b.
add((*j)->getShape().getBoxBoundary());