4 #include "../manager/solvers.hpp"
5 #include "generated_config.hpp"
7 #include "../util/log.hpp"
9 class AdditionalResultStorage;
14 template <
unsigned int>
18 #if defined(GUROBI_FOUND)
19 #include "../contrib/ilpabstraction/src/ilpa_gurobi.hpp"
22 #if defined(CPLEX_FOUND)
23 #include "../contrib/ilpabstraction/src/ilpa_cplex.hpp"
26 template <
class SolverT>
27 class FBILP :
public ILPBase<SolverT> {
29 FBILP(
const Instance & instance, AdditionalResultStorage & additional,
30 const SolverConfig & sconf);
33 static std::string get_id();
38 using Base = ILPBase<SolverT>;
39 using MIPSolver =
typename Base::MIPSolver;
40 using Model =
typename Base::Model;
41 using Variable =
typename Base::Variable;
42 using Expression =
typename Base::Expression;
43 using VarType =
typename Base::VarType;
44 using ParamType =
typename Base::ParamType;
45 using ModelStatus =
typename Base::ModelStatus;
46 using Constraint =
typename Base::Constraint;
48 const bool proxy_flow;
49 std::vector<std::optional<const Job *>> proxies;
52 std::vector<std::unordered_map<unsigned int, Variable>> sequence_vars;
55 std::vector<std::vector<std::unordered_map<unsigned int, Variable>>>
59 std::vector<std::vector<Variable>> inflow_vars;
61 void prepare_variables();
62 void prepare_sequence_constraints();
63 void prepare_flow_constraints();
64 void prepare_objective();
68 bool dbg_verify_variables();
73 #if defined(GUROBI_FOUND)
76 solvers::get_free_N<FBILP<ilpabstraction::GurobiInterface>>()>
78 constexpr
static unsigned int my_N =
79 solvers::get_free_N<FBILP<ilpabstraction::GurobiInterface>>();
84 return solvers::register_class<FBILP<ilpabstraction::GurobiInterface>,
90 #if defined(CPLEX_FOUND)
93 solvers::get_free_N<FBILP<ilpabstraction::CPLEXInterface>>()>
95 constexpr
static unsigned int my_N =
96 solvers::get_free_N<FBILP<ilpabstraction::CPLEXInterface>>();
101 return solvers::register_class<FBILP<ilpabstraction::CPLEXInterface>,