Antares Simulator
Power System Simulator
management.h
1 /*
2  * Copyright 2007-2025, RTE (https://www.rte-france.com)
3  * See AUTHORS.txt
4  * SPDX-License-Identifier: MPL-2.0
5  * This file is part of Antares-Simulator,
6  * Adequacy and Performance assessment for interconnected energy networks.
7  *
8  * Antares_Simulator is free software: you can redistribute it and/or modify
9  * it under the terms of the Mozilla Public Licence 2.0 as published by
10  * the Mozilla Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Antares_Simulator is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * Mozilla Public Licence 2.0 for more details.
17  *
18  * You should have received a copy of the Mozilla Public Licence 2.0
19  * along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20  */
21 #ifndef __ANTARES_APPLICATION_HYDROOW_HYDRO_MANAGEMENT_H__
22 #define __ANTARES_APPLICATION_HYDROOW_HYDRO_MANAGEMENT_H__
23 
24 #include "../../toolbox/components/datagrid/component.h"
25 #include "../../toolbox/input/area.h"
26 #include <ui/common/component/panel.h>
27 #include "../../toolbox/components/button.h"
28 
29 namespace Antares::Window::Hydro
30 {
31 class Management: public wxScrolledWindow, public Yuni::IEventObserver<Management>
32 {
33 public:
35 
36 
39  Management(wxWindow* parent, Toolbox::InputSelector::Area* notifier);
41  virtual ~Management();
43 
44 private:
45  void createComponents();
46  void onStudyClosed();
47  void onAreaChanged(Data::Area* area);
48 
49  void onInterdailyBreakdownChanged(wxCommandEvent& evt);
50  void onIntradailyModulationChanged(wxCommandEvent& evt);
51  void onIntermonthlyBreakdownChanged(wxCommandEvent& evt);
52  void onReservoirCapacityChanged(wxCommandEvent& evt);
53  void onLeewayLowBoundChanged(wxCommandEvent& evt);
54  void onLeewayUpperBoundChanged(wxCommandEvent& evt);
55  void onPumpingEfficiencyChanged(wxCommandEvent& evt);
56  void onToggleReservoirManagement(Component::Button&, wxMenu& menu, void*);
57  void onToggleFollowLoad(Component::Button&, wxMenu& menu, void*);
58  void onToggleUseLeeway(Component::Button&, wxMenu& menu, void*);
59  void onToggleUseWaterValue(Component::Button&, wxMenu& menu, void*);
60  void onToggleHardBoundsOnRuleCurves(Component::Button&, wxMenu& menu, void*);
61  void onToggleInitializeReservoirLevelDate(Component::Button&, wxMenu& menu, void*);
62  void onToggleUseHeuristicTarget(Component::Button&, wxMenu& menu, void*);
63  void onTogglePowerToLevel(Component::Button&, wxMenu& menu, void*);
64 
65  void onEnableReserveManagement(wxCommandEvent& evt);
66  void onDisableReserveManagement(wxCommandEvent& evt);
67 
68  void onEnableUseLeeway(wxCommandEvent& evt);
69  void onDisableUseLeeway(wxCommandEvent& evt);
70 
71  void onFollowingLoadModulations(wxCommandEvent& evt);
72  void onUnfollowingLoadModulations(wxCommandEvent& evt);
73 
74  void onEnableUseWaterValue(wxCommandEvent& evt);
75  void onDisableUseWaterValue(wxCommandEvent& evt);
76 
77  void onEnableHardBoundsOnRuleCurves(wxCommandEvent& evt);
78  void onDisableHardBoundsOnRuleCurves(wxCommandEvent& evt);
79 
80  void onChangingInitializeReservoirLevelDate(wxCommandEvent& evt);
81 
82  void onEnableUseHeuristicTarget(wxCommandEvent& evt);
83  void onDisableUseHeuristicTarget(wxCommandEvent& evt);
84 
85  void onEnablePowerToLevel(wxCommandEvent& evt);
86  void onDisablePowerToLevel(wxCommandEvent& evt);
87 
88 private:
90  Toolbox::InputSelector::Area* pInputAreaSelector;
91  Data::Area* pArea = nullptr;
92  bool pComponentsAreReady = false;
93  Component::Panel* pSupport = nullptr;
94  wxTextCtrl* pIntermonthlyBreakdown = nullptr;
95  wxTextCtrl* pInterdailyBreakdown = nullptr;
96  wxTextCtrl* pIntradailyModulation = nullptr;
97  wxTextCtrl* pReservoirCapacity = nullptr;
98  wxTextCtrl* pLeewayUpperBound = nullptr;
99  wxTextCtrl* pLeewayLowerBound = nullptr;
100  wxTextCtrl* pPumpingEfficiency = nullptr;
101  wxWindow* pLabelReservoirCapacity = nullptr;
102  wxWindow* pLabelUseWaterValues = nullptr;
103  wxWindow* pLabelHardBounds = nullptr;
104  wxWindow* pLabelUseHeuristicTarget = nullptr;
105  wxWindow* pLabelLeewayLow = nullptr;
106  wxWindow* pLabelLeewayUp = nullptr;
107  wxWindow* pLabelUseLeeway = nullptr;
108  wxWindow* pLabelPowerToLevel = nullptr;
109 
110  Component::Button* pReservoirManagement = nullptr;
111  Component::Button* pFollowLoad = nullptr;
112  Component::Button* pUseLeeway = nullptr;
113  Component::Button* pUseWaterValue = nullptr;
114  Component::Button* pHardBoundsOnRuleCurves = nullptr;
115  Component::Button* pInitializeReservoirLevelDate = nullptr;
116  Component::Button* pUseHeuristicTarget = nullptr;
117  Component::Button* pPowerToLevel = nullptr;
118 
119 }; // class Management
120 
121 } // namespace Antares::Window::Hydro
122 
123 #endif // __ANTARES_APPLICATION_HYDROOW_HYDRO_MANAGEMENT_H__
Definition: button.h:32
Panel implementation.
Definition: panel.h:34
Definition for a single area.
Definition: area.h:51
Visual Component for displaying all available areas (and groups)
Definition: area.h:37
Definition: management.h:32
virtual ~Management()
Destructor.
Definition: management.cpp:376
Management(wxWindow *parent, Toolbox::InputSelector::Area *notifier)
Constructor.
Definition: management.cpp:36