Loading...
Searching...
No Matches
MibS.h
1//
2// Created by henri on 01.02.24.
3//
4
5#ifndef IDOL_MIBS_H
6#define IDOL_MIBS_H
7
8#include <memory>
9#include "idol/general/optimizers/OptimizerFactory.h"
10#include "idol/bilevel/modeling/Description.h"
11#include "idol/mixed-integer/optimizers/callbacks/CallbackFactory.h"
12#include "idol/bilevel/optimizers/BilevelOptimizerInterface.h"
13
14namespace idol::Bilevel {
15 class MibS;
16}
17
18class OsiSolverInterface;
19
21 const Bilevel::Description* m_description = nullptr;
22
23 std::optional<bool> m_use_file_interface;
24 std::optional<std::string> m_native_feasibility_checker;
25 std::unique_ptr<OptimizerFactory> m_feasibility_checker_optimizer;
26
27 std::list<std::unique_ptr<CallbackFactory>> m_callbacks;
28protected:
29 [[nodiscard]] Optimizer *create(const Model &t_model) const override;
30public:
31 MibS() = default;
32
33 explicit MibS(const Bilevel::Description& t_description);
34
35 MibS(const MibS& t_src);
36 MibS(MibS&&) noexcept = delete;
37
38 MibS& operator=(const MibS&) = delete;
39 MibS& operator=(MibS&&) noexcept = delete;
40
41 void set_bilevel_description(const Description &t_bilevel_description) override;
42
43 MibS& with_native_feasibility_checker(const std::string& t_native_feasibility_checker);
44
45 MibS& with_feasibility_checker(const OptimizerFactory& t_feasibility_checker);
46
47 MibS& with_file_interface(bool t_value);
48
49 MibS& add_callback(const CallbackFactory& t_cb);
50
51 [[nodiscard]] MibS *clone() const override;
52};
53
54#endif //IDOL_MIBS_H