Eclipse SUMO - Simulation of Urban MObility
MEInductLoop.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 /****************************************************************************/
14 // An induction loop for mesoscopic simulation
15 /****************************************************************************/
16 #ifndef MEInductLoop_h
17 #define MEInductLoop_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <string>
26 #include <deque>
27 #include <map>
28 #include <functional>
32 #include <utils/common/Named.h>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class MESegment;
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
48 public:
49  MEInductLoop(const std::string& id,
50  MESegment* s,
51  double positionInMeters,
52  const std::string& vTypes);
53 
54 
55  ~MEInductLoop();
56 
69  dev.writeXMLHeader("detector", "det_e1meso_file.xsd");
70  }
71 
72 
85  void writeXMLOutput(OutputDevice& dev,
86  SUMOTime startTime, SUMOTime stopTime);
88 
89 protected:
92 
94  const double myPosition;
95 
98 
99 private:
100 
103 
106 
109 };
110 
111 #endif
112 
113 /****************************************************************************/
114 
MSDetectorFileOutput
Base of value-generating classes (detectors)
Definition: MSDetectorFileOutput.h:63
MESegment
A single mesoscopic segment (cell)
Definition: MESegment.h:49
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
MSMeanData_Net::MSLaneMeanDataValues
Data structure for mean (aggregated) edge/lane values.
Definition: MSMeanData_Net.h:66
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
MEInductLoop
An induction loop for mesoscopic simulation.
Definition: MEInductLoop.h:47
MEInductLoop::myMeanData
MSMeanData_Net::MSLaneMeanDataValues myMeanData
data collector for the loop
Definition: MEInductLoop.h:97
MSDetectorFileOutput.h
MSMeanData_Net.h
MEInductLoop::~MEInductLoop
~MEInductLoop()
Definition: MEInductLoop.cpp:53
MEInductLoop::mySegment
MESegment *const mySegment
mesoscopic edge segment the loop lies on
Definition: MEInductLoop.h:91
MEInductLoop::MEInductLoop
MEInductLoop()
Hidden default constructor.
MEInductLoop::writeXMLOutput
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
Definition: MEInductLoop.cpp:57
MEInductLoop::operator=
MEInductLoop & operator=(const MEInductLoop &)
Hidden assignment operator.
Named.h
MEInductLoop::myPosition
const double myPosition
position from the start of the edge / lane
Definition: MEInductLoop.h:94
OutputDevice.h
MEInductLoop::writeXMLDetectorProlog
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
Definition: MEInductLoop.h:68
MEInductLoop::MEInductLoop
MEInductLoop(const MEInductLoop &)
Hidden copy constructor.
config.h
OutputDevice::writeXMLHeader
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >())
Writes an XML header with optional configuration.
Definition: OutputDevice.cpp:227