Eclipse SUMO - Simulation of Urban MObility
MSRouteProbe.h
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 /****************************************************************************/
17 // Writes route distributions at a certain edge
18 /****************************************************************************/
19 #ifndef MSRouteProbe_h
20 #define MSRouteProbe_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 class MSEdge;
38 class MSRoute;
39 class MSVehicle;
40 class OutputDevice;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
62 public:
70  MSRouteProbe(const std::string& id, const MSEdge* edge,
71  const std::string& distID, const std::string& lastID,
72  const std::string& vTypes);
73 
74 
76  virtual ~MSRouteProbe();
77 
78 
81 
93  bool notifyEnter(SUMOTrafficObject& veh, MSMoveReminder::Notification reason, const MSLane* enteredLane = 0);
95 
96 
99 
113  void writeXMLOutput(OutputDevice& dev,
114  SUMOTime startTime, SUMOTime stopTime);
115 
116 
124  void writeXMLDetectorProlog(OutputDevice& dev) const;
126 
127  const MSRoute* getRoute() const;
128 
129 private:
131  std::pair<std::string, RandomDistributor<const MSRoute*>*> myLastRouteDistribution;
132 
134  std::pair<std::string, RandomDistributor<const MSRoute*>*> myCurrentRouteDistribution;
135 
136 
137 private:
139  MSRouteProbe(const MSRouteProbe&);
140 
143 
144 
145 };
146 
147 #endif
148 
149 /****************************************************************************/
150 
MSRouteProbe::operator=
MSRouteProbe & operator=(const MSRouteProbe &)
Invalidated assignment operator.
SUMOTrafficObject
Representation of a vehicle or person.
Definition: SUMOTrafficObject.h:48
MSDetectorFileOutput
Base of value-generating classes (detectors)
Definition: MSDetectorFileOutput.h:64
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
MSRouteProbe::writeXMLOutput
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Writes values into the given stream.
Definition: MSRouteProbe.cpp:88
MSRouteProbe
Writes routes of vehicles passing a certain edge.
Definition: MSRouteProbe.h:61
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
MSRouteProbe::writeXMLDetectorProlog
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
Definition: MSRouteProbe.cpp:119
MSDetectorFileOutput.h
MSRoute
Definition: MSRoute.h:67
MSMoveReminder
Something on a lane to be noticed about vehicle movement.
Definition: MSMoveReminder.h:64
MSRouteProbe::myCurrentRouteDistribution
std::pair< std::string, RandomDistributor< const MSRoute * > * > myCurrentRouteDistribution
The current distribution of routes (probability->route)
Definition: MSRouteProbe.h:134
MSMoveReminder.h
RandomDistributor.h
MSRouteProbe::myLastRouteDistribution
std::pair< std::string, RandomDistributor< const MSRoute * > * > myLastRouteDistribution
The previous distribution of routes (probability->route)
Definition: MSRouteProbe.h:131
MSRouteProbe::MSRouteProbe
MSRouteProbe(const std::string &id, const MSEdge *edge, const std::string &distID, const std::string &lastID, const std::string &vTypes)
Constructor.
Definition: MSRouteProbe.cpp:43
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:76
MSRouteProbe::getRoute
const MSRoute * getRoute() const
Definition: MSRouteProbe.cpp:125
MSRouteProbe::~MSRouteProbe
virtual ~MSRouteProbe()
Destructor.
Definition: MSRouteProbe.cpp:66
MSRouteProbe::notifyEnter
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Returns whether the vehicle shall be aware of this entry.
Definition: MSRouteProbe.cpp:71
config.h
MSMoveReminder::Notification
Notification
Definition of a vehicle state.
Definition: MSMoveReminder.h:89
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80