Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNECalibratorFlow.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-2025 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// Flow used by GNECalibrators
19/****************************************************************************/
20#pragma once
21#include <config.h>
23
24#include "GNEAdditional.h"
25#include "GNEAdditionalListed.h"
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30
31class GNECalibrator;
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
37
39
40public:
43
45 GNECalibratorFlow(GNEAdditional* calibratorParent, const SUMOTime begin, const SUMOTime end,
46 GNEDemandElement* vehicleType, GNEDemandElement* route);
47
49 GNECalibratorFlow(GNEAdditional* calibratorParent, GNEDemandElement* vehicleType,
50 GNEDemandElement* route, const SUMOVehicleParameter& vehicleParameters);
51
54
57
59 GNEMoveElement* getMoveElement() const override;
60
62 Parameterised* getParameters() override;
63
65 const Parameterised* getParameters() const override;
66
68
71
75 void writeAdditional(OutputDevice& device) const override;
76
78 bool isAdditionalValid() const override;
79
81 std::string getAdditionalProblem() const override;
82
84 void fixAdditionalProblem() override;
85
87
90
92 bool checkDrawMoveContour() const override;
93
95
98
100 void updateGeometry() override;
101
103 Position getPositionInView() const override;
104
106 void updateCenteringBoundary(const bool updateGrid) override;
107
109 void splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement, const GNENetworkElement* newElement, GNEUndoList* undoList) override;
110
112
115
119 std::string getParentName() const override;
120
125 void drawGL(const GUIVisualizationSettings& s) const override;
126
128
131
132 /* @brief method for getting the Attribute of an XML key
133 * @param[in] key The attribute key
134 * @return string with the value associated to key
135 */
136 std::string getAttribute(SumoXMLAttr key) const override;
137
138 /* @brief method for getting the Attribute of an XML key in double format
139 * @param[in] key The attribute key
140 * @return double with the value associated to key
141 */
142 double getAttributeDouble(SumoXMLAttr key) const override;
143
144 /* @brief method for getting the Attribute of an XML key in position format
145 * @param[in] key The attribute key
146 * @return position with the value associated to key
147 */
148 Position getAttributePosition(SumoXMLAttr key) const override;
149
150 /* @brief method for getting the Attribute of an XML key in positionVector format
151 * @param[in] key The attribute key
152 * @return positionVector with the value associated to key
153 */
155
156 /* @brief method for setting the attribute and letting the object perform additional changes
157 * @param[in] key The attribute key
158 * @param[in] value The new value
159 * @param[in] undoList The undoList on which to register changes
160 * @param[in] net optionally the GNENet to inform about gui updates
161 */
162 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
163
164 /* @brief method for setting the attribute and letting the object perform additional changes
165 * @param[in] key The attribute key
166 * @param[in] value The new value
167 * @param[in] undoList The undoList on which to register changes
168 */
169 bool isValid(SumoXMLAttr key, const std::string& value) override;
170
171 /* @brief method for check if the value for certain attribute is set
172 * @param[in] key The attribute key
173 */
174 bool isAttributeEnabled(SumoXMLAttr key) const override;
175
177 std::string getPopUpID() const override;
178
180 std::string getHierarchyName() const override;
181
183
184private:
186 void setAttribute(SumoXMLAttr key, const std::string& value) override;
187
189 void toggleAttribute(SumoXMLAttr key, const bool value) override;
190
193
196};
long long int SUMOTime
Definition GUI.h:36
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
bool isAttributeEnabled(SumoXMLAttr key) const override
std::string getAdditionalProblem() const override
return a string with the current additional problem (must be reimplemented in all detector children)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
Position getAttributePosition(SumoXMLAttr key) const override
~GNECalibratorFlow()
destructor
void toggleAttribute(SumoXMLAttr key, const bool value) override
toggle attribute
bool checkDrawMoveContour() const override
check if draw move contour (red)
GNECalibratorFlow & operator=(const GNECalibratorFlow &)=delete
Invalidated assignment operator.
void updateCenteringBoundary(const bool updateGrid) override
update centering boundary (implies change in RTREE)
std::string getAttribute(SumoXMLAttr key) const override
inherited from GNEAttributeCarrier
Position getPositionInView() const override
Returns position of additional in view.
void updateGeometry() override
update pre-computed geometry information
double getAttributeDouble(SumoXMLAttr key) const override
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
bool isAdditionalValid() const override
check if current additional is valid to be written into XML (must be reimplemented in all detector ch...
void writeAdditional(OutputDevice &device) const override
write additional element into a xml file
GNECalibratorFlow(const GNECalibratorFlow &)=delete
Invalidated copy constructor.
bool isValid(SumoXMLAttr key, const std::string &value) override
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this calibratorFlow
std::string getParentName() const override
Returns the name of the parent object.
void fixAdditionalProblem() override
fix additional problem (must be reimplemented in all detector children)
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList) override
split geometry
Parameterised * getParameters() override
get parameters associated with this calibratorFlow
Stores the information about how to visualize structures.
Static storage of an output device and its base (abstract) implementation.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.
Structure representing possible vehicle parameter.