Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
hydromonthlypower.h
1/*
2** Copyright 2007-2024, 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_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_MONTHLY_POWER_H__
22#define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_MONTHLY_POWER_H__
23
24#include "../area.h"
25#include "../matrix.h"
26#include <antares/date/date.h>
27#include <antares/study/parts/wind/prepro.h>
28
29namespace Antares
30{
31namespace Component
32{
33namespace Datagrid
34{
35namespace Renderer
36{
37
38class HydroMonthlyHours final : public Renderer::Matrix<double, double, 2>,
40{
41public:
43 enum class HoursType
44 {
45 Generation = 0,
46 Pumping
47 };
48
49public:
51
52
55 HydroMonthlyHours(wxWindow* control, Toolbox::InputSelector::Area* notifier, HoursType type);
57 virtual ~HydroMonthlyHours();
59
60 virtual int width() const
61 {
62 return 1;
63 }
64 virtual int height() const
65 {
66 return DAYS_PER_YEAR;
67 }
68
69 HoursType hoursType;
70
71 virtual wxString columnCaption(int colIndx) const;
72
73 virtual wxString rowCaption(int rowIndx) const;
74
75 virtual wxString cellValue(int x, int y) const;
76
77 virtual double cellNumericValue(int x, int y) const;
78
79 virtual bool cellValue(int, int, const Yuni::String&);
80
81 virtual void resetColors(int, int, wxColour&, wxColour&) const
82 { /*Do nothing*/
83 }
84
85 virtual IRenderer::CellStyle cellStyle(int col, int row) const;
86
87 virtual Date::Precision precision()
88 {
89 return Date::daily;
90 }
91
92 virtual bool valid() const
93 {
94 return MatrixAncestorType::valid();
95 }
96
97 virtual uint maxWidthResize() const
98 {
99 return 0;
100 }
101 virtual uint maxHeightResize() const
102 {
103 return 0;
104 }
105
106protected:
107 virtual void internalAreaChanged(Antares::Data::Area* area);
109 virtual void onStudyClosed() override;
111 virtual void onStudyLoaded() override;
112
113}; // class HydroMonthlyHoursGen
114
115} // namespace Renderer
116} // namespace Datagrid
117} // namespace Component
118} // namespace Antares
119
120#endif // __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_MONTHLY_POWER_H__
virtual wxString columnCaption(int colIndx) const
Get the column caption.
Definition hydromonthlypower.cpp:46
virtual ~HydroMonthlyHours()
Destructor.
Definition hydromonthlypower.cpp:41
virtual uint maxHeightResize() const
The most suitable column count.
Definition hydromonthlypower.h:101
virtual int height() const
Get the height of the datagrid.
Definition hydromonthlypower.h:64
virtual uint maxWidthResize() const
The most suitable column count.
Definition hydromonthlypower.h:97
virtual bool cellValue(int, int, const Yuni::String &)
Set the value of a cell.
virtual void onStudyClosed() override
Event: the study has been closed.
Definition hydromonthlypower.cpp:126
virtual double cellNumericValue(int x, int y) const
Get the value of a cell.
Definition hydromonthlypower.cpp:67
virtual wxString cellValue(int x, int y) const
Get the value of a cell.
Definition hydromonthlypower.cpp:62
virtual Date::Precision precision()
Time Precision.
Definition hydromonthlypower.h:87
virtual void onStudyLoaded() override
Event: the study has been loaded.
Definition hydromonthlypower.cpp:132
virtual int width() const
Get the width of the datagrid.
Definition hydromonthlypower.h:60
virtual wxString rowCaption(int rowIndx) const
Get the row caption.
Definition hydromonthlypower.cpp:119
HydroMonthlyHours(wxWindow *control, Toolbox::InputSelector::Area *notifier, HoursType type)
Constructor.
Definition hydromonthlypower.cpp:34
Definition for a single area.
Definition area.h:52
A n-by-n matrix.
Definition jit.h:30
Visual Component for displaying all available areas (and groups)
Definition area.h:41