Eclipse SUMO - Simulation of Urban MObility
MSNet.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
23 // The simulated network and simulation perfomer
24 /****************************************************************************/
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #include <config.h>
31 
32 #ifdef HAVE_VERSION_H
33 #include <version.h>
34 #endif
35 
36 #include <string>
37 #include <iostream>
38 #include <sstream>
39 #include <typeinfo>
40 #include <algorithm>
41 #include <cassert>
42 #include <vector>
43 #include <ctime>
44 
45 #include "trigger/MSTrigger.h"
46 #include "trigger/MSCalibrator.h"
48 #include "MSVehicleControl.h"
50 #include <utils/common/ToString.h>
51 #include <utils/common/SysUtils.h>
66 #include <utils/xml/XMLSubSys.h>
68 #include <libsumo/Simulation.h>
69 #include <mesosim/MELoop.h>
93 #include <utils/router/FareModul.h>
94 
95 #include "MSTransportableControl.h"
96 #include "MSEdgeControl.h"
97 #include "MSJunctionControl.h"
98 #include "MSInsertionControl.h"
99 #include "MSDynamicShapeUpdater.h"
100 #include "MSEventControl.h"
101 #include "MSEdge.h"
102 #include "MSJunction.h"
103 #include "MSJunctionLogic.h"
104 #include "MSLane.h"
105 #include "MSVehicleTransfer.h"
106 #include "MSRoute.h"
107 #include "MSGlobals.h"
108 #include "MSContainer.h"
109 #include "MSEdgeWeightsStorage.h"
110 #include "MSStateHandler.h"
111 #include "MSFrame.h"
112 #include "MSParkingArea.h"
113 #include "MSStoppingPlace.h"
114 #include "MSNet.h"
115 
116 
117 // ===========================================================================
118 // debug constants
119 // ===========================================================================
120 //#define DEBUG_SIMSTEP
121 
122 
123 // ===========================================================================
124 // static member definitions
125 // ===========================================================================
126 MSNet* MSNet::myInstance = nullptr;
127 
128 const std::string MSNet::STAGE_EVENTS("events");
129 const std::string MSNet::STAGE_MOVEMENTS("move");
130 const std::string MSNet::STAGE_LANECHANGE("laneChange");
131 const std::string MSNet::STAGE_INSERTIONS("insertion");
132 
133 // ===========================================================================
134 // static member method definitions
135 // ===========================================================================
136 double
137 MSNet::getEffort(const MSEdge* const e, const SUMOVehicle* const v, double t) {
138  double value;
139  const MSVehicle* const veh = dynamic_cast<const MSVehicle* const>(v);
140  if (veh != nullptr && veh->getWeightsStorage().retrieveExistingEffort(e, t, value)) {
141  return value;
142  }
143  if (getInstance()->getWeightsStorage().retrieveExistingEffort(e, t, value)) {
144  return value;
145  }
146  return 0;
147 }
148 
149 
150 double
151 MSNet::getTravelTime(const MSEdge* const e, const SUMOVehicle* const v, double t) {
152  double value;
153  const MSVehicle* const veh = dynamic_cast<const MSVehicle* const>(v);
154  if (veh != nullptr && veh->getWeightsStorage().retrieveExistingTravelTime(e, t, value)) {
155  return value;
156  }
158  return value;
159  }
160  return e->getMinimumTravelTime(v);
161 }
162 
163 
164 // ---------------------------------------------------------------------------
165 // MSNet - methods
166 // ---------------------------------------------------------------------------
167 MSNet*
169  if (myInstance != nullptr) {
170  return myInstance;
171  }
172  throw ProcessError("A network was not yet constructed.");
173 }
174 
175 void
177  if (!MSGlobals::gUseMesoSim) {
179  }
180 }
181 
182 void
184  if (!MSGlobals::gUseMesoSim) {
186  }
187 }
188 
189 
190 MSNet::MSNet(MSVehicleControl* vc, MSEventControl* beginOfTimestepEvents,
191  MSEventControl* endOfTimestepEvents,
192  MSEventControl* insertionEvents,
193  ShapeContainer* shapeCont):
194  myAmInterrupted(false),
195  myVehiclesMoved(0),
196  myHavePermissions(false),
197  myHasInternalLinks(false),
198  myHasElevation(false),
199  myHasPedestrianNetwork(false),
200  myHasBidiEdges(false),
201  myEdgeDataEndTime(-1),
202  myRouterTT(nullptr),
203  myRouterEffort(nullptr),
204  myPedestrianRouter(nullptr),
205  myDynamicShapeUpdater(nullptr) {
206  if (myInstance != nullptr) {
207  throw ProcessError("A network was already constructed.");
208  }
210  myStep = string2time(oc.getString("begin"));
211  myMaxTeleports = oc.getInt("max-num-teleports");
212  myLogExecutionTime = !oc.getBool("no-duration-log");
213  myLogStepNumber = !oc.getBool("no-step-log");
214  myInserter = new MSInsertionControl(*vc, string2time(oc.getString("max-depart-delay")), oc.getBool("eager-insert"), oc.getInt("max-num-vehicles"),
215  string2time(oc.getString("random-depart-offset")));
216  myVehicleControl = vc;
218  myEdges = nullptr;
219  myJunctions = nullptr;
220  myRouteLoaders = nullptr;
221  myLogics = nullptr;
222  myPersonControl = nullptr;
223  myContainerControl = nullptr;
224  myEdgeWeights = nullptr;
225  myShapeContainer = shapeCont == nullptr ? new ShapeContainer() : shapeCont;
226 
227  myBeginOfTimestepEvents = beginOfTimestepEvents;
228  myEndOfTimestepEvents = endOfTimestepEvents;
229  myInsertionEvents = insertionEvents;
230  myLanesRTree.first = false;
231 
233  MSGlobals::gMesoNet = new MELoop(string2time(oc.getString("meso-recheck")));
234  }
235  myInstance = this;
236  initStatic();
237 }
238 
239 
240 void
242  SUMORouteLoaderControl* routeLoaders,
243  MSTLLogicControl* tlc,
244  std::vector<SUMOTime> stateDumpTimes,
245  std::vector<std::string> stateDumpFiles,
246  bool hasInternalLinks,
247  bool hasNeighs,
248  bool lefthand,
249  double version) {
250  myEdges = edges;
251  myJunctions = junctions;
252  myRouteLoaders = routeLoaders;
253  myLogics = tlc;
254  // save the time the network state shall be saved at
255  myStateDumpTimes = stateDumpTimes;
256  myStateDumpFiles = stateDumpFiles;
257  myStateDumpPeriod = string2time(oc.getString("save-state.period"));
258  myStateDumpPrefix = oc.getString("save-state.prefix");
259  myStateDumpSuffix = oc.getString("save-state.suffix");
260 
261  // initialise performance computation
264  if (hasNeighs && MSGlobals::gLateralResolution > 0) {
265  WRITE_WARNING("Opposite direction driving does not work together with the sublane model.");
266  }
271  myVersion = version;
272 }
273 
274 
276  cleanupStatic();
277  // delete controls
278  delete myJunctions;
279  delete myDetectorControl;
280  // delete mean data
281  delete myEdges;
282  delete myInserter;
283  delete myLogics;
284  delete myRouteLoaders;
285  if (myPersonControl != nullptr) {
286  delete myPersonControl;
287  }
288  if (myContainerControl != nullptr) {
289  delete myContainerControl;
290  }
291  delete myVehicleControl; // must happen after deleting transportables
292  // delete events late so that vehicles can get rid of references first
294  myBeginOfTimestepEvents = nullptr;
295  delete myEndOfTimestepEvents;
296  myEndOfTimestepEvents = nullptr;
297  delete myInsertionEvents;
298  myInsertionEvents = nullptr;
299  delete myShapeContainer;
300  delete myEdgeWeights;
301  delete myRouterTT;
302  delete myRouterEffort;
303  delete myPedestrianRouter;
304  for (auto& router : myIntermodalRouter) {
305  delete router.second;
306  }
307  myIntermodalRouter.clear();
308  myLanesRTree.second.RemoveAll();
309  clearAll();
311  delete MSGlobals::gMesoNet;
312  }
313  myInstance = nullptr;
314 }
315 
316 
317 void
318 MSNet::addRestriction(const std::string& id, const SUMOVehicleClass svc, const double speed) {
319  myRestrictions[id][svc] = speed;
320 }
321 
322 
323 const std::map<SUMOVehicleClass, double>*
324 MSNet::getRestrictions(const std::string& id) const {
325  std::map<std::string, std::map<SUMOVehicleClass, double> >::const_iterator i = myRestrictions.find(id);
326  if (i == myRestrictions.end()) {
327  return nullptr;
328  }
329  return &i->second;
330 }
331 
332 
335  // report the begin when wished
336  WRITE_MESSAGE("Simulation version " + std::string(VERSION_STRING) + " started with time: " + time2string(start));
337  // the simulation loop
339  // state loading may have changed the start time so we need to reinit it
340  myStep = start;
341  while (state == SIMSTATE_RUNNING) {
342  if (myLogStepNumber) {
344  }
345  simulationStep();
346  if (myLogStepNumber) {
348  }
349  state = simulationState(stop);
350 #ifdef DEBUG_SIMSTEP
351  std::cout << SIMTIME << " MSNet::simulate(" << start << ", " << stop << ")"
352  << "\n simulation state: " << getStateMessage(state)
353  << std::endl;
354 #endif
355  if (state == SIMSTATE_LOADING) {
358  } else if (state != SIMSTATE_RUNNING) {
359  if (TraCIServer::getInstance() != nullptr && !TraCIServer::wasClosed()) {
360  // overrides SIMSTATE_END_STEP_REACHED, e.g. (TraCI ignore SUMO's --end option)
361  state = SIMSTATE_RUNNING;
362  }
363  }
364  }
365  // report the end when wished
366  WRITE_MESSAGE("Simulation ended at time: " + time2string(getCurrentTimeStep()));
367  WRITE_MESSAGE("Reason: " + getStateMessage(state));
368  // exit simulation loop
369  closeSimulation(start);
370  return state;
371 }
372 
373 
374 void
377 }
378 
379 
380 const std::string
382  long duration = SysUtils::getCurrentMillis() - mySimBeginMillis;
383  std::ostringstream msg;
384  // print performance notice
385  msg << "Performance: " << "\n" << " Duration: " << duration << "ms" << "\n";
386  if (duration != 0) {
387  msg << " Real time factor: " << (STEPS2TIME(myStep - start) * 1000. / (double)duration) << "\n";
388  msg.setf(std::ios::fixed, std::ios::floatfield); // use decimal format
389  msg.setf(std::ios::showpoint); // print decimal point
390  msg << " UPS: " << ((double)myVehiclesMoved / ((double)duration / 1000)) << "\n";
391  }
392  // print vehicle statistics
393  const std::string discardNotice = ((myVehicleControl->getLoadedVehicleNo() != myVehicleControl->getDepartedVehicleNo()) ?
394  " (Loaded: " + toString(myVehicleControl->getLoadedVehicleNo()) + ")" : "");
395  msg << "Vehicles: " << "\n"
396  << " Inserted: " << myVehicleControl->getDepartedVehicleNo() << discardNotice << "\n"
397  << " Running: " << myVehicleControl->getRunningVehicleNo() << "\n"
398  << " Waiting: " << myInserter->getWaitingVehicleNo() << "\n";
399 
401  // print optional teleport statistics
402  std::vector<std::string> reasons;
403  if (myVehicleControl->getCollisionCount() > 0) {
404  reasons.push_back("Collisions: " + toString(myVehicleControl->getCollisionCount()));
405  }
406  if (myVehicleControl->getTeleportsJam() > 0) {
407  reasons.push_back("Jam: " + toString(myVehicleControl->getTeleportsJam()));
408  }
409  if (myVehicleControl->getTeleportsYield() > 0) {
410  reasons.push_back("Yield: " + toString(myVehicleControl->getTeleportsYield()));
411  }
413  reasons.push_back("Wrong Lane: " + toString(myVehicleControl->getTeleportsWrongLane()));
414  }
415  msg << "Teleports: " << myVehicleControl->getTeleportCount() << " (" << joinToString(reasons, ", ") << ")\n";
416  }
417  if (myVehicleControl->getEmergencyStops() > 0) {
418  msg << "Emergency Stops: " << myVehicleControl->getEmergencyStops() << "\n";
419  }
420  if (myPersonControl != nullptr && myPersonControl->getLoadedNumber() > 0) {
421  msg << "Persons: " << "\n"
422  << " Inserted: " << myPersonControl->getLoadedNumber() << "\n"
423  << " Running: " << myPersonControl->getRunningNumber() << "\n";
424  if (myPersonControl->getJammedNumber() > 0) {
425  msg << " Jammed: " << myPersonControl->getJammedNumber() << "\n";
426  }
427  }
428  if (OptionsCont::getOptions().getBool("duration-log.statistics")) {
430  }
431  return msg.str();
432 }
433 
434 
435 void
438  if (OptionsCont::getOptions().getBool("vehroute-output.write-unfinished")) {
440  }
441  if (OptionsCont::getOptions().getBool("tripinfo-output.write-unfinished")) {
443  }
444  if (OptionsCont::getOptions().isSet("chargingstations-output")) {
446  }
447  if (OptionsCont::getOptions().isSet("railsignal-block-output")) {
449  }
450  if (myLogExecutionTime) {
452  }
453 }
454 
455 
456 void
458 #ifdef DEBUG_SIMSTEP
459  std::cout << SIMTIME << ": MSNet::simulationStep() called"
460  << ", myStep = " << myStep
461  << std::endl;
462 #endif
464  if (t != nullptr) {
465  if (myLogExecutionTime) {
467  }
469 #ifdef DEBUG_SIMSTEP
470  bool loadRequested = !TraCI::getLoadArgs().empty();
471  assert(t->getTargetTime() >= myStep || loadRequested || TraCIServer::wasClosed());
472 #endif
473  if (myLogExecutionTime) {
475  }
476  if (TraCIServer::wasClosed()) {
477  return;
478  }
479  }
480 #ifdef DEBUG_SIMSTEP
481  std::cout << SIMTIME << ": TraCI target time: " << t->getTargetTime() << std::endl;
482 #endif
483  // execute beginOfTimestepEvents
484  if (myLogExecutionTime) {
486  }
487  // simulation state output
488  std::vector<SUMOTime>::iterator timeIt = std::find(myStateDumpTimes.begin(), myStateDumpTimes.end(), myStep);
489  if (timeIt != myStateDumpTimes.end()) {
490  const int dist = (int)distance(myStateDumpTimes.begin(), timeIt);
492  }
493  if (myStateDumpPeriod > 0 && myStep % myStateDumpPeriod == 0) {
495  }
497 #ifdef HAVE_FOX
498  MSRoutingEngine::waitForAll();
499 #endif
502  }
503  // check whether the tls programs need to be switched
505 
509  } else {
510  // assure all lanes with vehicles are 'active'
512 
513  // compute safe velocities for all vehicles for the next few lanes
514  // also register ApproachingVehicleInformation for all links
516 
517  // register junction approaches based on planned velocities as basis for right-of-way decision
519 
520  // decide right-of-way and execute movements
524  }
525 
526  // vehicles may change lanes
528 
531  }
532  }
533  loadRoutes();
534 
535  // persons
536  if (myPersonControl != nullptr && myPersonControl->hasTransportables()) {
538  }
539  // containers
542  }
543  // insert vehicles
546 #ifdef HAVE_FOX
547  MSRoutingEngine::waitForAll();
548 #endif
551  //myEdges->patchActiveLanes(); // @note required to detect collisions on lanes that were empty before insertion. wasteful?
553  }
555 
556  // execute endOfTimestepEvents
558 
559  if (myLogExecutionTime) {
561  }
563  if (myLogExecutionTime) {
565  }
566  // update and write (if needed) detector values
567  writeOutput();
568 
569  if (myLogExecutionTime) {
572  }
573  myStep += DELTA_T;
574 }
575 
576 
579  if (TraCIServer::wasClosed()) {
581  }
582  if (TraCIServer::getInstance() != nullptr && !TraCIServer::getInstance()->getLoadArgs().empty()) {
583  return SIMSTATE_LOADING;
584  }
585  if ((stopTime < 0 || myStep > stopTime) && TraCIServer::getInstance() == nullptr && (stopTime > 0 || myStep > myEdgeDataEndTime)) {
587  && (myInserter->getPendingFlowCount() == 0)
588  && (myPersonControl == nullptr || !myPersonControl->hasNonWaiting())
589  && (myContainerControl == nullptr || !myContainerControl->hasNonWaiting())) {
590  if (myPersonControl) {
592  }
593  if (myContainerControl) {
595  }
598  }
599  }
600  if (stopTime >= 0 && myStep >= stopTime) {
602  }
605  }
606  if (myAmInterrupted) {
607  return SIMSTATE_INTERRUPTED;
608  }
609  return SIMSTATE_RUNNING;
610 }
611 
612 
613 std::string
615  switch (state) {
617  return "";
619  return "The final simulation step has been reached.";
621  return "All vehicles have left the simulation.";
623  return "TraCI requested termination.";
625  return "An error occurred (see log).";
627  return "Interrupted.";
629  return "Too many teleports.";
631  return "TraCI issued load command.";
632  default:
633  return "Unknown reason.";
634  }
635 }
636 
637 
638 void
640  // clear container
641  MSEdge::clear();
642  MSLane::clear();
643  MSRoute::clear();
655  if (t != nullptr) {
656  t->cleanup();
657  }
660 }
661 
662 
663 void
665  // update detector values
667  const OptionsCont& oc = OptionsCont::getOptions();
668 
669  // check state dumps
670  if (oc.isSet("netstate-dump")) {
672  oc.getInt("netstate-dump.precision"));
673  }
674 
675  // check fcd dumps
676  if (OptionsCont::getOptions().isSet("fcd-output")) {
678  }
679 
680  // check emission dumps
681  if (OptionsCont::getOptions().isSet("emission-output")) {
683  oc.getInt("emission-output.precision"));
684  }
685 
686  // battery dumps
687  if (OptionsCont::getOptions().isSet("battery-output")) {
689  oc.getInt("battery-output.precision"));
690  }
691 
692  // check full dumps
693  if (OptionsCont::getOptions().isSet("full-output")) {
695  }
696 
697  // check queue dumps
698  if (OptionsCont::getOptions().isSet("queue-output")) {
700  }
701 
702  // check amitran dumps
703  if (OptionsCont::getOptions().isSet("amitran-output")) {
705  }
706 
707  // check vtk dumps
708  if (OptionsCont::getOptions().isSet("vtk-output")) {
709 
710  if (MSNet::getInstance()->getVehicleControl().getRunningVehicleNo() > 0) {
711  std::string timestep = time2string(myStep);
712  timestep = timestep.substr(0, timestep.length() - 3);
713  std::string output = OptionsCont::getOptions().getString("vtk-output");
714  std::string filename = output + "_" + timestep + ".vtp";
715 
716  OutputDevice_File dev = OutputDevice_File(filename, false);
717 
718  //build a huge mass of xml files
720 
721  }
722 
723  }
724 
725  // summary output
726  if (OptionsCont::getOptions().isSet("summary-output")) {
727  OutputDevice& od = OutputDevice::getDeviceByOption("summary-output");
728  int departedVehiclesNumber = myVehicleControl->getDepartedVehicleNo();
729  const double meanWaitingTime = departedVehiclesNumber != 0 ? myVehicleControl->getTotalDepartureDelay() / (double) departedVehiclesNumber : -1.;
730  int endedVehicleNumber = myVehicleControl->getEndedVehicleNo();
731  const double meanTravelTime = endedVehicleNumber != 0 ? myVehicleControl->getTotalTravelTime() / (double) endedVehicleNumber : -1.;
732  od.openTag("step");
733  od.writeAttr("time", time2string(myStep));
737  od.writeAttr("waiting", myInserter->getWaitingVehicleNo());
740  od.writeAttr("collisions", myVehicleControl->getCollisionCount());
741  od.writeAttr("teleports", myVehicleControl->getTeleportCount());
743  od.writeAttr("meanWaitingTime", meanWaitingTime);
744  od.writeAttr("meanTravelTime", meanTravelTime);
745  std::pair<double, double> meanSpeed = myVehicleControl->getVehicleMeanSpeeds();
746  od.writeAttr("meanSpeed", meanSpeed.first);
747  od.writeAttr("meanSpeedRelative", meanSpeed.second);
748  if (myLogExecutionTime) {
749  od.writeAttr("duration", mySimStepDuration);
750  }
751  od.closeTag();
752  }
753 
754  // write detector values
756 
757  // write link states
758  if (OptionsCont::getOptions().isSet("link-output")) {
759  OutputDevice& od = OutputDevice::getDeviceByOption("link-output");
760  od.openTag("timestep");
762  const MSEdgeVector& edges = myEdges->getEdges();
763  for (MSEdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) {
764  const std::vector<MSLane*>& lanes = (*i)->getLanes();
765  for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
766  const std::vector<MSLink*>& links = (*j)->getLinkCont();
767  for (std::vector<MSLink*>::const_iterator k = links.begin(); k != links.end(); ++k) {
768  (*k)->writeApproaching(od, (*j)->getID());
769  }
770  }
771  }
772  od.closeTag();
773  }
774 
775  // write SSM output
776  for (std::set<MSDevice_SSM*>::iterator di = MSDevice_SSM::getInstances().begin(); di != MSDevice_SSM::getInstances().end(); ++di) {
777  MSDevice_SSM* dev = (*di);
778  dev->updateAndWriteOutput();
779  }
780 
781  // write ToC output
782  for (std::set<MSDevice_ToC*>::iterator di = MSDevice_ToC::getInstances().begin(); di != MSDevice_ToC::getInstances().end(); ++di) {
783  MSDevice_ToC* dev = (*di);
784  if (dev->generatesOutput()) {
785  dev->writeOutput();
786  }
787  }
788 }
789 
790 
791 bool
793  return myLogExecutionTime;
794 }
795 
796 
799  if (myPersonControl == nullptr) {
801  }
802  return *myPersonControl;
803 }
804 
807  if (myContainerControl == nullptr) {
809  }
810  return *myContainerControl;
811 }
812 
815  myDynamicShapeUpdater = std::unique_ptr<MSDynamicShapeUpdater> (new MSDynamicShapeUpdater(MSNet::getInstance()->getShapeContainer()));
816  return myDynamicShapeUpdater.get();
817 }
818 
821  if (myEdgeWeights == nullptr) {
823  }
824  return *myEdgeWeights;
825 }
826 
827 
828 void
830  std::cout << "Step #" << time2string(myStep);
831 }
832 
833 
834 void
836  if (myLogExecutionTime) {
837  std::ostringstream oss;
838  oss.setf(std::ios::fixed, std::ios::floatfield); // use decimal format
839  oss.setf(std::ios::showpoint); // print decimal point
840  oss << std::setprecision(gPrecision);
841  if (mySimStepDuration != 0) {
842  const double durationSec = (double)mySimStepDuration / 1000.;
843  oss << " (" << mySimStepDuration << "ms ~= "
844  << (TS / durationSec) << "*RT, ~"
845  << ((double) myVehicleControl->getRunningVehicleNo() / durationSec);
846  } else {
847  oss << " (0ms ?*RT. ?";
848  }
849  oss << "UPS, ";
850  if (TraCIServer::getInstance() != nullptr) {
851  oss << "TraCI: " << myTraCIStepDuration << "ms, ";
852  }
853  oss << "vehicles TOT " << myVehicleControl->getDepartedVehicleNo()
854  << " ACT " << myVehicleControl->getRunningVehicleNo()
855  << " BUF " << myInserter->getWaitingVehicleNo()
856  << ") ";
857  std::string prev = "Step #" + time2string(myStep - DELTA_T);
858  std::cout << oss.str().substr(0, 90 - prev.length());
859  }
860  std::cout << '\r';
861 }
862 
863 
864 void
866  if (find(myVehicleStateListeners.begin(), myVehicleStateListeners.end(), listener) == myVehicleStateListeners.end()) {
867  myVehicleStateListeners.push_back(listener);
868  }
869 }
870 
871 
872 void
874  std::vector<VehicleStateListener*>::iterator i = std::find(myVehicleStateListeners.begin(), myVehicleStateListeners.end(), listener);
875  if (i != myVehicleStateListeners.end()) {
876  myVehicleStateListeners.erase(i);
877  }
878 }
879 
880 
881 void
882 MSNet::informVehicleStateListener(const SUMOVehicle* const vehicle, VehicleState to, const std::string& info) {
883 #ifdef HAVE_FOX
884  FXConditionalLock lock(myStateListenerMutex, MSRoutingEngine::isParallel());
885 #endif
886  for (std::vector<VehicleStateListener*>::iterator i = myVehicleStateListeners.begin(); i != myVehicleStateListeners.end(); ++i) {
887  (*i)->vehicleStateChanged(vehicle, to, info);
888  }
889 }
890 
891 
892 bool
894  return myStoppingPlaces[category == SUMO_TAG_TRAIN_STOP ? SUMO_TAG_BUS_STOP : category].add(stop->getID(), stop);
895 }
896 
897 
899 MSNet::getStoppingPlace(const std::string& id, const SumoXMLTag category) const {
900  if (myStoppingPlaces.count(category) > 0) {
901  return myStoppingPlaces.find(category)->second.get(id);
902  }
903  return nullptr;
904 }
905 
906 
907 std::string
908 MSNet::getStoppingPlaceID(const MSLane* lane, const double pos, const SumoXMLTag category) const {
909  if (myStoppingPlaces.count(category) > 0) {
910  for (const auto& it : myStoppingPlaces.find(category)->second) {
911  MSStoppingPlace* stop = it.second;
912  if (&stop->getLane() == lane && stop->getBeginLanePosition() - POSITION_EPS <= pos && stop->getEndLanePosition() + POSITION_EPS >= pos) {
913  return stop->getID();
914  }
915  }
916  }
917  return "";
918 }
919 
920 
923  auto it = myStoppingPlaces.find(category);
924  if (it != myStoppingPlaces.end()) {
925  return it->second;
926  } else {
927  throw ProcessError("No stoppingPlace of type '" + toString(category) + "' found");
928  }
929 }
930 
931 void
934  OutputDevice& output = OutputDevice::getDeviceByOption("chargingstations-output");
935  for (const auto& it : myStoppingPlaces.find(SUMO_TAG_CHARGING_STATION)->second) {
936  static_cast<MSChargingStation*>(it.second)->writeChargingStationOutput(output);
937  }
938  }
939 }
940 
941 void
943  OutputDevice& output = OutputDevice::getDeviceByOption("railsignal-block-output");
944  for (auto tls : myLogics->getAllLogics()) {
945  MSRailSignal* rs = dynamic_cast<MSRailSignal*>(tls);
946  if (rs != nullptr) {
947  rs->writeBlocks(output);
948  }
949  }
950 }
951 
952 
954 MSNet::getRouterTT(const MSEdgeVector& prohibited) const {
955  if (myRouterTT == nullptr) {
956  const std::string routingAlgorithm = OptionsCont::getOptions().getString("routing-algorithm");
957  if (routingAlgorithm == "dijkstra") {
960  } else {
961  if (routingAlgorithm != "astar") {
962  WRITE_WARNING("TraCI and Triggers cannot use routing algorithm '" + routingAlgorithm + "'. using 'astar' instead.");
963  }
966  }
967  }
968  dynamic_cast<SUMOAbstractRouterPermissions<MSEdge, SUMOVehicle>*>(myRouterTT)->prohibit(prohibited);
969  return *myRouterTT;
970 }
971 
972 
974 MSNet::getRouterEffort(const MSEdgeVector& prohibited) const {
975  if (myRouterEffort == nullptr) {
978  }
979  dynamic_cast<SUMOAbstractRouterPermissions<MSEdge, SUMOVehicle>*>(myRouterEffort)->prohibit(prohibited);
980  return *myRouterEffort;
981 }
982 
983 
985 MSNet::getPedestrianRouter(const MSEdgeVector& prohibited) const {
986  if (myPedestrianRouter == nullptr) {
988  }
989  myPedestrianRouter->prohibit(prohibited);
990  return *myPedestrianRouter;
991 }
992 
993 
995 MSNet::getIntermodalRouter(const int routingMode, const MSEdgeVector& prohibited) const {
996  if (myIntermodalRouter.count(routingMode) == 0) {
997  int carWalk = 0;
998  for (const std::string& opt : OptionsCont::getOptions().getStringVector("persontrip.transfer.car-walk")) {
999  if (opt == "parkingAreas") {
1001  } else if (opt == "ptStops") {
1003  } else if (opt == "allJunctions") {
1005  }
1006  }
1007  const std::string routingAlgorithm = OptionsCont::getOptions().getString("routing-algorithm");
1008  if (routingMode == libsumo::ROUTING_MODE_COMBINED) {
1009  myIntermodalRouter[routingMode] = new MSIntermodalRouter(MSNet::adaptIntermodalRouter, carWalk, routingAlgorithm, routingMode, new FareModul());
1010  } else {
1011  myIntermodalRouter[routingMode] = new MSIntermodalRouter(MSNet::adaptIntermodalRouter, carWalk, routingAlgorithm, routingMode);
1012  }
1013  }
1014  myIntermodalRouter[routingMode]->prohibit(prohibited);
1015  return *myIntermodalRouter[routingMode];
1016 }
1017 
1018 
1019 void
1021  // add access to all parking areas
1022  for (const auto& i : myInstance->myStoppingPlaces[SUMO_TAG_PARKING_AREA]) {
1023  const MSEdge* const edge = &i.second->getLane().getEdge();
1024  router.getNetwork()->addAccess(i.first, edge, i.second->getAccessPos(edge), i.second->getAccessDistance(edge), SUMO_TAG_PARKING_AREA);
1025  }
1026  EffortCalculator* const external = router.getExternalEffort();
1027  // add access to all public transport stops
1028  for (const auto& i : myInstance->myStoppingPlaces[SUMO_TAG_BUS_STOP]) {
1029  const MSEdge* const edge = &i.second->getLane().getEdge();
1030  router.getNetwork()->addAccess(i.first, edge, i.second->getAccessPos(edge),
1031  i.second->getAccessDistance(edge), SUMO_TAG_BUS_STOP);
1032  for (const auto& a : i.second->getAllAccessPos()) {
1033  router.getNetwork()->addAccess(i.first, &std::get<0>(a)->getEdge(), std::get<1>(a), std::get<2>(a), SUMO_TAG_BUS_STOP);
1034  }
1035  if (external != nullptr) {
1036  external->addStop(router.getNetwork()->getStopEdge(i.first)->getNumericalID(), *i.second);
1037  }
1038  }
1041 }
1042 
1043 
1044 bool
1046  const MSEdgeVector& edges = myEdges->getEdges();
1047  for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) {
1048  for (std::vector<MSLane*>::const_iterator i = (*e)->getLanes().begin(); i != (*e)->getLanes().end(); ++i) {
1049  if ((*i)->getShape().hasElevation()) {
1050  return true;
1051  }
1052  }
1053  }
1054  return false;
1055 }
1056 
1057 
1058 bool
1060  for (const MSEdge* e : myEdges->getEdges()) {
1061  if (e->getFunction() == EDGEFUNC_WALKINGAREA) {
1062  return true;
1063  }
1064  }
1065  return false;
1066 }
1067 
1068 
1069 bool
1071  for (const MSEdge* e : myEdges->getEdges()) {
1072  if (e->getBidiEdge() != nullptr) {
1073  return true;
1074  }
1075  }
1076  return false;
1077 }
1078 
1079 bool
1080 MSNet::warnOnce(const std::string& typeAndID) {
1081  if (myWarnedOnce.find(typeAndID) == myWarnedOnce.end()) {
1082  myWarnedOnce[typeAndID] = true;
1083  return true;
1084  }
1085  return false;
1086 }
1087 
1088 
1089 /****************************************************************************/
MSNet::myShapeContainer
ShapeContainer * myShapeContainer
A container for geometrical shapes;.
Definition: MSNet.h:736
MSNet::MSNet
MSNet(MSVehicleControl *vc, MSEventControl *beginOfTimestepEvents, MSEventControl *endOfTimestepEvents, MSEventControl *insertionEvents, ShapeContainer *shapeCont=0)
Constructor.
Definition: MSNet.cpp:190
SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
Definition: SUMOXMLDefinitions.h:100
MSStoppingPlace::getLane
const MSLane & getLane() const
Returns the lane this stop is located at.
Definition: MSStoppingPlace.cpp:58
MSVehicle::Influencer::cleanup
static void cleanup()
Static cleanup.
Definition: MSVehicle.cpp:382
OptionsCont::isSet
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
Definition: OptionsCont.cpp:136
MSFullExport::write
static void write(OutputDevice &of, SUMOTime timestep)
Dumping a hugh List of Parameters available in the Simulation.
Definition: MSFullExport.cpp:45
MSNet::hasInternalLinks
bool hasInternalLinks() const
return whether the network contains internal links
Definition: MSNet.h:642
MSEventControl
Stores time-dependant events and executes them at the proper time.
Definition: MSEventControl.h:50
MSNet::getEffort
static double getEffort(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the effort to pass an edge.
Definition: MSNet.cpp:137
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:134
OptionsCont::getInt
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
Definition: OptionsCont.cpp:216
MSNet::getStoppingPlace
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
Definition: MSNet.cpp:899
ToString.h
MSStoppingPlace
A lane area vehicles can halt at.
Definition: MSStoppingPlace.h:60
MSNet::myHasElevation
bool myHasElevation
Whether the network contains elevation data.
Definition: MSNet.h:790
MSStopOut.h
PedestrianRouter
Definition: MSNet.h:82
MSCModel_NonInteracting::cleanup
static void cleanup()
remove state at simulation end
Definition: MSCModel_NonInteracting.cpp:80
IntermodalNetwork::getStopEdge
_IntermodalEdge * getStopEdge(const std::string &stopId) const
Returns the associated stop edge.
Definition: IntermodalNetwork.h:432
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:239
MSVehicleControl::getDepartedVehicleNo
int getDepartedVehicleNo() const
Returns the number of inserted vehicles.
Definition: MSVehicleControl.h:266
MSVehicleControl::getTeleportsWrongLane
int getTeleportsWrongLane() const
return the number of teleports due to vehicles stuck on the wrong lane
Definition: MSVehicleControl.h:305
MSNet::preSimStepOutput
void preSimStepOutput() const
Prints the current step number.
Definition: MSNet.cpp:829
MSTLLogicControl.h
MSNet.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
MSNet::getRouterTT
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:954
MSDetectorControl.h
MSDevice_SSM
A device which collects info on the vehicle trip (mainly on departure and arrival)
Definition: MSDevice_SSM.h:57
MSNet::STAGE_INSERTIONS
static const std::string STAGE_INSERTIONS
Definition: MSNet.h:843
OutputDevice::closeAll
static void closeAll(bool keepErrorRetrievers=false)
Definition: OutputDevice.cpp:127
MSDevice_ToC::generatesOutput
bool generatesOutput()
Whether this device requested to write output.
Definition: MSDevice_ToC.h:186
MSNet::simulationStep
void simulationStep()
Performs a single simulation step.
Definition: MSNet.cpp:457
IntermodalNetwork::ALL_JUNCTIONS
junctions with edges allowing the additional mode
Definition: IntermodalNetwork.h:94
MSInsertionControl::emitVehicles
int emitVehicles(SUMOTime time)
Emits vehicles that want to depart at the given time.
Definition: MSInsertionControl.cpp:110
MSNet::myVehicleControl
MSVehicleControl * myVehicleControl
Controls vehicle building and deletion;.
Definition: MSNet.h:714
MSXMLRawOut::write
static void write(OutputDevice &of, const MSEdgeControl &ec, SUMOTime timestep, int precision)
Writes the complete network state of the given edges into the given device.
Definition: MSXMLRawOut.cpp:49
MSStoppingPlace::getEndLanePosition
double getEndLanePosition() const
Returns the end position of this stop.
Definition: MSStoppingPlace.cpp:70
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
MSNet::mySimStepDuration
long mySimStepDuration
Definition: MSNet.h:753
MSNet::cleanupStatic
static void cleanupStatic()
Place for static initializations of simulation components (called after successful net build)
Definition: MSNet.cpp:183
MSNet::removeVehicleStateListener
void removeVehicleStateListener(VehicleStateListener *listener)
Removes a vehicle states listener.
Definition: MSNet.cpp:873
MSNet::getRouterEffort
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterEffort(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:974
MSInsertionControl::getPendingFlowCount
int getPendingFlowCount() const
Returns the number of flows that are still active.
Definition: MSInsertionControl.cpp:266
DELTA_T
SUMOTime DELTA_T
Definition: SUMOTime.cpp:35
libsumo::Helper::cleanup
static void cleanup()
Definition: Helper.cpp:359
MSNet::getShapeContainer
ShapeContainer & getShapeContainer()
Returns the shapes container.
Definition: MSNet.h:460
SUMORouteLoaderControl::loadNext
void loadNext(SUMOTime step)
loads the next routes up to and including the given time step
Definition: SUMORouteLoaderControl.cpp:60
MSNet::myInstance
static MSNet * myInstance
Unique instance of MSNet.
Definition: MSNet.h:694
MSNet::writeOutput
void writeOutput()
Write netstate, summary and detector output.
Definition: MSNet.cpp:664
MSVehicleControl::getActiveVehicleCount
int getActiveVehicleCount() const
Returns the number of build vehicles that have not been removed or need to wait for a passenger or a ...
Definition: MSVehicleControl.h:284
OptionsCont.h
MSNet::simulationState
SimulationState simulationState(SUMOTime stopTime) const
Called after a simulation step, this method returns the current simulation state.
Definition: MSNet.cpp:578
IntermodalRouter
Definition: MSNet.h:80
MSCModel_NonInteracting.h
MSVehicleControl::getEmergencyStops
int getEmergencyStops() const
return the number of emergency stops
Definition: MSVehicleControl.h:313
MSNet::getContainerControl
virtual MSTransportableControl & getContainerControl()
Returns the container control.
Definition: MSNet.cpp:806
MSNet::informVehicleStateListener
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="")
Informs all added listeners about a vehicle's state change.
Definition: MSNet.cpp:882
MSJunctionLogic.h
MSNet::VehicleStateListener
Interface for objects listening to vehicle state changes.
Definition: MSNet.h:567
MSDetectorControl
Detectors container; responsible for string and output generation.
Definition: MSDetectorControl.h:53
MsgHandler.h
MSNet
The simulated network and simulation perfomer.
Definition: MSNet.h:92
MSCalibrator.h
MSNet::myEndOfTimestepEvents
MSEventControl * myEndOfTimestepEvents
Controls events executed at the end of a time step;.
Definition: MSNet.h:732
MSStoppingPlace::getBeginLanePosition
double getBeginLanePosition() const
Returns the begin position of this stop.
Definition: MSStoppingPlace.cpp:64
WrappingCommand.h
MSDevice_SSM::updateAndWriteOutput
void updateAndWriteOutput()
This is called once per time step in MSNet::writeOutput() and collects the surrounding vehicles,...
Definition: MSDevice_SSM.cpp:394
MSNet::myDynamicShapeUpdater
std::unique_ptr< MSDynamicShapeUpdater > myDynamicShapeUpdater
Updater for dynamic shapes that are tracking traffic objects (ensures removal of shape dynamics when ...
Definition: MSNet.h:836
MSVehicleControl::abortWaiting
void abortWaiting()
informes about all waiting vehicles (deletion in destructor)
Definition: MSVehicleControl.cpp:430
MSNet::getInsertionControl
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:390
MSNet::warnOnce
bool warnOnce(const std::string &typeAndID)
return whether a warning regarding the given object shall be issued
Definition: MSNet.cpp:1080
OptionsCont::getString
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Definition: OptionsCont.cpp:202
MSEmissionExport::write
static void write(OutputDevice &of, SUMOTime timestep, int precision)
Writes the complete network state of the given edges into the given device.
Definition: MSEmissionExport.cpp:41
MSNet::myMaxTeleports
int myMaxTeleports
Maximum number of teleports.
Definition: MSNet.h:703
MSNet::STAGE_LANECHANGE
static const std::string STAGE_LANECHANGE
Definition: MSNet.h:842
MSNet::myEdgeDataEndTime
SUMOTime myEdgeDataEndTime
end of loaded edgeData
Definition: MSNet.h:805
libsumo::ROUTING_MODE_COMBINED
TRACI_CONST int ROUTING_MODE_COMBINED
Definition: TraCIConstants.h:459
MSTLLogicControl::getAllLogics
std::vector< MSTrafficLightLogic * > getAllLogics() const
Returns a vector which contains all logics.
Definition: MSTLLogicControl.cpp:573
MSVehicleControl::getTeleportsJam
int getTeleportsJam() const
return the number of teleports due to jamming
Definition: MSVehicleControl.h:295
MSVehicle::Influencer::init
static void init()
Static initalization.
Definition: MSVehicle.cpp:377
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:61
MSNet::postSimStepOutput
void postSimStepOutput() const
Prints the statistics of the step at its end.
Definition: MSNet.cpp:835
GeoConvHelper.h
MSNet::MSIntermodalRouter
IntermodalRouter< MSEdge, MSLane, MSJunction, SUMOVehicle > MSIntermodalRouter
Definition: MSNet.h:117
ShapeContainer
Storage for geometrical objects.
Definition: ShapeContainer.h:50
IntermodalNetwork::PARKING_AREAS
parking areas
Definition: IntermodalNetwork.h:90
MSNet::myVersion
double myVersion
the network version
Definition: MSNet.h:802
OptionsCont::getBool
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
Definition: OptionsCont.cpp:223
MSNet::myStateDumpTimes
std::vector< SUMOTime > myStateDumpTimes
Times at which a state shall be written.
Definition: MSNet.h:768
MSFCDExport::write
static void write(OutputDevice &of, SUMOTime timestep, bool elevation)
Writes the position and the angle of each vehicle into the given device.
Definition: MSFCDExport.cpp:50
MSDevice_SSM::cleanup
static void cleanup()
Clean up remaining devices instances.
Definition: MSDevice_SSM.cpp:191
MSVehicleControl::getLoadedVehicleNo
int getLoadedVehicleNo() const
Returns the number of build vehicles.
Definition: MSVehicleControl.h:214
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:58
MSJunctionControl.h
MSGlobals::gUseMesoSim
static bool gUseMesoSim
Definition: MSGlobals.h:91
MSNet::clearAll
static void clearAll()
Clears all dictionaries.
Definition: MSNet.cpp:639
MSVehicleControl::getTeleportsYield
int getTeleportsYield() const
return the number of teleports due to vehicles stuck on a minor road
Definition: MSVehicleControl.h:300
MSChargingStation.h
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
MSNet::logSimulationDuration
bool logSimulationDuration() const
Returns whether duration shall be logged.
Definition: MSNet.cpp:792
MSDevice_SSM::getInstances
static const std::set< MSDevice_SSM *, ComparatorNumericalIdLess > & getInstances()
returns all currently existing SSM devices
Definition: MSDevice_SSM.cpp:186
MSEdge.h
MSNet::simulate
SimulationState simulate(SUMOTime start, SUMOTime stop)
Simulates from timestep start to stop.
Definition: MSNet.cpp:334
MSInsertionControl.h
MSInsertionControl::getWaitingVehicleNo
int getWaitingVehicleNo() const
Returns the number of waiting vehicles.
Definition: MSInsertionControl.cpp:260
MSNet::makeDynamicShapeUpdater
MSDynamicShapeUpdater * makeDynamicShapeUpdater()
Creates and returns a dynamic shapes updater.
Definition: MSNet.cpp:814
MSNet::getStoppingPlaceID
std::string getStoppingPlaceID(const MSLane *lane, const double pos, const SumoXMLTag category) const
Returns the stop of the given category close to the given position.
Definition: MSNet.cpp:908
MSDetectorControl::close
void close(SUMOTime step)
Closes the detector outputs.
Definition: MSDetectorControl.cpp:55
MSStateHandler::saveState
static void saveState(const std::string &file, SUMOTime step)
Saves the current state.
Definition: MSStateHandler.cpp:75
MSDynamicShapeUpdater
Definition: MSDynamicShapeUpdater.h:26
MSNet::closeSimulation
void closeSimulation(SUMOTime start)
Closes the simulation (all files, connections, etc.)
Definition: MSNet.cpp:436
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
MSQueueExport::write
static void write(OutputDevice &of, SUMOTime timestep)
Export the queueing length in front of a junction (very experimental!)
Definition: MSQueueExport.cpp:41
MSNet::myRouterTT
SUMOAbstractRouter< MSEdge, SUMOVehicle > * myRouterTT
Definition: MSNet.h:825
DijkstraRouter
Computes the shortest path through a network using the Dijkstra algorithm.
Definition: DijkstraRouter.h:63
MSEdgeControl::changeLanes
void changeLanes(const SUMOTime t)
Moves (precomputes) critical vehicles.
Definition: MSEdgeControl.cpp:217
MSNet::myStateDumpFiles
std::vector< std::string > myStateDumpFiles
The names for the state files.
Definition: MSNet.h:770
MSDynamicShapeUpdater.h
MSEdgeWeightsStorage
A storage for edge travel times and efforts.
Definition: MSEdgeWeightsStorage.h:44
MSFCDExport.h
MSGlobals::gLateralResolution
static double gLateralResolution
Definition: MSGlobals.h:85
SysUtils::getCurrentMillis
static long getCurrentMillis()
Returns the current time in milliseconds.
Definition: SysUtils.cpp:39
OutputDevice::closeTag
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Definition: OutputDevice.cpp:254
MSVehicleControl::getEndedVehicleNo
int getEndedVehicleNo() const
Returns the number of removed vehicles.
Definition: MSVehicleControl.h:236
MSTrigger::cleanup
static void cleanup()
properly deletes all trigger instances
Definition: MSTrigger.cpp:44
MSTransportableControl::hasNonWaiting
bool hasNonWaiting() const
checks whether any transportable is still engaged in walking / stopping
Definition: MSTransportableControl.cpp:244
MSNet::myLogExecutionTime
bool myLogExecutionTime
Information whether the simulation duration shall be logged.
Definition: MSNet.h:747
MSNet::writeChargingStationOutput
void writeChargingStationOutput() const
write charging station output
Definition: MSNet.cpp:932
MSVehicleTransfer::getInstance
static MSVehicleTransfer * getInstance()
Returns the instance of this object.
Definition: MSVehicleTransfer.cpp:182
MSNet::myVehiclesMoved
long long int myVehiclesMoved
The overall number of vehicle movements.
Definition: MSNet.h:759
MSTransportableControl
Definition: MSTransportableControl.h:52
MSVehicleControl::getRunningVehicleNo
int getRunningVehicleNo() const
Returns the number of build and inserted, but not yet deleted vehicles.
Definition: MSVehicleControl.h:258
MSNet::getRestrictions
const std::map< SUMOVehicleClass, double > * getRestrictions(const std::string &id) const
Returns the restrictions for an edge type If no restrictions are present, 0 is returned.
Definition: MSNet.cpp:324
MSTrafficLightLogic.h
MSDetectorControl::writeOutput
void writeOutput(SUMOTime step, bool closing)
Writes the output to be generated within the given time step.
Definition: MSDetectorControl.cpp:126
MSNet::SIMSTATE_NO_FURTHER_VEHICLES
The simulation does not contain further vehicles.
Definition: MSNet.h:105
TraCIServer::getLoadArgs
std::vector< std::string > & getLoadArgs()
Definition: TraCIServer.h:249
MSJunctionControl
Container for junctions; performs operations on all stored junctions.
Definition: MSJunctionControl.h:45
MSInsertionControl::adaptIntermodalRouter
void adaptIntermodalRouter(MSNet::MSIntermodalRouter &router) const
Definition: MSInsertionControl.cpp:325
MSDevice_ToC
The ToC Device controls transition of control between automated and manual driving.
Definition: MSDevice_ToC.h:55
MSNet::mySimBeginMillis
long mySimBeginMillis
The overall simulation duration.
Definition: MSNet.h:756
OutputDevice::writeAttr
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:256
MSNet::myAmInterrupted
bool myAmInterrupted
whether an interrupt occured
Definition: MSNet.h:706
MSVehicleControl::getArrivedVehicleNo
int getArrivedVehicleNo() const
Returns the number of arrived vehicles.
Definition: MSVehicleControl.h:243
MSNet::myStoppingPlaces
std::map< SumoXMLTag, NamedObjectCont< MSStoppingPlace * > > myStoppingPlaces
Dictionary of bus / container stops.
Definition: MSNet.h:808
MSEdgeWeightsStorage::retrieveExistingTravelTime
bool retrieveExistingTravelTime(const MSEdge *const e, const double t, double &value) const
Returns a travel time for an edge and time if stored.
Definition: MSEdgeWeightsStorage.cpp:40
MSNet::myLanesRTree
std::pair< bool, NamedRTree > myLanesRTree
An RTree structure holding lane IDs.
Definition: MSNet.h:831
MSNet::SimulationState
SimulationState
Possible states of a simulation - running or stopped with different reasons.
Definition: MSNet.h:97
Simulation.h
MELoop
The main mesocopic simulation loop.
Definition: MELoop.h:49
SIMTIME
#define SIMTIME
Definition: SUMOTime.h:64
MSStopOut::cleanup
static void cleanup()
Definition: MSStopOut.cpp:48
MSNet::getStoppingPlaces
const NamedObjectCont< MSStoppingPlace * > & getStoppingPlaces(SumoXMLTag category) const
Definition: MSNet.cpp:922
MSNet::SIMSTATE_END_STEP_REACHED
The final simulation step has been performed.
Definition: MSNet.h:103
NamedObjectCont
A map of named object pointers.
Definition: NamedObjectCont.h:44
MSGlobals::gCheck4Accidents
static bool gCheck4Accidents
Definition: MSGlobals.h:76
SUMO_TAG_CHARGING_STATION
A Charging Station.
Definition: SUMOXMLDefinitions.h:112
MSNet::myStep
SUMOTime myStep
Current time step.
Definition: MSNet.h:700
MSEdgeWeightsStorage.h
MSVehicleControl::adaptIntermodalRouter
void adaptIntermodalRouter(MSNet::MSIntermodalRouter &router) const
Definition: MSVehicleControl.cpp:497
SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle >
MSTransportableControl.h
MSNet::getWeightsStorage
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net's internal edge travel times/efforts container.
Definition: MSNet.cpp:820
SystemFrame.h
MSNet::VehicleState
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:536
MSJunction.h
PedestrianRouter.h
OutputDevice_File
An output device that encapsulates an ofstream.
Definition: OutputDevice_File.h:41
TS
#define TS
Definition: SUMOTime.h:44
MSNet::lefthand
bool lefthand() const
return whether the network was built for lefthand traffic
Definition: MSNet.h:662
SysUtils.h
EDGEFUNC_WALKINGAREA
Definition: SUMOXMLDefinitions.h:1079
AStarRouter.h
IntermodalEdge::getNumericalID
int getNumericalID() const
Definition: IntermodalEdge.h:64
MSNet::getCurrentTimeStep
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:284
MSNet::myTraCIStepDuration
long myTraCIStepDuration
The last simulation step duration.
Definition: MSNet.h:753
MSDevice_Vehroutes::generateOutputForUnfinished
static void generateOutputForUnfinished()
generate vehroute output for vehicles which are still in the network
Definition: MSDevice_Vehroutes.cpp:398
MSAmitranTrajectories.h
MSRailSignal
A signal for rails.
Definition: MSRailSignal.h:47
MSEdge::clear
static void clear()
Clears the dictionary.
Definition: MSEdge.cpp:843
MSNet::~MSNet
virtual ~MSNet()
Destructor.
Definition: MSNet.cpp:275
FXConditionalLock
A scoped lock which only triggers on condition.
Definition: FXConditionalLock.h:37
STEPS2TIME
#define STEPS2TIME(x)
Definition: SUMOTime.h:57
MSNet::SIMSTATE_ERROR_IN_SIM
An error occurred during the simulation step.
Definition: MSNet.h:109
MSInsertionControl
Inserts vehicles into the network when their departure time is reached.
Definition: MSInsertionControl.h:62
MSNet::myStateDumpPrefix
std::string myStateDumpPrefix
name components for periodic state
Definition: MSNet.h:774
MSTransportableControl::hasTransportables
bool hasTransportables() const
checks whether any transportable waits to finish her plan
Definition: MSTransportableControl.cpp:238
SUMO_TAG_PARKING_AREA
A parking area.
Definition: SUMOXMLDefinitions.h:108
MSRoute::clear
static void clear()
Clears the dictionary (delete all known routes, too)
Definition: MSRoute.cpp:170
MSEmissionExport.h
MSNet::myInserter
MSInsertionControl * myInserter
Controls vehicle insertion;.
Definition: MSNet.h:726
IntermodalNetwork::PT_STOPS
public transport stops and access
Definition: IntermodalNetwork.h:92
MSNet::myLogics
MSTLLogicControl * myLogics
Controls tls logics, realizes waiting on tls rules;.
Definition: MSNet.h:724
OutputDevice.h
MSRailSignal::writeBlocks
void writeBlocks(OutputDevice &od) const
write rail signal block output for all links and driveways
Definition: MSRailSignal.cpp:274
MSNet::addVehicleStateListener
void addVehicleStateListener(VehicleStateListener *listener)
Adds a vehicle states listener.
Definition: MSNet.cpp:865
MSLane::clear
static void clear()
Clears the dictionary.
Definition: MSLane.cpp:1878
ProcessError
Definition: UtilExceptions.h:40
MSNet::myWarnedOnce
std::map< std::string, bool > myWarnedOnce
container to record warnings that shall only be issued once
Definition: MSNet.h:819
MSNet::addStoppingPlace
bool addStoppingPlace(const SumoXMLTag category, MSStoppingPlace *stop)
Adds a stopping place.
Definition: MSNet.cpp:893
MSInsertionControl::determineCandidates
void determineCandidates(SUMOTime time)
Checks for all vehicles whether they can be emitted.
Definition: MSInsertionControl.cpp:196
MSDevice::cleanupAll
static void cleanupAll()
perform cleanup for all devices
Definition: MSDevice.cpp:119
time2string
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:65
MSTransportableControl::abortAnyWaitingForVehicle
void abortAnyWaitingForVehicle()
aborts the plan for any transportable that is still waiting for a ride
Definition: MSTransportableControl.cpp:256
MSNet::SIMSTATE_LOADING
The simulation is loading.
Definition: MSNet.h:99
EffortCalculator::addStop
virtual void addStop(const int stopEdge, const Parameterised &params)=0
MSGlobals.h
UtilExceptions.h
MSEdge::getMinimumTravelTime
double getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
Definition: MSEdge.h:419
MSNet::myJunctions
MSJunctionControl * myJunctions
Controls junctions, realizes right-of-way rules;.
Definition: MSNet.h:722
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:76
MSNet::loadRoutes
void loadRoutes()
loads routes for the next few steps
Definition: MSNet.cpp:375
MSNet::checkWalkingarea
bool checkWalkingarea()
check all lanes for type walkingArea
Definition: MSNet.cpp:1059
PedestrianRouter::prohibit
void prohibit(const std::vector< E * > &toProhibit)
Definition: PedestrianRouter.h:129
MSEdgeControl::detectCollisions
void detectCollisions(SUMOTime timestep, const std::string &stage)
Detect collisions.
Definition: MSEdgeControl.cpp:289
MSQueueExport.h
MSTrigger.h
MSEdgeWeightsStorage::retrieveExistingEffort
bool retrieveExistingEffort(const MSEdge *const e, const double t, double &value) const
Returns an effort for an edge and time if stored.
Definition: MSEdgeWeightsStorage.cpp:55
MSNet::myLogStepNumber
bool myLogStepNumber
Information whether the number of the simulation step shall be logged.
Definition: MSNet.h:750
MSDevice_BTsender.h
MSCalibrator::cleanup
static void cleanup()
cleanup remaining data structures
Definition: MSCalibrator.cpp:483
MSNet::myStateDumpPeriod
SUMOTime myStateDumpPeriod
The period for writing state.
Definition: MSNet.h:772
MSParkingArea.h
MSBatteryExport::write
static void write(OutputDevice &of, SUMOTime timestep, int precision)
Writes the complete network state of the given edges into the given device.
Definition: MSBatteryExport.cpp:42
MSRoutingEngine.h
TraCIServer::cleanup
void cleanup()
clean up subscriptions
Definition: TraCIServer.cpp:648
MSFullExport.h
TraCIServer::getTargetTime
SUMOTime getTargetTime() const
Definition: TraCIServer.h:67
MSNet::STAGE_MOVEMENTS
static const std::string STAGE_MOVEMENTS
Definition: MSNet.h:841
MSContainer.h
MSVTKExport::write
static void write(OutputDevice &of, SUMOTime timestep)
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.cpp:43
MSNet::myHasPedestrianNetwork
bool myHasPedestrianNetwork
Whether the network contains pedestrian network elements.
Definition: MSNet.h:793
MSDevice_BTsender::cleanup
static void cleanup()
removes remaining vehicleInformation in sVehicles
Definition: MSDevice_BTsender.cpp:64
TraCIServer::processCommandsUntilSimStep
void processCommandsUntilSimStep(SUMOTime step)
process all commands until the next SUMO simulation step. It is guaranteed that t->getTargetTime() >=...
Definition: TraCIServer.cpp:490
MSVehicleTransfer::checkInsertions
void checkInsertions(SUMOTime time)
Checks "movement" of stored vehicles.
Definition: MSVehicleTransfer.cpp:95
MSNet::SIMSTATE_CONNECTION_CLOSED
The connection to a client was closed by the client.
Definition: MSNet.h:107
string2time
SUMOTime string2time(const std::string &r)
Definition: SUMOTime.cpp:42
MSVehicleControl::getCollisionCount
int getCollisionCount() const
return the number of collisions
Definition: MSVehicleControl.h:290
MSNet::MSPedestrianRouter
PedestrianRouter< MSEdge, MSLane, MSJunction, MSVehicle > MSPedestrianRouter
Definition: MSNet.h:116
MSTransportableControl::getJammedNumber
int getJammedNumber() const
Returns the number of times a transportables was jammed.
Definition: MSTransportableControl.h:196
FareModul
Definition: FareModul.h:161
MSPerson.h
MSEdgeControl::setJunctionApproaches
void setJunctionApproaches(SUMOTime t)
Register junction approaches for all vehicles after velocities have been planned. This is a prerequis...
Definition: MSEdgeControl.cpp:142
MSNet::myVehicleStateListeners
std::vector< VehicleStateListener * > myVehicleStateListeners
Container for vehicle state listener.
Definition: MSNet.h:811
SUMOAbstractRouter< MSEdge, SUMOVehicle >
OutputDevice_File.h
libsumo::Helper::postProcessRemoteControl
static void postProcessRemoteControl()
Definition: Helper.cpp:801
MSNet::STAGE_EVENTS
static const std::string STAGE_EVENTS
string constants for simstep stages
Definition: MSNet.h:840
MSVTKExport.h
MSNet::myHasBidiEdges
bool myHasBidiEdges
Whether the network contains bidirectional rail edges.
Definition: MSNet.h:796
MSEdgeControl.h
MSNet::myRestrictions
std::map< std::string, std::map< SUMOVehicleClass, double > > myRestrictions
The vehicle class specific speed restrictions.
Definition: MSNet.h:784
OutputDevice::openTag
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definition: OutputDevice.cpp:240
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
MSDevice_Tripinfo::generateOutputForUnfinished
static void generateOutputForUnfinished()
generate output for vehicles which are still in the network
Definition: MSDevice_Tripinfo.cpp:277
SUMO_TAG_BUS_STOP
A bus stop.
Definition: SUMOXMLDefinitions.h:98
MSVehicle::getWeightsStorage
const MSEdgeWeightsStorage & getWeightsStorage() const
Returns the vehicle's internal edge travel times/efforts container.
Definition: MSVehicle.cpp:1196
MSVehicleControl::getHaltingVehicleNo
virtual int getHaltingVehicleNo() const
Returns the number of halting vehicles.
Definition: MSVehicleControl.cpp:438
MSNet::myStateDumpSuffix
std::string myStateDumpSuffix
Definition: MSNet.h:775
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:168
MSNet::getPersonControl
virtual MSTransportableControl & getPersonControl()
Returns the person control.
Definition: MSNet.cpp:798
MSGlobals::gMesoNet
static MELoop * gMesoNet
mesoscopic simulation infrastructure
Definition: MSGlobals.h:106
MSPModel::cleanup
static void cleanup()
remove state at simulation end
Definition: MSPModel.cpp:82
MSXMLRawOut.h
MSNet::SIMSTATE_RUNNING
The simulation is running.
Definition: MSNet.h:101
MSStateHandler.h
MSDevice_Tripinfo::printStatistics
static std::string printStatistics()
get statistics for printing to stdout
Definition: MSDevice_Tripinfo.cpp:348
MSVehicleControl::removePending
void removePending()
Removes a vehicle after it has ended.
Definition: MSVehicleControl.cpp:130
SUMORouteLoaderControl.h
MSNet::getIntermodalRouter
MSIntermodalRouter & getIntermodalRouter(const int routingMode=0, const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:995
MSTransportableControl::checkWaiting
void checkWaiting(MSNet *net, const SUMOTime time)
checks whether any transportables waiting time is over
Definition: MSTransportableControl.cpp:118
MSEdgeVector
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:72
MSRoute.h
MSTransportableControl::getRunningNumber
int getRunningNumber() const
Returns the number of build and inserted, but not yet deleted transportables.
Definition: MSTransportableControl.h:189
MSNet::myLefthand
bool myLefthand
Whether the network was built for left-hand traffic.
Definition: MSNet.h:799
MSNet::myContainerControl
MSTransportableControl * myContainerControl
Controls container building and deletion;.
Definition: MSNet.h:718
MSNet::writeRailSignalBlocks
void writeRailSignalBlocks() const
write rail signal block output
Definition: MSNet.cpp:942
MSPModel.h
AStarRouter
Computes the shortest path through a network using the A* algorithm.
Definition: AStarRouter.h:78
MSNet::myPedestrianRouter
MSPedestrianRouter * myPedestrianRouter
Definition: MSNet.h:827
joinToString
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:247
EffortCalculator
the effort calculator interface
Definition: EffortCalculator.h:33
OptionsIO::setArgs
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
Definition: OptionsIO.cpp:55
MSNet::myRouteLoaders
SUMORouteLoaderControl * myRouteLoaders
Route loader for dynamic loading of routes.
Definition: MSNet.h:697
MSDevice_Vehroutes.h
TraCIServer.h
MSEventControl::execute
virtual void execute(SUMOTime time)
Executes time-dependant commands.
Definition: MSEventControl.cpp:59
MSNet::generateStatistics
const std::string generateStatistics(SUMOTime start)
Writes performance output and running vehicle stats.
Definition: MSNet.cpp:381
MSVehicleControl::getTotalTravelTime
double getTotalTravelTime() const
Returns the total travel time.
Definition: MSVehicleControl.h:328
MSBatteryExport.h
MSFrame.h
MSVehicleControl::getVehicleMeanSpeeds
virtual std::pair< double, double > getVehicleMeanSpeeds() const
get current absolute and relative mean vehicle speed in the network
Definition: MSVehicleControl.cpp:452
MSDevice_SSM.h
MSNet::initStatic
static void initStatic()
Place for static initializations of simulation components (called after successful net build)
Definition: MSNet.cpp:176
config.h
MSVehicleControl
The class responsible for building and deletion of vehicles.
Definition: MSVehicleControl.h:72
MSEdgeControl
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:73
MSNet::myDetectorControl
MSDetectorControl * myDetectorControl
Controls detectors;.
Definition: MSNet.h:728
ShapeContainer.h
MSDevice_Tripinfo.h
MSTransportableControl::getLoadedNumber
int getLoadedNumber() const
Returns the number of build transportables.
Definition: MSTransportableControl.h:181
MSVehicleControl::getTotalDepartureDelay
double getTotalDepartureDelay() const
Returns the total departure delay.
Definition: MSVehicleControl.h:320
TraCIServer::getInstance
static TraCIServer * getInstance()
Definition: TraCIServer.h:71
DijkstraRouter.h
IntermodalNetwork::addAccess
void addAccess(const std::string &stopId, const E *stopEdge, const double pos, const double length, const SumoXMLTag category)
Adds access edges for stopping places to the intermodal network.
Definition: IntermodalNetwork.h:453
gPrecision
int gPrecision
the precision for floating point outputs
Definition: StdDefs.cpp:27
MSTLLogicControl
A class that stores and controls tls and switching of their programs.
Definition: MSTLLogicControl.h:60
MELoop.h
MSNet::myEdgeWeights
MSEdgeWeightsStorage * myEdgeWeights
The net's knowledge about edge efforts/travel times;.
Definition: MSNet.h:738
FareModul.h
MSNet::checkBidiEdges
bool checkBidiEdges()
check wether bidirectional edges occur in the network
Definition: MSNet.cpp:1070
MSEdgeControl::executeMovements
void executeMovements(SUMOTime t)
Executes planned vehicle movements with regards to right-of-way.
Definition: MSEdgeControl.cpp:150
MSEdgeControl::planMovements
void planMovements(SUMOTime t)
Compute safe velocities for all vehicles based on positions and speeds from the last time step....
Definition: MSEdgeControl.cpp:95
TraCIServer::wasClosed
static bool wasClosed()
check whether close was requested
Definition: TraCIServer.cpp:313
MSNet::addRestriction
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction for an edge type.
Definition: MSNet.cpp:318
TraCIServer
TraCI server used to control sumo by a remote TraCI client.
Definition: TraCIServer.h:62
MSNet::myIntermodalRouter
std::map< int, MSIntermodalRouter * > myIntermodalRouter
Definition: MSNet.h:828
MSEventControl.h
MSLane.h
MSNet::closeBuilding
void closeBuilding(const OptionsCont &oc, MSEdgeControl *edges, MSJunctionControl *junctions, SUMORouteLoaderControl *routeLoaders, MSTLLogicControl *tlc, std::vector< SUMOTime > stateDumpTimes, std::vector< std::string > stateDumpFiles, bool hasInternalLinks, bool hasNeighs, bool lefthand, double version)
Closes the network's building process.
Definition: MSNet.cpp:241
MSNet::myRouterEffort
SUMOAbstractRouter< MSEdge, SUMOVehicle > * myRouterEffort
Definition: MSNet.h:826
MSVehicleControl::getTeleportCount
int getTeleportCount() const
return the number of teleports (including collisions)
Definition: MSVehicleControl.cpp:491
MSNet::myInsertionEvents
MSEventControl * myInsertionEvents
Controls insertion events;.
Definition: MSNet.h:734
MSNet::getStateMessage
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
Definition: MSNet.cpp:614
MSNet::SIMSTATE_INTERRUPTED
An external interrupt occured.
Definition: MSNet.h:111
MSEdgeControl::patchActiveLanes
void patchActiveLanes()
Resets information whether a lane is active for all lanes.
Definition: MSEdgeControl.cpp:76
IntermodalRouter::getNetwork
Network * getNetwork() const
Definition: IntermodalRouter.h:235
MSTLLogicControl::check2Switch
void check2Switch(SUMOTime step)
Checks whether any WAUT is trying to switch a tls into another program.
Definition: MSTLLogicControl.cpp:819
MSNet::adaptIntermodalRouter
static void adaptIntermodalRouter(MSIntermodalRouter &router)
Definition: MSNet.cpp:1020
MSNet::myHasInternalLinks
bool myHasInternalLinks
Whether the network contains internal links/lanes/edges.
Definition: MSNet.h:787
SUMORouteLoaderControl
Definition: SUMORouteLoaderControl.h:50
VERSION_STRING
#define VERSION_STRING
Definition: config.h:207
MSEdge::getAllEdges
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Definition: MSEdge.cpp:837
MSStoppingPlace.h
MSDevice_ToC::writeOutput
void writeOutput()
Write output to file given by option device.toc.file.
Definition: MSDevice_ToC.cpp:1017
MELoop::simulate
void simulate(SUMOTime tMax)
Perform simulation up to the given time.
Definition: MELoop.cpp:63
IntermodalRouter::getExternalEffort
EffortCalculator * getExternalEffort() const
Definition: IntermodalRouter.h:239
MSNet::checkElevation
bool checkElevation()
check all lanes for elevation data
Definition: MSNet.cpp:1045
MSVehicleControl.h
MSNet::SIMSTATE_TOO_MANY_TELEPORTS
The simulation had too many teleports.
Definition: MSNet.h:113
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:77
POSITION_EPS
#define POSITION_EPS
Definition: config.h:169
MSNet::getTravelTime
static double getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the travel time to pass an edge.
Definition: MSNet.cpp:151
MSVehicleTransfer.h
MSNet::myEdges
MSEdgeControl * myEdges
Controls edges, performs vehicle movement;.
Definition: MSNet.h:720
MSAmitranTrajectories::write
static void write(OutputDevice &of, const SUMOTime timestep)
Writes the complete network state into the given device.
Definition: MSAmitranTrajectories.cpp:45
OutputDevice::getDeviceByOption
static OutputDevice & getDeviceByOption(const std::string &name)
Returns the device described by the option.
Definition: OutputDevice.cpp:117
WRITE_MESSAGE
#define WRITE_MESSAGE(msg)
Definition: MsgHandler.h:240
OptionsCont::getStringVector
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String)
Definition: OptionsCont.cpp:921
MSNet::getVehicleControl
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:337
MSNet::myPersonControl
MSTransportableControl * myPersonControl
Controls person building and deletion;.
Definition: MSNet.h:716
MSDevice_ToC.h
MSEdgeControl::getEdges
const MSEdgeVector & getEdges() const
Returns loaded edges.
Definition: MSEdgeControl.h:168
MSDetectorControl::updateDetectors
void updateDetectors(const SUMOTime step)
Computes detector values.
Definition: MSDetectorControl.cpp:113
OptionsIO.h
IntermodalRouter.h
MSDevice_ToC::getInstances
static const std::set< MSDevice_ToC *, ComparatorNumericalIdLess > & getInstances()
returns all currently existing ToC devices
Definition: MSDevice_ToC.h:94
MSDevice_ToC::cleanup
static void cleanup()
Closes root tags of output files.
Definition: MSDevice_ToC.cpp:1033
MSNet::getPedestrianRouter
MSPedestrianRouter & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:985
XMLSubSys.h
MSNet::myBeginOfTimestepEvents
MSEventControl * myBeginOfTimestepEvents
Controls events executed at the begin of a time step;.
Definition: MSNet.h:730
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
MSRailSignal.h