67#define PROP_NAME "redcost"
68#define PROP_DESC "reduced cost strengthening propagator"
69#define PROP_TIMING SCIP_PROPTIMING_DURINGLPLOOP | SCIP_PROPTIMING_AFTERLPLOOP
70#define PROP_PRIORITY +1000000
72#define PROP_DELAY FALSE
82#define DEFAULT_CONTINUOUS FALSE
83#define DEFAULT_USEIMPLICS FALSE
84#define DEFAULT_FORCE FALSE
157 propdata->maxredcost =
MAX(propdata->maxredcost, -rootredcost);
159 if( rootlpobjval - rootredcost > cutoffbound )
178 propdata->maxredcost =
MAX(propdata->maxredcost, rootredcost);
180 if( rootlpobjval + rootredcost > cutoffbound )
193 if( !propdata->usefullimplics )
234 propdata->usefullimplics = (lbredcost < 0.0) || (ubredcost > 0.0);
273 if( redcost > requiredredcost )
275 SCIPdebugMsg(
scip,
"variable <%s>: fixed 0.0 (requiredredcost <%g>, redcost <%g>)\n",
294 if( -redcost > requiredredcost )
296 SCIPdebugMsg(
scip,
"variable <%s>: fixed 1.0 (requiredredcost <%g>, redcost <%g>)\n",
325 if( propdata->useimplics && propdata->usefullimplics )
343 if( -lbredcost > requiredredcost && ubredcost > requiredredcost )
345 SCIPdebugMsg(
scip,
"variable <%s>: cutoff (requiredredcost <%g>, lbredcost <%g>, ubredcost <%g>)\n",
350 else if( -lbredcost > requiredredcost )
352 SCIPdebugMsg(
scip,
"variable <%s>: fixed 1.0 (requiredredcost <%g>, redcost <%g>, lbredcost <%g>)\n",
358 else if( ubredcost > requiredredcost )
360 SCIPdebugMsg(
scip,
"variable <%s>: fixed 0.0 (requiredredcost <%g>, redcost <%g>, ubredcost <%g>)\n",
368 propdata->maxredcost =
MAX3(propdata->maxredcost, -lbredcost, ubredcost);
416 newub = (cutoffbound - lpobjval) / redcost + oldlb;
426 strengthen = (newub < oldub - 0.5);
434 SCIPdebugMsg(
scip,
"redcost strengthening upper bound: <%s> [%g,%g] -> [%g,%g] (ub=%g, lb=%g, redcost=%g)\n",
435 SCIPvarGetName(
var), oldlb, oldub, oldlb, newub, cutoffbound, lpobjval, redcost);
473 newlb = (cutoffbound - lpobjval) / redcost + oldub;
483 strengthen = (newlb > oldlb + 0.5);
492 SCIPdebugMsg(
scip,
"redcost strengthening lower bound: <%s> [%g,%g] -> [%g,%g] (ub=%g, lb=%g, redcost=%g)\n",
493 SCIPvarGetName(
var), oldlb, oldub, newlb, oldub, cutoffbound, lpobjval, redcost);
567 propdata->usefullimplics =
FALSE;
568 propdata->maxredcost = 0.0;
654 propbinvars = (
SCIPgetDepth(
scip) == 0) || (cutoffbound - lpobjval < 5 * propdata->maxredcost);
665 requiredredcost = cutoffbound - lpobjval;
667 SCIPdebugMsg(
scip,
"lpobjval <%g>, cutoffbound <%g>, max reduced <%g>, propgate binary %u, use implics %u\n",
668 lpobjval, cutoffbound, propdata->maxredcost, propbinvars, propdata->usefullimplics);
708 else if( nchgbds > 0 )
734 propExecRedcost, propdata) );
746 "should reduced cost fixing be also applied to continuous variables?",
750 "should implications be used to strength the reduced cost for binary variables?",
754 "should the propagator be forced even if active pricer are present?",
#define SCIP_LONGINT_FORMAT
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNObjVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
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)
SCIP_RETCODE SCIPincludePropRedcost(SCIP *scip)
int SCIPgetNPseudoBranchCands(SCIP *scip)
SCIP_Real SCIPgetColRedcost(SCIP *scip, SCIP_COL *col)
SCIP_Real SCIPcolGetMinPrimsol(SCIP_COL *col)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_Real SCIPcolGetLb(SCIP_COL *col)
SCIP_Real SCIPcolGetUb(SCIP_COL *col)
SCIP_BASESTAT SCIPcolGetBasisStatus(SCIP_COL *col)
SCIP_Real SCIPcolGetMaxPrimsol(SCIP_COL *col)
SCIP_Bool SCIPisExact(SCIP *scip)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
SCIP_Bool SCIPisLPRelax(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_COL ** SCIPgetLPCols(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
int SCIPgetNLPCols(SCIP *scip)
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
SCIP_Bool SCIPisLPDualReliable(SCIP *scip)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
int SCIPgetNActivePricers(SCIP *scip)
void SCIPpropSetData(SCIP_PROP *prop, SCIP_PROPDATA *propdata)
SCIP_RETCODE SCIPsetPropCopy(SCIP *scip, SCIP_PROP *prop,)
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)
const char * SCIPpropGetName(SCIP_PROP *prop)
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropInitsol(SCIP *scip, SCIP_PROP *prop,)
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)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetBestRootSol(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Real SCIPgetVarRedcost(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetBestRootRedcost(SCIP_VAR *var)
SCIP_Real SCIPvarGetBestRootLPObjval(SCIP_VAR *var)
SCIP_Real SCIPgetVarImplRedcost(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
assert(minobj< SCIPgetCutoffbound(scip))
#define DEFAULT_CONTINUOUS
#define DEFAULT_USEIMPLICS
static SCIP_RETCODE propagateRedcostBinvar(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_COL *col, SCIP_Real requiredredcost, int *nchgbds, SCIP_Bool *cutoff)
static SCIP_RETCODE propagateRedcostVar(SCIP *scip, SCIP_VAR *var, SCIP_COL *col, SCIP_Real lpobjval, SCIP_Real cutoffbound, int *nchgbds)
static SCIP_RETCODE propagateRootRedcostBinvar(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_COL *col, SCIP_Real cutoffbound, int *nchgbds)
propagator using the LP reduced cost and the cutoff bound
public methods for LP management
public methods for message output
public methods for propagators
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for exact solving
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for variable pricer plugins
public methods for global and local (sub)problems
public methods for propagator plugins
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
type definitions for specific LP solvers interface
#define SCIP_DECL_PROPCOPY(x)
#define SCIP_DECL_PROPINITSOL(x)
#define SCIP_DECL_PROPFREE(x)
struct SCIP_Prop SCIP_PROP
struct SCIP_PropData SCIP_PROPDATA
#define SCIP_DECL_PROPEXEC(x)
enum SCIP_Retcode SCIP_RETCODE