idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
Factory.h
1//
2// Created by henri on 06.11.23.
3//
4
5#ifndef IDOL_LOGS_DANTZIGWOLFE_FACTORY_H
6#define IDOL_LOGS_DANTZIGWOLFE_FACTORY_H
7
8#include "idol/general/numericals.h"
9#include "idol/general/utils/types.h"
10
11namespace idol::Logs::DantzigWolfe {
12 class Factory;
13}
14
16public:
17 virtual ~Factory() = default;
18
19 class Strategy {
20 public:
21 virtual ~Strategy() = default;
22
23 virtual void log_init(unsigned int t_n_sub_problems) = 0;
24
25 virtual void log_master(unsigned int t_iteration,
26 double t_total_time,
27 SolutionStatus t_problem_status,
28 SolutionStatus t_last_master_status,
29 SolutionReason t_last_master_reason,
30 double t_last_master_objective,
31 double t_last_master_time,
32 double t_best_bound,
33 double t_best_obj,
34 unsigned int t_n_generated_columns,
35 unsigned int t_n_present_columns) = 0;
36
37 virtual void log_sub_problem(unsigned int t_iteration,
38 double t_total_time,
39 unsigned int t_sub_problem_id,
40 SolutionStatus t_problem_status,
41 SolutionStatus t_sub_problem_status,
42 SolutionReason t_sub_problem_reason,
43 double t_sub_problem_objective,
44 double t_sub_problem_time,
45 double t_best_bound,
46 double t_best_obj,
47 unsigned int t_n_generated_columns,
48 unsigned int t_n_present_columns) = 0;
49
50 virtual void log_end() = 0;
51 };
52
53 virtual Strategy* operator()() const = 0;
54
55 [[nodiscard]] virtual Factory* clone() const = 0;
56};
57
58#endif //IDOL_LOGS_DANTZIGWOLFE_FACTORY_H