Antares Simulator
Power System Simulator
additionalConstraints.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 
22 #pragma once
23 #include <set>
24 #include <string>
25 #include <vector>
26 
27 #include "antares/series/series.h"
28 
29 namespace Antares::Data::ShortTermStorage
30 {
31 
33 {
34 public:
35  std::set<int> hours;
36  unsigned int globalIndex = 0;
37  unsigned int localIndex = 0;
38  bool hasValidHoursRange() const;
39 };
40 
42 
43 {
44  bool ok;
45  std::string error_msg;
46 };
47 
49 {
50 public:
52  AdditionalConstraints(std::string name,
53  std::string id,
54  std::string cluster_id,
55  std::string variable,
56  std::string operatorType,
57  bool enabled,
58  std::vector<SingleAdditionalConstraint> constraints);
59 
61  AdditionalConstraints& operator=(const AdditionalConstraints&) = delete;
62 
63  AdditionalConstraints(AdditionalConstraints&& other) noexcept = delete;
64  AdditionalConstraints& operator=(AdditionalConstraints&& other) noexcept = delete;
65 
66  ~AdditionalConstraints() = default;
67 
68  std::string name;
69  std::string id;
70  std::string cluster_id;
71  std::string variable;
72  std::string operatorType;
73  bool enabled = true;
74  std::vector<SingleAdditionalConstraint> constraints;
75 
76  // Number of enabled constraints
77  std::size_t enabledConstraintsCount() const;
78 
79  TimeSeries& rhs()
80  {
81  return timeSeries;
82  }
83 
84  const TimeSeries& rhs() const
85  {
86  return timeSeries;
87  }
88 
89  TimeSeriesNumbers timeseriesNumbers;
90  TimeSeries timeSeries;
91 };
92 
93 ValidateResult validate(const AdditionalConstraints&);
94 
95 } // namespace Antares::Data::ShortTermStorage
Definition: additionalConstraints.h:49
Definition: series.h:42
This class is used to represent the generic time series.
Definition: series.h:65
Definition: additionalConstraints.h:43