SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSRouteProbe.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Writes route distributions at a certain edge
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef MSRouteProbe_h
23 #define MSRouteProbe_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <string>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class MSEdge;
45 class MSRoute;
46 class MSVehicle;
47 class OutputDevice;
48 
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
69 public:
77  MSRouteProbe(const std::string& id, const MSEdge* edge,
78  const std::string& distID, const std::string& lastID,
79  const std::string& vTypes);
80 
81 
83  virtual ~MSRouteProbe();
84 
85 
88 
102 
103 
106 
120  void writeXMLOutput(OutputDevice& dev,
121  SUMOTime startTime, SUMOTime stopTime);
122 
123 
131  void writeXMLDetectorProlog(OutputDevice& dev) const;
133 
134  const MSRoute* getRoute() const;
135 
136 private:
138  std::pair<std::string, RandomDistributor<const MSRoute*>*> myLastRouteDistribution;
139 
141  std::pair<std::string, RandomDistributor<const MSRoute*>*> myCurrentRouteDistribution;
142 
143 
144 private:
146  MSRouteProbe(const MSRouteProbe&);
147 
150 
151 
152 };
153 
154 #endif
155 
156 /****************************************************************************/
157 
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:82
long long int SUMOTime
Definition: SUMOTime.h:43
Writes routes of vehicles passing a certain edge.
Definition: MSRouteProbe.h:68
Notification
Definition of a vehicle state.
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Writes values into the given stream.
std::pair< std::string, RandomDistributor< const MSRoute * > * > myLastRouteDistribution
The previous distribution of routes (probability->route)
Definition: MSRouteProbe.h:138
virtual ~MSRouteProbe()
Destructor.
A road/street connecting two junctions.
Definition: MSEdge.h:80
Representation of a vehicle.
Definition: SUMOVehicle.h:66
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
std::pair< std::string, RandomDistributor< const MSRoute * > * > myCurrentRouteDistribution
The current distribution of routes (probability->route)
Definition: MSRouteProbe.h:141
MSRouteProbe & operator=(const MSRouteProbe &)
Invalidated assignment operator.
Something on a lane to be noticed about vehicle movement.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Returns whether the vehicle shall be aware of this entry.
const MSRoute * getRoute() const
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
MSRouteProbe(const std::string &id, const MSEdge *edge, const std::string &distID, const std::string &lastID, const std::string &vTypes)
Constructor.
Base of value-generating classes (detectors)