Antares Simulator
Power System Simulator
Scenario.h
1 // Copyright 2007-2025, RTE (https://www.rte-france.com)
2 // See AUTHORS.txt
3 // SPDX-License-Identifier: MPL-2.0
4 // This file is part of Antares-Simulator,
5 // Adequacy and Performance assessment for interconnected energy networks.
6 //
7 // Antares_Simulator is free software: you can redistribute it and/or modify
8 // it under the terms of the Mozilla Public Licence 2.0 as published by
9 // the Mozilla Foundation, either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // Antares_Simulator is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // Mozilla Public Licence 2.0 for more details.
16 //
17 // You should have received a copy of the Mozilla Public Licence 2.0
18 // along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
19 
20 #pragma once
21 #include <map>
22 #include <stdexcept>
23 
24 #include "antares/optimisation/linear-problem-api/IScenario.h"
25 
26 namespace Antares::Optimisation::LinearProblemDataImpl
27 {
29 {
30 public:
31  using IScenario::IScenario;
32 
33  [[nodiscard]] TimeSeriesNumber getData(Year year) const override;
34 
35  void setTimeSerieNumber(Year year, TimeSeriesNumber timeSeriesNumber);
36 
37  class AlreadyExists final: public std::invalid_argument
38  {
39  public:
40  explicit AlreadyExists(const std::string& groupId);
41  };
42 
43  class ScenarioNotExist final: public std::invalid_argument
44  {
45  public:
46  explicit ScenarioNotExist(const std::string& groupId, Year year);
47  };
48 
49 private:
50  std::map<Year, TimeSeriesNumber> timeSerieData_;
51 };
52 } // namespace Antares::Optimisation::LinearProblemDataImpl
Interface for scenarios in the linear problem API. A scenario is an association of years to their res...
Definition: IScenario.h:36