Antares Simulator
Power System Simulator
options.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 <string>
24 
25 namespace Antares::Solver::Optimization
26 {
28 {
29  std::string solverName = "sirius";
30  std::string solverParameters;
31 
32  // Reusing basis of first optimization (in case we have 2 weekly
33  // linear optimizations [not MILP])
34  bool solverUsesBasis = false;
35  bool solverExportsBasis = false;
36 
37  bool solverLogs = false;
38 };
39 
41 {
42  std::string linearSolver = "sirius";
43  std::string linearSolverParameters;
44  std::string lpSolverParamOptim1;
45  std::string lpSolverParamOptim2;
46  bool useOptim1BasisInNextWeek = true;
47  bool useOptim1BasisInOptim2 = true;
48  std::string quadraticSolver = "sirius";
49  std::string quadraticSolverParameters;
50  bool solverLogs = false;
51 };
52 
53 enum class ExportBehavior
54 {
55  // Never export structure problems
56  Never,
57  // Export once, on the first call
58  Once,
59  // Always export the structure problems
60  Always
61 };
62 
64 {
65 public:
66  void initializeWith(const CmdLineOptimOptions& cmdLineOptimOptions);
67 
68  SingleOptimOptions firstOptimOptions;
69  SingleOptimOptions secondOptimOptions;
70  SingleOptimOptions quadraticOptimOptions;
71  bool solverLogs = false;
72  ExportBehavior exportBehavior = ExportBehavior::Never;
73 };
74 } // namespace Antares::Solver::Optimization