presol_inttobinary.c
Go to the documentation of this file.
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
50 #define PRESOL_PRIORITY +7000000 /**< priority of the presolver (>= 0: before, < 0: after constraint handlers) */
51 #define PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */
52 #define PRESOL_TIMING SCIP_PRESOLTIMING_FAST /* timing of the presolver (fast, medium, or exhaustive) */
99 /* copy the integer variables into an own array, since adding binary variables affects the left-most slots in the
116 /* check if bounds are exactly one apart; if the lower bound is too large, aggregations will be rejected */
125 SCIPdebugMsg(scip, "converting <%s>[%g,%g] into binary variable\n", SCIPvarGetName(vars[v]), lb, ub);
152 SCIP_CALL( SCIPaggregateVars(scip, vars[v], binvar, 1.0, -1.0, lb, &infeasible, &redundant, &aggregated) );
157 /* it can be the case that this aggregation detects an infeasibility; for example, during the copy of the
158 * variable bounds from the integer variable to the binary variable, infeasibility can be detected; this can
159 * happen because an upper bound or a lower bound of such a variable bound variable was "just" changed and the
160 * varbound constraint handler, who would detect that infeasibility (since it was creating it from a varbound
161 * constraint), was called before that bound change was detected due to the presolving priorities;
202 SCIP_CALL( SCIPincludePresolBasic(scip, &presolptr, PRESOL_NAME, PRESOL_DESC, PRESOL_PRIORITY, PRESOL_MAXROUNDS, PRESOL_TIMING,
SCIP_RETCODE SCIPincludePresolBasic(SCIP *scip, SCIP_PRESOL **presolptr, const char *name, const char *desc, int priority, int maxrounds, SCIP_PRESOLTIMING timing, SCIP_DECL_PRESOLEXEC((*presolexec)), SCIP_PRESOLDATA *presoldata)
Definition: scip_presol.c:105
Definition: struct_presol.h:46
Definition: type_result.h:42
Definition: struct_scip.h:68
public methods for memory management
Definition: type_result.h:58
Definition: struct_var.h:207
public methods for presolving plugins
Definition: type_var.h:62
public methods for problem variables
#define SCIPduplicateBufferArray(scip, ptr, source, num)
Definition: scip_mem.h:132
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:447
public methods for SCIP variables
static SCIP_DECL_PRESOLEXEC(presolExecInttobinary)
Definition: presol_inttobinary.c:75
public methods for numerical tolerances
Definition: struct_sol.h:73
Definition: type_result.h:44
Definition: type_retcode.h:42
public data structures and miscellaneous methods
Definition: type_var.h:63
methods for debugging
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
Definition: scip_var.c:114
public methods for presolvers
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLCOPY((*presolcopy)))
Definition: scip_presol.c:140
public methods for message output
static SCIP_DECL_PRESOLCOPY(presolCopyInttobinary)
Definition: presol_inttobinary.c:60
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
Definition: scip_var.c:8407
SCIP_RETCODE SCIPincludePresolInttobinary(SCIP *scip)
Definition: presol_inttobinary.c:191
public methods for message handling
presolver that converts integer variables with domain [a,a+1] to binaries
Definition: objbenders.h:43
public methods for global and local (sub)problems
Definition: type_result.h:48
memory allocation routines