presol_inttobinary.c
Go to the documentation of this file.
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
41 #define PRESOL_PRIORITY +7000000 /**< priority of the presolver (>= 0: before, < 0: after constraint handlers) */
42 #define PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */
43 #define PRESOL_TIMING SCIP_PRESOLTIMING_FAST /* timing of the presolver (fast, medium, or exhaustive) */
90 /* copy the integer variables into an own array, since adding binary variables affects the left-most slots in the
107 /* check if bounds are exactly one apart; if the lower bound is too large, aggregations will be rejected */
116 SCIPdebugMsg(scip, "converting <%s>[%g,%g] into binary variable\n", SCIPvarGetName(vars[v]), lb, ub);
143 SCIP_CALL( SCIPaggregateVars(scip, vars[v], binvar, 1.0, -1.0, lb, &infeasible, &redundant, &aggregated) );
148 /* it can be the case that this aggregation detects an infeasibility; for example, during the copy of the
149 * variable bounds from the integer variable to the binary variable, infeasibility can be detected; this can
150 * happen because an upper bound or a lower bound of such a variable bound variable was "just" changed and the
151 * varbound constraint handler, who would detect that infeasibility (since it was creating it from a varbound
152 * constraint), was called before that bound change was detected due to the presolving priorities;
193 SCIP_CALL( SCIPincludePresolBasic(scip, &presolptr, PRESOL_NAME, PRESOL_DESC, PRESOL_PRIORITY, PRESOL_MAXROUNDS, PRESOL_TIMING,
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:438
Definition: struct_presol.h:37
Definition: type_result.h:33
Definition: struct_scip.h:59
public methods for memory management
Definition: type_result.h:49
Definition: struct_var.h:198
public methods for presolving plugins
Definition: type_var.h:53
public methods for problem variables
#define SCIPduplicateBufferArray(scip, ptr, source, num)
Definition: scip_mem.h:119
public methods for SCIP variables
static SCIP_DECL_PRESOLEXEC(presolExecInttobinary)
Definition: presol_inttobinary.c:66
public methods for numerical tolerances
Definition: struct_sol.h:64
Definition: type_result.h:35
Definition: type_retcode.h:33
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLCOPY((*presolcopy)))
Definition: scip_presol.c:130
public data structures and miscellaneous methods
Definition: type_var.h:54
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:105
methods for debugging
public methods for presolvers
public methods for message output
static SCIP_DECL_PRESOLCOPY(presolCopyInttobinary)
Definition: presol_inttobinary.c:51
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:95
public methods for message handling
presolver that converts integer variables with domain [a,a+1] to binaries
SCIP_RETCODE SCIPincludePresolInttobinary(SCIP *scip)
Definition: presol_inttobinary.c:182
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:8375
Definition: objbenders.h:33
public methods for global and local (sub)problems
Definition: type_result.h:39
memory allocation routines