48 #ifdef CHECK_MEMORY_LEAKS
50 #endif // CHECK_MEMORY_LEAKS
56 using namespace traci;
85 std::vector<std::string> ids;
90 std::vector<std::string> ids;
108 if (!
MSNet::getInstance()->getWeightsStorage().retrieveExistingTravelTime(e, 0, time, value)) {
123 if (!
MSNet::getInstance()->getWeightsStorage().retrieveExistingEffort(e, 0, time, value)) {
135 std::vector<std::string> vehIDs;
136 const std::vector<MSLane*>& lanes = e->
getLanes();
137 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
138 const std::deque<MSVehicle*>& vehs = (*i)->getVehiclesSecure();
139 for (std::deque<MSVehicle*>::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
140 vehIDs.push_back((*j)->getID());
142 (*i)->releaseVehicles();
150 const std::vector<MSLane*>& lanes = e->
getLanes();
151 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
152 sum += (*i)->getHBEFA_CO2Emissions();
160 const std::vector<MSLane*>& lanes = e->
getLanes();
161 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
162 sum += (*i)->getHBEFA_COEmissions();
170 const std::vector<MSLane*>& lanes = e->
getLanes();
171 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
172 sum += (*i)->getHBEFA_HCEmissions();
180 const std::vector<MSLane*>& lanes = e->
getLanes();
181 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
182 sum += (*i)->getHBEFA_PMxEmissions();
190 const std::vector<MSLane*>& lanes = e->
getLanes();
191 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
192 sum += (*i)->getHBEFA_NOxEmissions();
200 const std::vector<MSLane*>& lanes = e->
getLanes();
201 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
202 sum += (*i)->getHBEFA_FuelConsumption();
210 const std::vector<MSLane*>& lanes = e->
getLanes();
211 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
212 sum += (
SUMOReal) pow(10., ((*i)->getHarmonoise_NoiseEmissions() / 10.));
224 const std::vector<MSLane*>& lanes = e->
getLanes();
225 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
226 sum += (*i)->getVehicleNumber();
234 const std::vector<MSLane*>& lanes = e->
getLanes();
235 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
236 sum += (*i)->getMeanSpeed();
244 const std::vector<MSLane*>& lanes = e->
getLanes();
245 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
246 sum += (*i)->getOccupancy();
254 const std::vector<MSLane*>& lanes = e->
getLanes();
255 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
256 const std::deque<MSVehicle*>& vehs = (*i)->getVehiclesSecure();
257 for (std::deque<MSVehicle*>::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
258 if ((*j)->getSpeed() < 0.1) {
262 (*i)->releaseVehicles();
271 const std::vector<MSLane*>& lanes = e->
getLanes();
272 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
273 const std::deque<MSVehicle*>& vehs = (*i)->getVehiclesSecure();
274 for (std::deque<MSVehicle*>::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
275 lengthSum += (*j)->getVehicleType().getLength();
277 noVehicles += (
int) vehs.size();
278 (*i)->releaseVehicles();
281 if (noVehicles == 0) {
301 std::string warning =
"";
317 std::vector<std::string> classes;
322 const std::vector<MSLane*>& lanes = e->
getLanes();
323 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
324 (*i)->setPermissions(permissions);
331 std::vector<std::string> classes;
336 const std::vector<MSLane*>& lanes = e->
getLanes();
337 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
338 (*i)->setPermissions(permissions);
348 int parameterCount = inputStorage.
readInt();
349 if (parameterCount == 3) {
363 }
else if (parameterCount == 1) {
380 int parameterCount = inputStorage.
readInt();
381 if (parameterCount == 3) {
395 }
else if (parameterCount == 1) {
413 const std::vector<MSLane*>& lanes = e->
getLanes();
414 for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
415 (*i)->setMaxSpeed(value);
433 const std::vector<MSLane*>& lanes = e->
getLanes();
434 shape.
push_back(lanes.front()->getShape());
435 if (lanes.size() > 1) {
436 shape.
push_back(lanes.back()->getShape().reverse());
446 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
447 const std::vector<MSLane*>& lanes = (*i)->getLanes();
449 for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
450 b.
add((*j)->getShape().getBoxBoundary());