prop_redcost.c
Go to the documentation of this file.
23 * This propagator uses the reduced cost of an optimal solved LP relaxation to propagate the variables against the
27 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
61 #define PROP_DELAY FALSE /**< should propagation method be delayed, if other propagators found reductions? */
71 #define DEFAULT_CONTINUOUS FALSE /**< should reduced cost fixing be also applied to continuous variables? */
72 #define DEFAULT_USEIMPLICS TRUE /**< should implications be used to strength the reduced cost for binary variables? */
73 #define DEFAULT_FORCE FALSE /**< should the propagator be forced even if active pricer are present? Note that
89 SCIP_Bool continuous; /**< should reduced cost fixing be also applied to continuous variables? */
92 SCIP_Bool useimplics; /**< should implications be used to strength the reduced cost for binary variables? */
102 /** propagate the given binary variable/column using the root reduced cost stored in the SCIP internal data structures
103 * and check if the implications can be useful. Depending on that implications are used or not used during the search to
137 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
138 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
139 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
158 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
159 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
160 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
178 /* evaluate if the implications are useful; the implications are seen to be useful if they provide an increase for
197 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
198 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
199 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
208 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
209 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
210 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
254 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
255 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
256 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
275 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
276 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
277 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
297 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
298 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
299 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
310 /* second, if the implications should be used and if the implications are seen to be promising use the implied
318 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
319 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
320 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
333 SCIPdebugMsg(scip, "variable <%s>: cutoff (requiredredcost <%g>, lbredcost <%g>, ubredcost <%g>)\n",
340 SCIPdebugMsg(scip, "variable <%s>: fixed 1.0 (requiredredcost <%g>, redcost <%g>, lbredcost <%g>)\n",
348 SCIPdebugMsg(scip, "variable <%s>: fixed 0.0 (requiredredcost <%g>, redcost <%g>, ubredcost <%g>)\n",
380 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
381 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
382 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
422 SCIPdebugMsg(scip, "redcost strengthening upper bound: <%s> [%g,%g] -> [%g,%g] (ub=%g, lb=%g, redcost=%g)\n",
437 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
438 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
439 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
480 SCIPdebugMsg(scip, "redcost strengthening lower bound: <%s> [%g,%g] -> [%g,%g] (ub=%g, lb=%g, redcost=%g)\n",
490 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
491 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
492 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
546 /** solving process initialization method of propagator (called when branch and bound process is about to begin) */
634 /* check if all integral variables are fixed and the continuous variables should not be propagated */
644 /* skip the propagator if the problem has only binary variables and those should not be propagated */
655 SCIPdebugMsg(scip, "lpobjval <%g>, cutoffbound <%g>, max reduced <%g>, propgate binary %u, use implics %u\n",
679 SCIP_CALL( propagateRedcostBinvar(scip, propdata, var, cols[c], requiredredcost, &nchgbds, &cutoff) );
718 {
726 SCIP_CALL( SCIPincludePropBasic(scip, &prop, PROP_NAME, PROP_DESC, PROP_PRIORITY, PROP_FREQ, PROP_DELAY, PROP_TIMING,
Definition: type_result.h:33
static SCIP_RETCODE propagateRedcostBinvar(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_COL *col, SCIP_Real requiredredcost, int *nchgbds, SCIP_Bool *cutoff)
Definition: prop_redcost.c:233
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:851
public methods for SCIP parameter handling
public methods for branch and bound tree
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:864
Definition: struct_scip.h:58
public methods for memory management
Definition: struct_var.h:198
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
Definition: scip_var.c:4582
SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1089
public methods for problem variables
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4613
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:516
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Definition: scip_var.c:4550
static SCIP_RETCODE propagateRedcostVar(SCIP *scip, SCIP_VAR *var, SCIP_COL *col, SCIP_Real lpobjval, SCIP_Real cutoffbound, int *nchgbds)
Definition: prop_redcost.c:367
public methods for SCIP variables
public methods for numerical tolerances
Definition: struct_lp.h:126
public methods for querying solving statistics
public methods for the branch-and-bound tree
SCIP_Real SCIPvarGetBestRootLPObjval(SCIP_VAR *var)
Definition: var.c:13291
Definition: type_result.h:35
propagator using the LP reduced cost and the cutoff bound
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4703
type definitions for specific LP solvers interface
Definition: type_retcode.h:33
Definition: type_result.h:42
SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1113
Definition: type_lp.h:34
Definition: struct_prop.h:37
public methods for LP management
SCIP_RETCODE SCIPsetPropCopy(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPCOPY((*propcopy)))
Definition: scip_prop.c:221
public methods for the LP relaxation, rows and columns
public methods for variable pricer plugins
public methods for branching rule plugins and branching
SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1101
general public methods
SCIP_Real SCIPgetVarImplRedcost(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing)
Definition: scip_var.c:1911
static SCIP_RETCODE propagateRootRedcostBinvar(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_COL *col, SCIP_Real cutoffbound, int *nchgbds)
Definition: prop_redcost.c:110
public methods for message output
Definition: type_lpi.h:81
SCIP_RETCODE SCIPsetPropInitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITSOL((*propinitsol)))
Definition: scip_prop.c:285
public methods for message handling
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
Definition: scip_prop.c:237
public methods for propagator plugins
Definition: type_set.h:44
Definition: type_lpi.h:82
Definition: type_retcode.h:43
Definition: objbenders.h:33
public methods for global and local (sub)problems
Definition: type_lpi.h:84
Definition: type_lpi.h:83
Definition: type_result.h:39
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:129
public methods for propagators
SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)
Definition: scip_prop.c:184