glbfirstnonfixed;
121propdata->redcostvars =
NULL;
123propdata->nredcostvars = 0;
124propdata->nredcostbinvars = 0;
125propdata->glbfirstnonfixed = 0;
126propdata->initialized =
FALSE;
153 else if( key1 > key2 )
191 for( v = 0; v < nvars; ++v )
195assert(vars[v] !=
NULL);
215 for( v = 0; v < propdata->nredcostvars; ++v )
243assert(propdata !=
NULL);
246 if( propdata->initialized )
261nredcostvars += nredcostbinvars;
264 if( nredcostvars > 0 )
271 SCIPdebugMsg(
scip,
"Store non-zero root reduced cost variables at address <%p>.\n", (
void*)propdata->redcostvars);
273 for( v = 0; v < nvars; ++v )
284assert(k < nredcostvars);
290propdata->redcostvars[k] = propdata->redcostvars[nredcostbinvars];
293propdata->redcostvars[nredcostbinvars] = var;
297propdata->redcostvars[k] = var;
305 if( k == nredcostvars )
312 SCIPsortDownPtr((
void**)propdata->redcostvars, varCompRedcost, nredcostbinvars);
314assert(k == nredcostvars);
316 SCIPdebugMsg(
scip,
"variables with non-zero redcostective coefficient: %d binaries, %d non-binaries\n", nredcostbinvars, nredcostvars - nredcostbinvars);
319propdata->nredcostvars = nredcostvars;
320propdata->nredcostbinvars = nredcostbinvars;
321propdata->glbfirstnonfixed = 0;
323propdata->initialized =
TRUE;
357newbd = rootsol + (cutoffbound - rootlpobjval) / rootredcost;
396redcostvars = propdata->redcostvars;
397assert(redcostvars !=
NULL);
408 for( v = 1; v < propdata->nredcostbinvars; ++v )
409assert(varCompRedcost(redcostvars[v-1], redcostvars[v]) == 1);
412 for( v = 0; v < propdata->glbfirstnonfixed; ++v )
416var = redcostvars[v];
417assert(var !=
NULL);
424 for( v = propdata->glbfirstnonfixed; v < propdata->nredcostbinvars; ++v )
429var = redcostvars[v];
430assert(var !=
NULL);
447 SCIPdebugMsg(
scip,
"globally fixed binary variable <%s> [%g,%g] bestroot sol <%g>, redcost <%g>, lpobj <%g>\n",
472 SCIPdebugMsg(
scip,
"interrupt propagation for binary variables after %d from %d binary variables\n",
473v, propdata->nredcostbinvars);
477 SCIPdebugMsg(
scip,
"detected cutoff: binary variable <%s> [%g,%g], redcost <%g>, rootsol <%g>, rootlpobjval <%g>\n",
486propdata->glbfirstnonfixed = v;
488#ifdef SCIP_DISABLED_CODE 495 for( ; v < propdata->nredcostbinvars && !(*cutoff); ++v )
500var = redcostvars[v];
501assert(var !=
NULL);
531assert(prop !=
NULL);
548assert(propdata !=
NULL);
549assert(propdata->redcostvars ==
NULL);
564assert(propdata !=
NULL);
616assert(propdata !=
NULL);
631assert(cutoffbound <= propdata->lastcutoffbound);
633 if( cutoffbound == propdata->lastcutoffbound )
637redcostvars = propdata->redcostvars;
638nredcostvars = propdata->nredcostvars;
641 if( nredcostvars == 0 )
647propdata->lastcutoffbound = cutoffbound;
660 if( !propdata->onlybinary )
663 for( v = propdata->nredcostbinvars; v < nredcostvars && !cutoff; ++v )
668var = redcostvars[v];
669assert(var !=
NULL);
686 else if( nchgbds > 0 )
689 SCIPdebugMsg(
scip,
"tightened %d variable domains (%u cutoff)\n", nchgbds, cutoff);
710propExecRootredcost, propdata) );
712assert(prop !=
NULL);
721 "should only binary variables be propagated?",
725 "should the propagator be forced even if active pricer are present?",
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNObjVars(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_VAR ** SCIPgetVars(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 SCIPincludePropRootredcost(SCIP *scip)
SCIP_Real SCIPgetLPRootObjval(SCIP *scip)
SCIP_Bool SCIPisLPDualReliable(SCIP *scip)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
int SCIPgetNActivePricers(SCIP *scip)
SCIP_Bool SCIPinProbing(SCIP *scip)
void SCIPpropSetData(SCIP_PROP *prop, SCIP_PROPDATA *propdata)
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)
const char * SCIPpropGetName(SCIP_PROP *prop)
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
SCIP_RETCODE SCIPsetPropCopy(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPCOPY((*propcopy)))
SCIP_RETCODE SCIPsetPropExitsol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXITSOL((*propexitsol)))
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 SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPcutoffNode(SCIP *scip, SCIP_NODE *node)
SCIP_NODE * SCIPgetRootNode(SCIP *scip)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPvarGetBestRootSol(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Real SCIPvarGetBestRootRedcost(SCIP_VAR *var)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
SCIP_Real SCIPvarGetBestRootLPObjval(SCIP_VAR *var)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
void SCIPsortDownPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
#define DEFAULT_ONLYBINARY
static SCIP_DECL_PROPFREE(propFreeRootredcost)
static SCIP_RETCODE propagateBinaryBestRootRedcost(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_Real cutoffbound, int *nchgbds, SCIP_Bool *cutoff)
static SCIP_RETCODE propagateRootRedcostVar(SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffbound, SCIP_Bool *infeasible, SCIP_Bool *tightened)
static SCIP_RETCODE propdataInit(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_DECL_PROPEXITSOL(propExitsolRootredcost)
static void propdataReset(SCIP_PROPDATA *propdata)
static SCIP_RETCODE propdataExit(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE propdataCreate(SCIP *scip, SCIP_PROPDATA **propdata)
static int countNonZeroRootRedcostVars(SCIP *scip, SCIP_VAR **vars, int nvars)
static SCIP_DECL_PROPEXEC(propExecRootredcost)
static SCIP_DECL_PROPCOPY(propCopyRootredcost)
static SCIP_DECL_SORTPTRCOMP(varCompRedcost)
reduced cost strengthening using root node reduced costs and the cutoff bound
public methods for message output
methods for sorting joint arrays of various types
public methods for propagators
public methods for problem variables
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 the probing mode
public methods for propagator plugins
public methods for querying solving statistics
public methods for the branch-and-bound tree
public methods for SCIP variables
struct SCIP_PropData SCIP_PROPDATA
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4