Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
SimulationOptions.h
1#pragma once
2
3#include "common.h"
4
6 public:
7#define BENDERS_OPTIONS_MACRO(name__, type__, default__, \
8 deserialization_method__) \
9 type__ name__;
10#include "SimulationOptions.hxx"
11#undef BENDERS_OPTIONS_MACRO
12
14 explicit SimulationOptions(const std::filesystem::path &options_filename);
15
16 void read(const std::filesystem::path &file_name);
17 void print(std::ostream &stream) const;
18 BendersBaseOptions get_benders_options() const;
19 BaseOptions get_base_options() const;
20 ExternalLoopOptions GetExternalLoopOptions() const;
21
22 void write_default() const;
23 Str2Dbl _weights;
24
25 private:
26 void set_weights();
27 Json::Value get_value_from_json(const std::filesystem::path &file_name);
28
29 class InvalidOptionFileException : public std::runtime_error {
30 public:
31 explicit InvalidOptionFileException(const std::string &arg);
32 };
33};
Definition SimulationOptions.h:5
SimulationOptions(const std::filesystem::path &options_filename)
Constructor of Benders Options.
Definition SimulationOptions.cpp:30
void print(std::ostream &stream) const
Print all Benders options.
Definition SimulationOptions.cpp:119
void write_default() const
Write default options in "options_default" txt file.
Definition SimulationOptions.cpp:53
void read(const std::filesystem::path &file_name)
Read Benders options from file path.
Definition SimulationOptions.cpp:64
Definition common.h:146
Definition common.h:171
Definition common.h:166