CallbackBase::AddLazyConstr()
Add a lazy constraint to model.
Synopsis
void AddLazyConstr(
const Expr &lhs,
char sense,
double rhs)
Arguments
lhs
: expression for lazy contraint.
sense
: sense for lazy constraint.
rhs
: right hand side value for lazy constraint.
CallbackBase::AddLazyConstr()
Add a lazy constraint to model.
Synopsis
void AddLazyConstr(
const Expr &lhs,
char sense,
const Expr &rhs)
Arguments
lhs
: left hand side expression for lazy contraint.
sense
: sense for lazy constraint.
rhs
: right hand side expression for lazy contraint.
CallbackBase::AddLazyConstr()
Add a lazy constraint to model.
Synopsis
void AddLazyConstr(const ConstrBuilder &builder)
Arguments
builder
: builder for lazy contraint.
CallbackBase::AddLazyConstrs()
Add lazy constraints to model.
Synopsis
void AddLazyConstrs(const ConstrBuilderArray &builders)
Arguments
builders
: array of builders for lazy contraints.
CallbackBase::AddUserCut()
Add a user cut to model.
Synopsis
void AddUserCut(
const Expr &lhs,
char sense,
double rhs)
Arguments
lhs
: expression for user cut.
sense
: sense for user cut.
rhs
: right hand side value for user cut.
CallbackBase::AddUserCut()
Add a user cut to model.
Synopsis
void AddUserCut(
const Expr &lhs,
char sense,
const Expr &rhs)
Arguments
lhs
: left hand side expression for user cut.
sense
: sense for user cut.
rhs
: right hand side expression for user cut.
CallbackBase::AddUserCut()
Add a user cut to model.
Synopsis
void AddUserCut(const ConstrBuilder &builder)
Arguments
builder
: builder for user cut.
CallbackBase::AddUserCuts()
Add user cuts to model.
Synopsis
void AddUserCuts(const ConstrBuilderArray &builders)
Arguments
builders
: array of builders for user cuts.
CallbackBase::GetDblInfo()
Get double value of given information name in callback.
Synopsis
double GetDblInfo(const char *cbinfo)
Arguments
cbinfo
: name of callback info.Return
value of desired information.
CallbackBase::GetIncumbent()
Get best feasible solution of given variable in callback.
Synopsis
double GetIncumbent(Var &var)
Arguments
var
: given variable.Return
best feasible solution of given variable.
CallbackBase::GetIncumbent()
Get best feasible solution of variables in callback.
Synopsis
int GetIncumbent(VarArray &vars, double *pOut)
Arguments
vars
: an array of variables.
pOut
: best feasible solution of desired variables.Return
the number of valid variables. If failed, return -1.
CallbackBase::GetIncumbent()
Get best feasible solution of all variables in callback.
Synopsis
int GetIncumbent(double *pOut, int len)
Arguments
pOut
: optional, output best feasible solution of all variables.
len
: the length of output array. The solution is written up to number of len.Return
number of all variables. Return -1 if error occurs.
CallbackBase::GetIntInfo()
Get integer value of given information name in callback.
Synopsis
int GetIntInfo(const char *cbinfo)
Arguments
cbinfo
: name of callback info.Return
value of desired information.
CallbackBase::GetRelaxSol()
Get LP-relaxation solution of given variable in callback.
Synopsis
double GetRelaxSol(Var &var)
Arguments
var
: given variable.Return
LP-relaxation solution of given variable.
CallbackBase::GetRelaxSol()
Get LP-relaxation solution of variables in callback.
Synopsis
int GetRelaxSol(VarArray &vars, double *pOut)
Arguments
vars
: an array of variables.
pOut
: LP-relaxation solution of desired variables.Return
the number of valid variables. If failed, return -1.
CallbackBase::GetRelaxSol()
Get LP-relaxation solution of all variables in callback.
Synopsis
int GetRelaxSol(double *pOut, int len)
Arguments
pOut
: optional, output LP-relaxation solution of all variables.
len
: the length of output array. The solution is written up to number of len.Return
number of all variables. Return -1 if error occurs.
CallbackBase::GetSolution()
Get solution of given variable in callback.
Synopsis
double GetSolution(Var &var)
Arguments
var
: given variable.Return
solution of desired variable.
CallbackBase::GetSolution()
Get solution of variables in callback.
Synopsis
int GetSolution(VarArray &vars, double *pOut)
Arguments
vars
: an array of variables.
pOut
: solution of desired variables.Return
the number of valid variables. If failed, return -1.
CallbackBase::GetSolution()
Get solution of all variables in callback.
Synopsis
int GetSolution(double *pOut, int len)
Arguments
pOut
: optional, output solution of all variables.
len
: the length of output array. The solution is written up to number of len.Return
number of all variables. Return -1 if error occurs.
CallbackBase::Interrupt()
Interrupt solving problems in callback
Synopsis
void Interrupt()
CallbackBase::LoadSolution()
Load customized solution to model.
Synopsis
double LoadSolution()
Return
objective value of given solution.
CallbackBase::SetSolution()
Set solution of a given variable in callback.
Synopsis
void SetSolution(Var &var, double val)
Arguments
var
: a variable object.
val
: double value.
CallbackBase::SetSolution()
Set solution of variables in callback.
Synopsis
void SetSolution(
VarArray &vars,
const double *vals,
int len)
Arguments
vars
: an array of variable objects.
vals
: an array of double values.
len
: length of array of double values.
CallbackBase::Where()
Get context in callback.
Synopsis
int Where()
Return
integer value of context.