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-2022 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
89protected:
91 const std::string myName;
92
95
97 const double myPosition;
98
101
102private:
103
106
109
112};
long long int SUMOTime
Definition: GUI.h:36
An induction loop for mesoscopic simulation.
Definition: MEInductLoop.h:45
MEInductLoop & operator=(const MEInductLoop &)
Hidden assignment operator.
MEInductLoop(const MEInductLoop &)
Hidden copy constructor.
MESegment *const mySegment
mesoscopic edge segment the loop lies on
Definition: MEInductLoop.h:94
const double myPosition
position from the start of the edge / lane
Definition: MEInductLoop.h:97
void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)
MSMeanData_Net::MSLaneMeanDataValues myMeanData
data collector for the loop
Definition: MEInductLoop.h:100
void writeXMLDetectorProlog(OutputDevice &dev) const
Opens the XML-output using "detector" as root element.
Definition: MEInductLoop.h:68
MEInductLoop()
Hidden default constructor.
const std::string myName
name
Definition: MEInductLoop.h:91
A single mesoscopic segment (cell)
Definition: MESegment.h:49
Base of value-generating classes (detectors)
Data structure for mean (aggregated) edge/lane values.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61
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.