Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MEInductLoop.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// An induction loop for mesoscopic simulation
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <string>
24#include <deque>
25#include <map>
26#include <functional>
30#include <utils/common/Named.h>
31
32
33// ===========================================================================
34// class declarations
35// ===========================================================================
36class MESegment;
37
38// ===========================================================================
39// class definitions
40// ===========================================================================
46public:
47 MEInductLoop(const std::string& id,
48 MESegment* s,
49 double positionInMeters,
50 const std::string name, const std::string& vTypes,
51 const std::string& nextEdges,
52 int detectPersons);
53
54
56
69 dev.writeXMLHeader("detector", "det_e1meso_file.xsd");
70 }
71
72
86 SUMOTime startTime, SUMOTime stopTime);
88
92
93 const MSEdge& getEdge() const;
94
95protected:
97 const std::string myName;
98
101
103 const double myPosition;
104
107
108private:
109
112
115
118};
long long int SUMOTime
Definition GUI.h:36
An induction loop for mesoscopic simulation.
MEInductLoop & operator=(const MEInductLoop &)
Hidden assignment operator.
MEInductLoop(const MEInductLoop &)
Hidden copy constructor.
const MSMeanData_Net::MSLaneMeanDataValues & getMeanData() const
const MSEdge & getEdge() const
MESegment *const mySegment
mesoscopic edge segment the loop lies on
const double myPosition
position from the start of the edge / lane
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
MSMeanData_Net::MSLaneMeanDataValues myMeanData
data collector for the loop
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
MEInductLoop()
Hidden default constructor.
const std::string myName
name
A single mesoscopic segment (cell)
Definition MESegment.h:49
Base of value-generating classes (detectors)
A road/street connecting two junctions.
Definition MSEdge.h:77
Data structure for mean (aggregated) edge/lane values.
Static storage of an output device and its base (abstract) implementation.
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >(), bool includeConfig=true)
Writes an XML header with optional configuration.