5#ifndef IDOL_READ_FROM_FILE_H
6#define IDOL_READ_FROM_FILE_H
9#include "idol/mixed-integer/modeling/models/Model.h"
10#include "Description.h"
12namespace idol::Bilevel {
16 read_from_file(Env &t_env,
17 const std::string &t_path_to_aux,
19 const std::function<Model(Env &,
const std::string &)> &t_mps_reader);
22 template<
class BackendT> Model read_from_file(Env& t_env,
const std::string& t_path_to_aux, Bilevel::Description& t_lower_level_description);
24 template<
class BackendT> std::pair<Model, Bilevel::Description> read_from_file(Env& t_env,
const std::string& t_path_to_aux);
28template<
class BackendT>
30idol::Bilevel::read_from_file(
idol::Env& t_env,
31 const std::string& t_path_to_aux,
34 return idol::Bilevel::impl::read_from_file(t_env, t_path_to_aux, t_lower_level_description, [](Env& t_env,
const std::string& t_file) {
return BackendT::read_from_file(t_env, t_file); });
37template<
class BackendT>
38std::pair<idol::Model, idol::Bilevel::Description>
39idol::Bilevel::read_from_file(
idol::Env& t_env,
40 const std::string& t_path_to_aux) {
42 Bilevel::Description lower_level_description(t_env);
44 auto high_point_relaxation = Bilevel::impl::read_from_file(t_env, t_path_to_aux, lower_level_description,[](Env& t_env,
const std::string& t_file) {
return BackendT::read_from_file(t_env, t_file); });
47 std::move(high_point_relaxation),
48 std::move(lower_level_description)