Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
accumulator.hxx
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_WINDOWS_INSPECTOR_ACCUMULATOR_HXX__
22#define ANTARES_WINDOWS_INSPECTOR_ACCUMULATOR_HXX__
23
24#include <antares/study/filter.h>
25#include <array>
26#include "constants.h"
27
28namespace Antares
29{
30namespace Window
31{
32namespace Inspector
33{
34struct Unique
35{
36 template<class T>
37 static bool Apply(T& value, const T& item)
38 {
39 return (value == item);
40 }
41};
42
43struct Add
44{
45 template<class T>
46 static bool Apply(T& value, const T& item)
47 {
48 value += item;
49 return true;
50 }
51};
52
53template<class PredicateT, class TraitsT = Unique>
55{
56public:
57 template<class ListT>
58 static void Apply(wxPGProperty* property, const ListT& list)
59 {
60 assert(list.size() != 0);
61 assert(property != NULL);
62 if (list.size() == 1)
63 {
64 auto study = *list.begin();
65 property->SetValueFromString(PredicateT::ConvertToString(PredicateT::Value(study)));
66 }
67 else
68 {
69 auto i = list.cbegin();
70 const auto end = list.cend();
71 typename PredicateT::Type value = PredicateT::Value(*i);
72 ++i;
73 for (; i != end; ++i)
74 {
75 if (!TraitsT::Apply(value, PredicateT::Value(*i)))
76 {
77 property->SetValueToUnspecified();
78 return;
79 }
80 }
81 property->SetValueFromString(PredicateT::ConvertToString(value));
82 }
83 }
84};
85
86template<class PredicateT>
88{
89public:
90 template<class ListT>
91 static void ApplyTextColor(wxPGProperty* property, const ListT& list)
92 {
93 assert(list.size() != 0);
94 assert(property != NULL);
95 if (list.size() == 1)
96 {
97 auto study = *list.begin();
98 property->GetGrid()->SetPropertyTextColour(property->GetBaseName(),
99 PredicateT::TextColor(study));
100 }
101 else
102 {
103 auto i = list.cbegin();
104 const auto end = list.cend();
105 ++i;
106 for (; i != end; ++i)
107 property->GetGrid()->SetPropertyTextColour(property->GetBaseName(),
108 PredicateT::TextColor(*i));
109 }
110 }
111
112 template<class ListT>
113 static void ApplyGreyColor(wxPGProperty* property_MargCost,
114 wxPGProperty* property_OperCost,
115 wxPGProperty* property_FuelEff,
116 wxPGProperty* property_VarOMcost,
117 const ListT& list)
118 {
119 assert(list.size() != 0);
120 assert(property_MargCost != NULL);
121 assert(property_OperCost != NULL);
122 assert(property_FuelEff != NULL);
123 assert(property_VarOMcost != NULL);
124 if (list.size() == 1)
125 {
126 auto study = *list.begin();
127 property_MargCost->GetGrid()->EnableProperty(property_MargCost->GetBaseName(),
128 PredicateT::Enable(study));
129 property_OperCost->GetGrid()->EnableProperty(property_OperCost->GetBaseName(),
130 PredicateT::Enable(study));
131 property_FuelEff->GetGrid()->EnableProperty(property_FuelEff->GetBaseName(),
132 !PredicateT::Enable(study));
133 property_VarOMcost->GetGrid()->EnableProperty(property_VarOMcost->GetBaseName(),
134 !PredicateT::Enable(study));
135 }
136 else
137 {
138 auto i = list.cbegin();
139 const auto end = list.cend();
140 ++i;
141 for (; i != end; ++i)
142 {
143 property_MargCost->GetGrid()->EnableProperty(property_MargCost->GetBaseName(),
144 PredicateT::Enable(*i));
145 property_OperCost->GetGrid()->EnableProperty(property_OperCost->GetBaseName(),
146 PredicateT::Enable(*i));
147 property_FuelEff->GetGrid()->EnableProperty(property_FuelEff->GetBaseName(),
148 !PredicateT::Enable(*i));
149 property_VarOMcost->GetGrid()->EnableProperty(property_VarOMcost->GetBaseName(),
150 !PredicateT::Enable(*i));
151 }
152 }
153 }
154};
155
157{
158 struct Color
159 {
160 Color(const int c[3])
161 {
162 color[0] = c[0];
163 color[1] = c[1];
164 color[2] = c[2];
165 }
166 int color[3];
167 bool operator==(const Color& rhs) const
168 {
169 return rhs.color[0] == color[0] && rhs.color[1] == color[1] && rhs.color[2] == color[2];
170 }
171 };
172 using Type = Color;
173 static Type Value(const Data::Area* area)
174 {
175 return Color(area->ui->color);
176 }
177 static wxString ConvertToString(const Type v)
178 {
179 return wxString() << wxT("(") << v.color[0] << wxT(',') << v.color[1] << wxT(',')
180 << v.color[2] << wxT(")");
181 }
182};
183
185{
186 using Type = Data::SimulationMode;
187 static Type Value(const Data::Study::Ptr& study)
188 {
189 return (!(!study) ? study->parameters.mode : Data::SimulationMode::Economy);
190 }
191 static wxString ConvertToString(const Type v)
192 {
193 switch (v)
194 {
195 case Data::SimulationMode::Economy:
196 return wxT("Economy");
197 case Data::SimulationMode::Adequacy:
198 return wxT("Adequacy");
199 case Data::SimulationMode::Expansion:
200 return wxT("Expansion");
201 case Data::SimulationMode::Unknown:
202 return wxEmptyString;
203 }
204 return wxEmptyString;
205 }
206};
207
209{
210 using Type = uint;
211 static Type Value(const Data::Study::Ptr& study)
212 {
213 if (!(!study))
214 {
215 auto& parameters = study->parameters;
216 if (parameters.derated)
217 return 2;
218 if (parameters.useCustomScenario)
219 return 1;
220 }
221 return 0;
222 }
223 static wxString ConvertToString(const Type v)
224 {
225 switch (v)
226 {
227 case 0:
228 return wxT("Automatic");
229 case 1:
230 return wxT("Custom");
231 case 2:
232 return wxT("Derated");
233 }
234 return wxT("Automatic");
235 }
236};
237
239{
240 using Type = uint;
241 static Type Value(const Data::Study::Ptr& study)
242 {
243 return !study ? 0 : (uint)study->parameters.firstMonthInYear;
244 }
245 static wxString ConvertToString(const Type v)
246 {
247 if (v < 12)
248 return calendarMonths[v];
249 return wxT("invalid");
250 }
251};
252
254{
255 using Type = bool;
256 static Type Value(const Data::Study::Ptr& study)
257 {
258 return !study ? false : study->parameters.leapYear;
259 }
260 static wxString ConvertToString(const Type v)
261 {
262 return v ? wxT("true") : wxT("false");
263 }
264};
265
267{
268 using Type = uint;
269 static Type Value(const Data::Study::Ptr& study)
270 {
271 return !study ? (uint)Antares::monday : (uint)study->parameters.firstWeekday;
272 }
273 static wxString ConvertToString(const Type v)
274 {
275 if (v < 7)
276 return calendarWeeks[v];
277 return wxT("invalid");
278 }
279};
280
282{
283 using Type = bool;
284 static Type Value(const Data::Study::Ptr& study)
285 {
286 return !(!study) ? study->parameters.userPlaylist : false;
287 }
288 static wxString ConvertToString(const Type v)
289 {
290 switch (v)
291 {
292 case 0:
293 return wxT("Automatic");
294 case 1:
295 return wxT("Custom");
296 }
297 return wxT("Automatic");
298 }
299};
300
302{
303 using Type = bool;
304 static Type Value(const Data::Study::Ptr& study)
305 {
306 return !(!study) ? study->parameters.yearByYear : false;
307 }
308 static wxString ConvertToString(const Type v)
309 {
310 return v ? wxT("True") : wxT("False");
311 }
312};
313
315{
316 using Type = bool;
317 static Type Value(const Data::Study::Ptr& study)
318 {
319 return !(!study) ? study->parameters.synthesis : false;
320 }
321 static wxString ConvertToString(const Type v)
322 {
323 return v ? wxT("True") : wxT("False");
324 }
325};
326
328{
329 using Type = bool;
330 static Type Value(const Data::Study::Ptr& study)
331 {
332 return !(!study) ? study->parameters.geographicTrimming : false;
333 }
334 static wxString ConvertToString(const Type v)
335 {
336 return (!v) ? wxT("None") : wxT("Custom");
337 }
338};
339
341{
342 using Type = bool;
343 static Type Value(const Data::Study::Ptr& study)
344 {
345 return !(!study) ? study->parameters.thematicTrimming : false;
346 }
347 static wxString ConvertToString(const Type v)
348 {
349 return (!v) ? wxT("None") : wxT("Custom");
350 }
351};
352
354{
355 using Type = bool;
356 static Type Value(const Data::Study::Ptr& study)
357 {
358 return !(!study) ? study->parameters.storeTimeseriesNumbers : false;
359 }
360 static wxString ConvertToString(const Type v)
361 {
362 return v ? wxT("True") : wxT("False");
363 }
364};
365
367{
368 using Type = wxString;
369 static Type Value(const Data::Study::Ptr& study)
370 {
371 return wxString() << ((!(!study) ? study->parameters.simulationDays.first : 0) + 1);
372 }
373 static wxString ConvertToString(const Type v)
374 {
375 return v;
376 }
377};
378
380{
381 using Type = uint;
382 static Type Value(const Data::Study::Ptr& study)
383 {
384 return !(!study) ? study->parameters.simulationDays.end : 8760;
385 }
386 static wxString ConvertToString(const Type v)
387 {
388 return wxString() << v;
389 }
390};
391
393{
394 using Type = uint;
395 static Type Value(const Data::Study::Ptr& study)
396 {
397 return !(!study) ? study->parameters.nbYears : 1;
398 }
399 static wxString ConvertToString(const Type v)
400 {
401 return wxString() << v;
402 }
403};
404
406{
407 using Type = String;
408 static Type Value(const Data::Study::Ptr& study)
409 {
410 return !(!study) ? study->parameters.horizon : Type();
411 }
412 static wxString ConvertToString(const Type v)
413 {
414 return wxStringFromUTF8(v);
415 }
416};
417
419{
420 using Type = Antares::DayOfTheWeek;
421 static Type Value(const Data::Study::Ptr& study)
422 {
423 return !study ? Antares::monday : study->parameters.dayOfThe1stJanuary;
424 }
425 static wxString ConvertToString(const Type v)
426 {
427 return wxStringFromUTF8(Antares::Date::DayOfTheWeekToString(v));
428 }
429};
430
431template<bool Orientation>
433{
434 using Type = wxString;
435 static Type Value(const Data::AreaLink* link)
436 {
437 if (Orientation)
438 return wxStringFromUTF8(link->from->name);
439 else
440 return wxStringFromUTF8(link->with->name);
441 }
442 static wxString ConvertToString(const Type v)
443 {
444 return v;
445 }
446};
447
449{
450 using Type = bool;
451 static Type Value(const Data::AreaLink* link)
452 {
453 return link->useHurdlesCost;
454 }
455 static wxString ConvertToString(const Type v)
456 {
457 return v ? wxT("True") : wxT("False");
458 }
459};
460
462{
463 using Type = bool;
464 static Type Value(const Data::AreaLink* link)
465 {
466 return link->usePST;
467 }
468 static wxString ConvertToString(const Type v)
469 {
470 return v ? wxT("True") : wxT("False");
471 }
472};
473
475{
476 using Type = bool;
477 static Type Value(const Data::AreaLink* link)
478 {
479 return link->useLoopFlow;
480 }
481 static wxString ConvertToString(const Type v)
482 {
483 return v ? wxT("True") : wxT("False");
484 }
485};
486
488{
489 using Type = bool;
490 static Type Value(const Data::AreaLink* link)
491 {
492 return link->displayComments;
493 }
494 static wxString ConvertToString(const Type v)
495 {
496 return v ? wxT("True") : wxT("False");
497 }
498};
499
501{
502 using Type = wxString;
503 static Type Value(const Data::AreaLink* link)
504 {
505 return wxStringFromUTF8(link->comments);
506 }
507 static wxString ConvertToString(const Type v)
508 {
509 return v;
510 }
511};
512
514{
515 using Type = int;
516 static Type Value(const Data::AreaLink* link)
517 {
518 return link->style;
519 }
520 static wxString ConvertToString(const Type v)
521 {
522 wxString ret;
523 switch (v)
524 {
525 case 0:
526 ret = "Plain";
527 break;
528 case 1:
529 ret = "Dot";
530 break;
531 case 2:
532 ret = "Dash";
533 break;
534 case 3:
535 ret = "Dot & Dash";
536 break;
537 default:
538 ret = "Plain";
539 break;
540 }
541 return ret;
542 }
543};
544
546{
547 using Type = int;
548 static Type Value(const Data::AreaLink* link)
549 {
550 return Math::MinMax(link->linkWidth, 1, 6);
551 }
552 static wxString ConvertToString(const Type v)
553 {
554 return DoubleToWxString(v);
555 }
556};
557
559{
560 struct Color
561 {
562 Color(const int c[3])
563 {
564 color[0] = c[0];
565 color[1] = c[1];
566 color[2] = c[2];
567 }
568 int color[3];
569 bool operator==(const Color& rhs) const
570 {
571 return rhs.color[0] == color[0] && rhs.color[1] == color[1] && rhs.color[2] == color[2];
572 }
573 };
574 using Type = Color;
575 static Type Value(const Data::AreaLink* link)
576 {
577 return Color(link->color);
578 }
579 static wxString ConvertToString(const Type v)
580 {
581 return wxString() << wxT("(") << v.color[0] << wxT(',') << v.color[1] << wxT(',')
582 << v.color[2] << wxT(")");
583 }
584};
585
587{
588 using Type = double;
589 static Type Value(const Data::Area* area)
590 {
591 return area->thermal.unsuppliedEnergyCost;
592 }
593 static wxString ConvertToString(const Type v)
594 {
595 return DoubleToWxString(v);
596 }
597};
598
600{
601 using Type = Data::AdequacyPatch::AdequacyPatchMode;
602 static Type Value(const Data::Area* area)
603 {
604 return area->adequacyPatchMode;
605 }
606 static wxString ConvertToString(const Type v)
607 {
608 switch (v)
609 {
610 case Data::AdequacyPatch::virtualArea:
611 return wxT("virtual area");
612 case Data::AdequacyPatch::physicalAreaOutsideAdqPatch:
613 return wxT("physical area outside patch");
614 case Data::AdequacyPatch::physicalAreaInsideAdqPatch:
615 return wxT("physical area inside patch");
616 }
617 return wxEmptyString;
618 }
619};
620
621template<enum Data::AreaNodalOptimization O>
623{
624 using Type = bool;
625 static Type Value(const Data::Area* area)
626 {
627 return (0 != (area->nodalOptimization & O));
628 }
629 static wxString ConvertToString(const Type v)
630 {
631 return (v) ? wxT("True") : wxT("False");
632 }
633};
634
635template<bool SynthesisT, enum Data::FilterFlag F>
637{
638 using Type = bool;
639 static Type Value(const Data::Area* area)
640 {
641 if (SynthesisT)
642 return (0 != (area->filterSynthesis & F));
643 else
644 return (0 != (area->filterYearByYear & F));
645 }
646 static wxString ConvertToString(const Type v)
647 {
648 return (v) ? wxT("True") : wxT("False");
649 }
650};
651
652template<bool SynthesisT, enum Data::FilterFlag F>
654{
655 using Type = bool;
656 static Type Value(const Data::AreaLink* link)
657 {
658 if (SynthesisT)
659 return (0 != (link->filterSynthesis & F));
660 else
661 return (0 != (link->filterYearByYear & F));
662 }
663 static wxString ConvertToString(const Type v)
664 {
665 return (v) ? wxT("True") : wxT("False");
666 }
667};
668
670{
671 using Type = double;
672 static Type Value(const Data::Area* area)
673 {
674 return area->thermal.spilledEnergyCost;
675 }
676 static wxString ConvertToString(const Type v)
677 {
678 return DoubleToWxString(v);
679 }
680};
681
682// ----------------
683// THERMAL/RENEWABLE CLUSTERS
684// ----------------
686{
687 using Type = bool;
688 static Type Value(const Data::Cluster* cluster)
689 {
690 return cluster->enabled;
691 }
692 static wxString ConvertToString(const Type v)
693 {
694 return v ? wxT("True") : wxT("False");
695 }
696};
697
699{
700 using Type = uint;
701 static Type Value(const Data::Cluster* cluster)
702 {
703 return cluster->unitCount;
704 }
705 static wxString ConvertToString(const Type v)
706 {
707 return wxString() << v;
708 }
709};
710
712{
713 using Type = double;
714 static Type Value(const Data::Cluster* cluster)
715 {
716 return cluster->nominalCapacity;
717 }
718 static wxString ConvertToString(const Type v)
719 {
720 return DoubleToWxString(v);
721 }
722};
723
725{
726 using Type = double;
727 static Type Value(const Data::Cluster* cluster)
728 {
729 return cluster->nominalCapacity * cluster->unitCount;
730 }
731 static wxString ConvertToString(const Type v)
732 {
733 return DoubleToWxString(v);
734 }
735};
736
738{
739 using Type = wxString;
740 static Type Value(const Data::Cluster* cluster)
741 {
742 return wxStringFromUTF8(cluster->group());
743 }
744 static wxString ConvertToString(const Type v)
745 {
746 return v;
747 }
748};
749
751{
752 using Type = wxString;
753 static Type Value(const Data::Cluster* cluster)
754 {
755 return wxStringFromUTF8(cluster->parentArea->name);
756 }
757 static wxString ConvertToString(const Type v)
758 {
759 return v;
760 }
761};
762
763// ----------------
764// THERMAL CLUSTERS
765// ----------------
767{
768 static wxColor TextColor(Data::ThermalCluster* cluster)
769 {
770 if (not cluster->checkMinStablePower())
771 return wxColor(255, 0, 0);
772
773 if (cluster->minStablePower > cluster->nominalCapacity * (1 - cluster->spinning / 100.))
774 return wxColor(255, 0, 0);
775
776 return wxColour(86, 98, 115);
777 }
778
779 static bool IsValid(Data::ThermalCluster* cluster)
780 {
781 return cluster->checkMinStablePower();
782 }
783};
784
786{
787 using Type = bool;
788 static Type Value(const Data::ThermalCluster* cluster)
789 {
790 return cluster->mustrun;
791 }
792 static wxString ConvertToString(const Type v)
793 {
794 return v ? wxT("True") : wxT("False");
795 }
796};
797
799{
800 using Type = double;
801 static Type Value(const Data::ThermalCluster* cluster)
802 {
803 return cluster->emissions.factors[Antares::Data::Pollutant::CO2];
804 }
805 static wxString ConvertToString(const Type v)
806 {
807 return DoubleToWxString(v);
808 }
809};
810
812{
813 using Type = double;
814 static Type Value(const Data::ThermalCluster* cluster)
815 {
816 return cluster->plannedVolatility;
817 }
818 static wxString ConvertToString(const Type v)
819 {
820 return DoubleToWxString(v);
821 }
822};
823
825{
826 using Type = double;
827 static Type Value(const Data::ThermalCluster* cluster)
828 {
829 return cluster->forcedVolatility;
830 }
831 static wxString ConvertToString(const Type v)
832 {
833 return DoubleToWxString(v);
834 }
835};
836
838{
839 using Type = double;
840 static Type Value(const Data::ThermalCluster* cluster)
841 {
842 return cluster->spinning;
843 }
844 static wxString ConvertToString(const Type v)
845 {
846 return DoubleToWxString(v);
847 }
848};
849
851{
852 using Type = double;
853 static Type Value(const Data::ThermalCluster* cluster)
854 {
855 return cluster->fuelEfficiency;
856 }
857 static wxString ConvertToString(const Type v)
858 {
859 return DoubleToWxString(v);
860 }
861};
862
864{
865 static wxColor TextColor(Data::ThermalCluster* cluster)
866 {
867 if (not cluster->checkMinStablePower())
868 return wxColor(255, 0, 0);
869
870 if (cluster->minStablePower > cluster->nominalCapacity * (1 - cluster->spinning / 100.))
871 return wxColor(255, 0, 0);
872
873 return wxColour(86, 98, 115);
874 }
875
876 static bool IsValid(Data::ThermalCluster* cluster)
877 {
878 return cluster->checkMinStablePower();
879 }
880};
881
883{
884 using Type = double;
885 static Type Value(const Data::ThermalCluster* cluster)
886 {
887 return cluster->marketBidCost;
888 }
889 static wxString ConvertToString(const Type v)
890 {
891 return DoubleToWxString(v);
892 }
893};
894
896{
897 using Type = double;
898 static Type Value(const Data::ThermalCluster* cluster)
899 {
900 return cluster->spreadCost;
901 }
902 static wxString ConvertToString(const Type v)
903 {
904 return DoubleToWxString(v);
905 }
906};
907
909{
910 using Type = uint;
911 static Type Value(const Data::ThermalCluster* cluster)
912 {
913 return (uint)cluster->costgeneration;
914 }
915 static wxString ConvertToString(const Type v)
916 {
917 return (v < costgenerationCount) ? costgeneration[v] : nullptr;
918 }
919};
920
922{
923 using Type = double;
924 static Type Value(const Data::ThermalCluster* cluster)
925 {
926 return cluster->marginalCost;
927 }
928 static wxString ConvertToString(const Type v)
929 {
930 return DoubleToWxString(v);
931 }
932};
933
935{
936 static bool Enable(Data::ThermalCluster* cluster)
937 {
938 if (cluster->costgeneration == Data::useCostTimeseries)
939 return false;
940
941 return true;
942 }
943};
944
946{
947 using Type = double;
948 static Type Value(const Data::ThermalCluster* cluster)
949 {
950 return cluster->startupCost;
951 }
952 static wxString ConvertToString(const Type v)
953 {
954 return DoubleToWxString(v);
955 }
956};
957
959{
960 using Type = double;
961 static Type Value(const Data::ThermalCluster* cluster)
962 {
963 return cluster->fixedCost;
964 }
965 static wxString ConvertToString(const Type v)
966 {
967 return DoubleToWxString(v);
968 }
969};
970
972{
973 using Type = double;
974 static Type Value(const Data::ThermalCluster* cluster)
975 {
976 return cluster->variableomcost;
977 }
978 static wxString ConvertToString(const Type v)
979 {
980 return DoubleToWxString(v);
981 }
982};
983
985{
986 using Type = double;
987 static Type Value(const Data::ThermalCluster* cluster)
988 {
989 return cluster->minStablePower;
990 }
991 static wxString ConvertToString(const Type v)
992 {
993 return DoubleToWxString(v);
994 }
995};
996
998{
999 static wxColor TextColor(Data::ThermalCluster* cluster)
1000 {
1001 if (not cluster->checkMinStablePower())
1002 return wxColor(255, 0, 0);
1003
1004 if (cluster->minStablePower > cluster->nominalCapacity * (1 - cluster->spinning / 100.))
1005 return wxColor(255, 0, 0);
1006
1007 return wxColour(86, 98, 115);
1008 }
1009
1010 static bool IsValid(Data::ThermalCluster* cluster)
1011 {
1012 return cluster->checkMinStablePower();
1013 }
1014};
1015
1017{
1018 using Type = uint;
1019 static Type Value(const Data::ThermalCluster* cluster)
1020 {
1021 return cluster->minUpTime;
1022 }
1023 static wxString ConvertToString(const Type v)
1024 {
1025 return wxString() << v;
1026 }
1027};
1028
1030{
1031 using Type = uint;
1032 static Type Value(const Data::ThermalCluster* cluster)
1033 {
1034 return cluster->minDownTime;
1035 }
1036 static wxString ConvertToString(const Type v)
1037 {
1038 return wxString() << v;
1039 }
1040};
1041
1043{
1044 using Type = uint;
1045 static Type Value(const Data::ThermalCluster* cluster)
1046 {
1047 return (uint)cluster->forcedLaw;
1048 }
1049 static wxString ConvertToString(const Type v)
1050 {
1051 return (v < LawCount) ? Laws[v] : nullptr;
1052 }
1053};
1054
1056{
1057 using Type = uint;
1058 static Type Value(const Data::ThermalCluster* cluster)
1059 {
1060 return cluster->plannedLaw;
1061 }
1062 static wxString ConvertToString(const Type v)
1063 {
1064 return (v < LawCount) ? Laws[v] : nullptr;
1065 }
1066};
1067
1069{
1070 using Type = uint;
1071 static Type Value(const Data::ThermalCluster* cluster)
1072 {
1073 return (uint)cluster->tsGenBehavior;
1074 }
1075 static wxString ConvertToString(const Type v)
1076 {
1077 return (v < localGenTSCount) ? localGenTS[v] : nullptr;
1078 }
1079};
1080
1082{
1083 using Type = uint;
1084 static Type Value(const Data::RenewableCluster* cluster)
1085 {
1086 return cluster->tsMode;
1087 }
1088 static wxString ConvertToString(const Type v)
1089 {
1090 return (v < renewableTSModeCount) ? renewableTSMode[v] : nullptr;
1091 }
1092};
1093
1094// -------------------
1095// BINDING CONSTRAINTS
1096// -------------------
1098{
1099 using Type = wxString;
1100 static Type Value(const std::shared_ptr<Data::BindingConstraint> constraint)
1101 {
1102 return wxStringFromUTF8(constraint->name());
1103 }
1104 static wxString ConvertToString(const Type v)
1105 {
1106 return v;
1107 }
1108};
1109
1111{
1112 using Type = wxString;
1113 static Type Value(const std::shared_ptr<Data::BindingConstraint> constraint)
1114 {
1115 return wxStringFromUTF8(constraint->comments());
1116 }
1117 static wxString ConvertToString(const Type v)
1118 {
1119 return v;
1120 }
1121};
1122
1124{
1125 using Type = bool;
1126 static Type Value(const std::shared_ptr<Data::BindingConstraint> constraint)
1127 {
1128 return constraint->enabled();
1129 }
1130 static wxString ConvertToString(const Type v)
1131 {
1132 return v ? wxT("True") : wxT("False");
1133 }
1134};
1135
1137{
1139 static Type Value(const std::shared_ptr<Data::BindingConstraint> constraint)
1140 {
1141 return constraint->type();
1142 }
1143 static wxString ConvertToString(const Type v)
1144 {
1145 return wxStringFromUTF8(Data::BindingConstraint::TypeToCString(v));
1146 }
1147};
1148} // namespace Inspector
1149} // namespace Window
1150} // namespace Antares
1151
1152#endif // ANTARES_WINDOWS_INSPECTOR_ACCUMULATOR_HXX__
Definition for a single area.
Definition area.h:52
AreaName name
Name of the area.
Definition area.h:213
Type
Definition BindingConstraint.h:55
static const char * TypeToCString(Type t)
Convert a binding constraint type into a mere C-String.
Definition BindingConstraint.cpp:107
Definition cluster.h:48
double nominalCapacity
Capacity of reference per unit (MW) (pMax)
Definition cluster.h:117
Area * parentArea
The associate area (alias)
Definition cluster.h:114
Definition cluster.h:42
A single thermal cluster.
Definition cluster.h:78
double spinning
Spinning (%)
Definition cluster.h:275
double marketBidCost
Market bid cost (euros/MWh)
Definition cluster.h:333
uint minDownTime
Min. Down time (1..168)
Definition cluster.h:269
StatisticalLaw plannedLaw
Law (ts-generator)
Definition cluster.h:288
bool mustrun
Mustrun.
Definition cluster.h:228
double spreadCost
Spread (euros/MWh)
Definition cluster.h:327
double startupCost
Startup cost (euros/startup)
Definition cluster.h:331
CostGeneration costgeneration
Cost generation.
Definition cluster.h:323
double variableomcost
Variable O&M cost (euros/MWh)
Definition cluster.h:335
double marginalCost
Marginal cost (euros/MWh)
Definition cluster.h:325
double fuelEfficiency
Efficiency (%)
Definition cluster.h:278
double minStablePower
Min. Stable Power (MW)
Definition cluster.h:248
uint minUpTime
Min. Up time (1..168)
Definition cluster.h:267
StatisticalLaw forcedLaw
Law (ts-generator)
Definition cluster.h:286
double fixedCost
Fixed cost (euros/hour)
Definition cluster.h:329
bool checkMinStablePower()
Check the validity of Min Stable Power.
Definition cluster.cpp:546
double plannedVolatility
Planned volatility.
Definition cluster.h:283
double forcedVolatility
Forced Volatility.
Definition cluster.h:281
Definition accumulator.hxx:55
Definition accumulator.hxx:44
Definition accumulator.hxx:159
Definition accumulator.hxx:157
Definition accumulator.hxx:637
Definition accumulator.hxx:623
Definition accumulator.hxx:751
Definition accumulator.hxx:799
Definition accumulator.hxx:686
Definition accumulator.hxx:959
Definition accumulator.hxx:738
Definition accumulator.hxx:725
Definition accumulator.hxx:1043
Definition accumulator.hxx:1056
Definition accumulator.hxx:1017
Definition accumulator.hxx:786
Definition accumulator.hxx:883
Definition accumulator.hxx:838
Definition accumulator.hxx:699
Definition accumulator.hxx:1124
Definition accumulator.hxx:1098
Definition accumulator.hxx:1137
Definition accumulator.hxx:433
Definition accumulator.hxx:561
Definition accumulator.hxx:559
Definition accumulator.hxx:501
Definition accumulator.hxx:654
Definition accumulator.hxx:449
Definition accumulator.hxx:475
Definition accumulator.hxx:462
Definition accumulator.hxx:514
Definition accumulator.hxx:546
Definition accumulator.hxx:1082
Definition accumulator.hxx:185
Definition accumulator.hxx:419
Definition accumulator.hxx:367
Definition accumulator.hxx:380
Definition accumulator.hxx:406
Definition accumulator.hxx:254
Definition accumulator.hxx:354
Definition accumulator.hxx:282
Definition accumulator.hxx:315
Definition accumulator.hxx:302
Definition accumulator.hxx:393
Definition accumulator.hxx:35