Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
BendersStructsDatas.h
1#pragma once
2
3#include "SubproblemCut.h"
4#include "Worker.h"
5#include "antares-xpansion/xpansion_interfaces/ILogger.h"
6#include "common.h"
7
9{
10 int benders_num_run = 0;
11 std::vector<double> criteria = {};
12 std::vector<double> patterns_values = {};
13 double max_criterion = 0.;
14 double max_criterion_best_it = 0.;
15 double outer_loop_bilevel_best_ub = +1e20;
16 double lambda = 0.;
17 double lambda_min = 0.;
18 double lambda_max = 0.;
19 std::string max_criterion_area = "N/A";
20 std::string max_criterion_area_best_it = "N/A";
21};
22
27{
28 double subproblems_walltime = 0;
29 double subproblems_cputime = 0;
30 double subproblems_cumulative_cputime = 0;
31 double timer_master = 0;
32 double lb = -1e20;
33 double ub = +1e20;
34 double best_ub = +1e20;
35 int it = 0;
36 double iteration_time = 0;
37 bool stop = false;
38 double overall_subpb_cost_under_approx = 0;
39 std::vector<double> single_subpb_costs_under_approx;
40 double subproblem_cost;
41 double invest_cost;
42 int best_it = 0;
43 Point x_in;
44 Point x_out;
45 Point x_cut;
46 Point min_invest;
47 Point max_invest;
48 int nsubproblem = 0;
49 int master_status = SOLVER_STATUS::UNKNOWN;
50 double benders_time = 0;
51 StoppingCriterion stopping_criterion = StoppingCriterion::empty;
52 bool is_in_initial_relaxation = false;
53 int number_of_subproblem_solved = 0;
54 int cumulative_number_of_subproblem_solved = 0;
55 int min_simplexiter;
56 int max_simplexiter;
57 // ugly
58 CriteriaCurrentIterationData criteria_current_iteration_data;
59};
60
61// /*! \struct to store benders cuts data
62// */
63// struct BendersCuts {
64// Point x_cut;
65// SubProblemDataMap subsProblemDataMap;
66// };
67
68// using BendersCutsPerIteration = std::vector<BendersCuts>;
69
75{
76public:
77 WorkerMasterData() = default;
78
79 bool _valid = false;
80 double _lb;
81 double _ub;
82 double _best_ub;
83 double _master_duration;
84 double _subproblem_duration;
85 PointPtr _x_in;
86 PointPtr _x_out;
87 PointPtr _x_cut;
88 PointPtr _min_invest;
89 PointPtr _max_invest;
90 SubProblemDataMap _cut_trace;
91
92 double _invest_cost;
93 double _operational_cost;
94
95 Point get_x_cut() const;
96 Point get_min_invest() const;
97 Point get_max_invest() const;
98};
99
105
106using WorkerMasterDataVect = std::vector<WorkerMasterData>;
Class use to store trace information during the algorithm run.
Definition BendersStructsDatas.h:75
Point get_x_cut() const
Get point.
Definition BendersStructsDatas.cpp:6
Definition BendersStructsDatas.h:101
Definition BendersStructsDatas.h:9
Definition BendersStructsDatas.h:27