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, GNEDemandElement* vehicleType, GNEDemandElement* route);
46
48 GNECalibratorFlow(GNEAdditional* calibratorParent, GNEDemandElement* vehicleType, GNEDemandElement* route, const SUMOVehicleParameter& vehicleParameters);
49
52
55
57 GNEMoveElement* getMoveElement() const override;
58
60 Parameterised* getParameters() override;
61
63 const Parameterised* getParameters() const override;
64
66
69
73 void writeAdditional(OutputDevice& device) const override;
74
76 bool isAdditionalValid() const override;
77
79 std::string getAdditionalProblem() const override;
80
82 void fixAdditionalProblem() override;
83
85
88
90 bool checkDrawMoveContour() const override;
91
93
96
98 void updateGeometry() override;
99
101 Position getPositionInView() const override;
102
104 void updateCenteringBoundary(const bool updateGrid) override;
105
107 void splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement, const GNENetworkElement* newElement, GNEUndoList* undoList) override;
108
110
113
117 std::string getParentName() const override;
118
123 void drawGL(const GUIVisualizationSettings& s) const override;
124
126
129
130 /* @brief method for getting the Attribute of an XML key
131 * @param[in] key The attribute key
132 * @return string with the value associated to key
133 */
134 std::string getAttribute(SumoXMLAttr key) const override;
135
136 /* @brief method for getting the Attribute of an XML key in double format
137 * @param[in] key The attribute key
138 * @return double with the value associated to key
139 */
140 double getAttributeDouble(SumoXMLAttr key) const override;
141
142 /* @brief method for getting the Attribute of an XML key in position format
143 * @param[in] key The attribute key
144 * @return position with the value associated to key
145 */
146 Position getAttributePosition(SumoXMLAttr key) const override;
147
148 /* @brief method for getting the Attribute of an XML key in positionVector format
149 * @param[in] key The attribute key
150 * @return positionVector with the value associated to key
151 */
153
154 /* @brief method for setting the attribute and letting the object perform additional changes
155 * @param[in] key The attribute key
156 * @param[in] value The new value
157 * @param[in] undoList The undoList on which to register changes
158 * @param[in] net optionally the GNENet to inform about gui updates
159 */
160 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
161
162 /* @brief method for setting the attribute and letting the object perform additional changes
163 * @param[in] key The attribute key
164 * @param[in] value The new value
165 * @param[in] undoList The undoList on which to register changes
166 */
167 bool isValid(SumoXMLAttr key, const std::string& value) override;
168
169 /* @brief method for check if the value for certain attribute is set
170 * @param[in] key The attribute key
171 */
172 bool isAttributeEnabled(SumoXMLAttr key) const override;
173
175 std::string getPopUpID() const override;
176
178 std::string getHierarchyName() const override;
179
181
182private:
184 void setAttribute(SumoXMLAttr key, const std::string& value) override;
185
187 void toggleAttribute(SumoXMLAttr key, const bool value) override;
188
191
194};
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.