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