8#include "idol/mixed-integer/modeling/objects/Object.h"
9#include "idol/mixed-integer/modeling/Types.h"
24 template<
class,
class>
class LinExpr;
28 friend class impl::Env;
42 Var(
Env& t_env,
double t_lb,
double t_ub, VarType t_type,
double t_obj = 0., std::string t_name =
"");
77 Var& operator=(
const Var&) =
default;
78 Var& operator=(
Var&&) =
default;
103 template<
unsigned int N = 1,
unsigned int I = 0>
104 static Vector<
Var, N - I>
make_vector(
Env& t_env,
const Dim<N>& t_dim,
double t_lb,
double t_ub, VarType t_type,
double t_obj,
const std::string& t_name =
"") {
105 return impl::create_many<Var, N, I>(t_dim, t_name.empty() ?
"Var" : t_name, [&](
const std::string& t_name_i) {
106 return Var(t_env, t_lb, t_ub, t_type, t_obj, t_name_i);
110 unsigned int index(
const Model& t_model)
const;
Var(Env &t_env, double t_lb, double t_ub, VarType t_type, double t_obj=0., std::string t_name="")
Var(Env &t_env, double t_lb, double t_ub, VarType t_type, double t_obj, const LinExpr< Ctr, double > &t_column, std::string t_name="")
Var(Env &t_env, double t_lb, double t_ub, VarType t_type, double t_obj, LinExpr< Ctr, double > &&t_column, std::string t_name="")
static Vector< Var, N - I > make_vector(Env &t_env, const Dim< N > &t_dim, double t_lb, double t_ub, VarType t_type, double t_obj, const std::string &t_name="")