SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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-sim.org/
12 // Copyright (C) 2001-2013 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 
80 
82  virtual ~MSRouteProbe();
83 
84 
87 
101 
102 
105 
119  void writeXMLOutput(OutputDevice& dev,
120  SUMOTime startTime, SUMOTime stopTime);
121 
122 
130  void writeXMLDetectorProlog(OutputDevice& dev) const;
132 
133  const MSRoute* getRoute() const;
134 
135 private:
137  std::pair<std::string, RandomDistributor<const MSRoute*>*> myLastRouteDistribution;
138 
140  std::pair<std::string, RandomDistributor<const MSRoute*>*> myCurrentRouteDistribution;
141 
142 
143 private:
145  MSRouteProbe(const MSRouteProbe&);
146 
149 
150 
151 };
152 
153 #endif
154 
155 /****************************************************************************/
156 
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:77
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-&gt;route)
Definition: MSRouteProbe.h:137
virtual ~MSRouteProbe()
Destructor.
A road/street connecting two junctions.
Definition: MSEdge.h:73
Representation of a vehicle.
Definition: SUMOVehicle.h:63
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using &quot;detector&quot; as root element.
std::pair< std::string, RandomDistributor< const MSRoute * > * > myCurrentRouteDistribution
The current distribution of routes (probability-&gt;route)
Definition: MSRouteProbe.h:140
MSRouteProbe(const std::string &id, const MSEdge *edge, const std::string &distID, const std::string &lastID)
Constructor.
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:70
Base of value-generating classes (detectors)