prop_redcost.c
Go to the documentation of this file.
24 * This propagator uses the reduced cost of an optimal solved LP relaxation to propagate the variables against the
28 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
62 #define PROP_DELAY FALSE /**< should propagation method be delayed, if other propagators found reductions? */
72 #define DEFAULT_CONTINUOUS FALSE /**< should reduced cost fixing be also applied to continuous variables? */
73 #define DEFAULT_USEIMPLICS FALSE /**< should implications be used to strength the reduced cost for binary variables? */
74 #define DEFAULT_FORCE FALSE /**< should the propagator be forced even if active pricer are present? Note that
90 SCIP_Bool continuous; /**< should reduced cost fixing be also applied to continuous variables? */
93 SCIP_Bool useimplics; /**< should implications be used to strength the reduced cost for binary variables? */
103 /** propagate the given binary variable/column using the root reduced cost stored in the SCIP internal data structures
104 * and check if the implications can be useful. Depending on that implications are used or not used during the search to
139 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
140 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
141 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
160 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
161 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
162 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
180 /* evaluate if the implications are useful; the implications are seen to be useful if they provide an increase for
199 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
200 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
201 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
210 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
211 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
212 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
256 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
257 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
258 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
277 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
278 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
279 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
299 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
300 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
301 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
312 /* second, if the implications should be used and if the implications are seen to be promising use the implied
320 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
321 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
322 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
335 SCIPdebugMsg(scip, "variable <%s>: cutoff (requiredredcost <%g>, lbredcost <%g>, ubredcost <%g>)\n",
342 SCIPdebugMsg(scip, "variable <%s>: fixed 1.0 (requiredredcost <%g>, redcost <%g>, lbredcost <%g>)\n",
350 SCIPdebugMsg(scip, "variable <%s>: fixed 0.0 (requiredredcost <%g>, redcost <%g>, ubredcost <%g>)\n",
382 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
383 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
384 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
424 SCIPdebugMsg(scip, "redcost strengthening upper bound: <%s> [%g,%g] -> [%g,%g] (ub=%g, lb=%g, redcost=%g)\n",
439 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
440 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
441 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
482 SCIPdebugMsg(scip, "redcost strengthening lower bound: <%s> [%g,%g] -> [%g,%g] (ub=%g, lb=%g, redcost=%g)\n",
492 /* SCIPisLPDualReliable should always return TRUE if the dual feasibility check is enabled and the LP claims to
493 * have a dual feasible solution. if the check is disabled the dual solution might be incorrect and the assert
494 * might fail. however, if the user decides to disable the dual feasibility check (which also can lead to wrong
548 /** solving process initialization method of propagator (called when branch and bound process is about to begin) */
636 /* check if all integral variables are fixed and the continuous variables should not be propagated */
646 /* skip the propagator if the problem has only binary variables and those should not be propagated */
657 SCIPdebugMsg(scip, "lpobjval <%g>, cutoffbound <%g>, max reduced <%g>, propgate binary %u, use implics %u\n",
681 SCIP_CALL( propagateRedcostBinvar(scip, propdata, var, cols[c], requiredredcost, &nchgbds, &cutoff) );
720 {
728 SCIP_CALL( SCIPincludePropBasic(scip, &prop, PROP_NAME, PROP_DESC, PROP_PRIORITY, PROP_FREQ, PROP_DELAY, PROP_TIMING,
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:438
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:235
SCIP_EXPORT SCIP_Real SCIPvarGetBestRootLPObjval(SCIP_VAR *var)
Definition: var.c:13583
public methods for SCIP parameter handling
public methods for branch and bound tree
Definition: struct_scip.h:59
public methods for memory management
Definition: struct_var.h:198
public methods for problem variables
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
Definition: scip_var.c:4646
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:48
SCIP_EXPORT SCIP_Real SCIPvarGetBestRootSol(SCIP_VAR *var)
Definition: var.c:13483
static SCIP_RETCODE propagateRedcostVar(SCIP *scip, SCIP_VAR *var, SCIP_COL *col, SCIP_Real lpobjval, SCIP_Real cutoffbound, int *nchgbds)
Definition: prop_redcost.c:369
public methods for SCIP variables
SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1035
SCIP_RETCODE SCIPsetPropCopy(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPCOPY((*propcopy)))
Definition: scip_prop.c:142
public methods for numerical tolerances
SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1011
Definition: struct_lp.h:126
public methods for querying solving statistics
public methods for the branch-and-bound tree
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4677
Definition: type_result.h:35
propagator using the LP reduced cost and the cutoff bound
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:773
type definitions for specific LP solvers interface
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
Definition: scip_prop.c:158
Definition: type_retcode.h:33
Definition: type_result.h:42
Definition: type_lp.h:34
Definition: struct_prop.h:37
SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:1023
public methods for LP management
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4767
public methods for the LP relaxation, rows and columns
public methods for variable pricer plugins
public methods for branching rule plugins and branching
general public methods
static SCIP_RETCODE propagateRootRedcostBinvar(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_COL *col, SCIP_Real cutoffbound, int *nchgbds)
Definition: prop_redcost.c:111
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:786
public methods for message output
Definition: type_lpi.h:82
public methods for message handling
SCIP_Real SCIPgetVarImplRedcost(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing)
Definition: scip_var.c:1913
public methods for propagator plugins
Definition: type_set.h:44
Definition: type_lpi.h:83
Definition: type_retcode.h:43
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:105
Definition: objbenders.h:33
SCIP_RETCODE SCIPsetPropInitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITSOL((*propinitsol)))
Definition: scip_prop.c:206
public methods for global and local (sub)problems
SCIP_EXPORT SCIP_Real SCIPvarGetBestRootRedcost(SCIP_VAR *var)
Definition: var.c:13549
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Definition: scip_var.c:4614
Definition: type_lpi.h:85
Definition: type_lpi.h:84
Definition: type_result.h:39
public methods for propagators