All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
prop_rootredcost.c
Go to the documentation of this file.
21 * This propagator uses the root reduced cost to (globally) propagate against the cutoff bound. The propagator checks if
22 * the variables with non-zero root reduced cost can exceed the cutoff bound. If this is the case the corresponding
25 * The propagate is performed during the search any time a new cutoff bound (primal solution) is found.
27 * @todo do not sort the variables; just store the cutoff bound which leads to a fixing. If that appears loop over all
29 * @todo resolve the root LP in case of repropagation and update root reduced costs use root LP counter to check if new
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
46 #define PROP_DESC "reduced cost strengthening using root node reduced costs and the cutoff bound"
50 #define PROP_DELAY FALSE /**< should propagation method be delayed, if other propagators found reductions? */
63 SCIP_Real lastcutoffbound; /**< cutoff bound for which the root reduced costs were already processed */
218 SCIPdebugMessage("There are %d (poor) binary variables with non-zero root reduced cost <%s>.\n", nredcostbinvars, SCIPgetProbName(scip));
233 SCIPdebugMessage("Store non-zero root reduced cost variables at address <%p>.\n", (void*)propdata->redcostvars);
271 /* sort binary variables with respect to their cutoff bound which would lead to an fixing; this order can be used
278 SCIPdebugMessage("variables with non-zero redcostective coefficient: %d binaries, %d non-binaries\n", nredcostbinvars, nredcostvars - nredcostbinvars);
317 assert(SCIPisFeasLE(scip, rootsol, SCIPvarGetLbGlobal(var))); /* lb might have been increased in the meantime */
325 assert(SCIPisFeasGE(scip, rootsol, SCIPvarGetUbGlobal(var))); /* ub might have been decreased in the meantime */
349 /* the binary variables are stored in the beginning of the variable array; these variables are sorted w.r.t. cutoff
358 * @note In case the assertion fails it indicates that a new LP root solving arose after we initialized the
359 * propagator; The new LP solution destroyed the sorting of the binary variables since the reduced cost of the
360 * variables changed. This could lead to potentially miss a domain reductions. Currently, it is not possible to
361 * check if a new LP root changing the root reduced costs. This case, however, should not happen in the current
388 /* check if the variables is already globally fixed; if so continue with the next potential candidate */
397 /* @note The variable might not be globally fixed right away since this would destroy the local internal data
398 * structure of a search node; the bound change is in that case pending; hence we cannot assert that the
403 SCIPdebugMessage("globally fixed binary variable <%s> [%g,%g] bestroot sol <%g>, redcost <%g>, lpobj <%g>\n",
413 /* The binary variables are sorted in non-increasing manner w.r.t. their cutoff bound which would lead to a
414 * global fixing; That is, abs(rootredcost) + rootlpobjval. Depending on the sign of the reduced cost the
417 * - redcost > 0 --> newub = 0.0 + (cutoffbound - lpobjval) / redcost --> newub = 0 <=> cutoffbound < redcost + lpobjval = sorting key
418 * - redcost < 0 --> newlb = 1.0 + (cutoffbound - lpobjval) / redcost --> newlb = 1 <=> cutoffbound < -redcost + lpobjval = sorting key
420 * Due to the order of the binary variables it follows if one binary variable cannot be fixed anymore all the
421 * remaining once can also not be fixed since these have only an smaller or equal cutoff bound which would lead
424 * Note that variables with non-zero reduced cost are sitting at one of their bound. That is the lower one if
425 * the reduced cost are positive and the upper bound if the reduced cost are negative. For binary variables
428 SCIPdebugMessage("interrupt propagation for binary variables after %d from %d binary variables\n",
433 SCIPdebugMessage("detected cutoff: binary variable <%s> [%g,%g], redcost <%g>, rootsol <%g>, rootlpobjval <%g>\n",
444 #if 0 /* due to numerics it might be that the abort criteria did not work correctly, because the sorting mechanism may
445 * have evaluated variables with a really small difference in their reduced cost values but with really huge
449 /* check that the abort criteria works; that means none of the remaining binary variables can be fixed */
458 /* check if the variables is already globally fixed; if so continue with the potential candidate */
512 /** solving process deinitialization method of propagator (called before branch and bound process data is freed) */
550 /* the propagator should run in all nodes except the root node; for the root node the poor redcost propagator does
572 /* reduced cost strengthening can only be applied, if we have a finite upper bound on the LP value */
591 /* store cutoff bound to remember later that for that particular cutoff bound the propagation was already
626 /* we are done with solving since the cutoff is w.r.t. a global bound change; cutoff root node */
657 SCIP_CALL( SCIPincludePropBasic(scip, &prop, PROP_NAME, PROP_DESC, PROP_PRIORITY, PROP_FREQ, PROP_DELAY, PROP_TIMING,
|