Detailed Description
dualval primal heuristic
This heuristic tries to find solutions by taking the LP or NLP, rounding solution values, fixing the variables to the rounded values and then changing some of the values.To determine which variable is changed we give each variable a ranking dependent on its dualvalue. We work with a transformed problem that is always feasible and has objective = 0 iff the original problem is also feasible. Thus we cannot expect to find really good solutions.
Definition in file heur_dualval.c.
#include "blockmemshell/memory.h"
#include "scip/type_expr.h"
#include "scip/cons_indicator.h"
#include "scip/cons_knapsack.h"
#include "scip/cons_linear.h"
#include "scip/cons_logicor.h"
#include "scip/cons_setppc.h"
#include "scip/cons_varbound.h"
#include "scip/heur_dualval.h"
#include "scip/pub_cons.h"
#include "scip/pub_event.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_sort.h"
#include "scip/pub_nlp.h"
#include "scip/pub_sol.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_event.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nlp.h"
#include "scip/scip_nlpi.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_var.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | HEUR_NAME "dualval" |
#define | HEUR_DESC "primal heuristic using dual values" |
#define | HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS |
#define | HEUR_PRIORITY -10 |
#define | HEUR_FREQ -1 |
#define | HEUR_FREQOFS 0 |
#define | HEUR_MAXDEPTH -1 |
#define | HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
#define | HEUR_USESSUBSCIP TRUE |
#define | EVENTHDLR_NAME "lpsol_dualval" |
#define | EVENTHDLR_DESC "event handler for lp solution found" |
#define | DEFAULT_FORCEIMPROVEMENTS FALSE |
#define | DEFAULT_ONLYCHEAPER TRUE |
#define | DEFAULT_ONLYLEAVES FALSE |
#define | DEFAULT_RELAXINDICATORS FALSE |
#define | DEFAULT_RELAXCONTVARS FALSE |
#define | DEFAULT_HEURVERBLEVEL 0 |
#define | DEFAULT_NLPVERBLEVEL 0 |
#define | DEFAULT_RANKVALUE 10 |
#define | DEFAULT_MAXCALLS 25 |
#define | DEFAULT_DYNAMICDEPTH 0 |
#define | DEFAULT_MAXEQUALRANKS 50 |
#define | DEFAULT_MINGAP 5.0 |
#define | DEFAULT_LAMBDASLACK 1.0 |
#define | DEFAULT_LAMBDAOBJ 0.0 |
#define | BIG_VALUE 1E+10 |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "dualval" |
Definition at line 76 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ HEUR_DESC
#define HEUR_DESC "primal heuristic using dual values" |
Definition at line 77 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS |
Definition at line 78 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ HEUR_PRIORITY
#define HEUR_PRIORITY -10 |
Definition at line 79 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ HEUR_FREQ
#define HEUR_FREQ -1 |
Definition at line 80 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 0 |
Definition at line 81 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 82 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ HEUR_TIMING
#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
Definition at line 83 of file heur_dualval.c.
Referenced by SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURINIT(), SCIP_DECL_HEURINITSOL(), and SCIPincludeHeurDualval().
◆ HEUR_USESSUBSCIP
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 84 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ EVENTHDLR_NAME
#define EVENTHDLR_NAME "lpsol_dualval" |
Definition at line 86 of file heur_dualval.c.
Referenced by SCIPincludeEventHdlrLPsol().
◆ EVENTHDLR_DESC
#define EVENTHDLR_DESC "event handler for lp solution found" |
Definition at line 87 of file heur_dualval.c.
Referenced by SCIPincludeEventHdlrLPsol().
◆ DEFAULT_FORCEIMPROVEMENTS
#define DEFAULT_FORCEIMPROVEMENTS FALSE |
exit if objective doesn't improve
Definition at line 91 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_ONLYCHEAPER
#define DEFAULT_ONLYCHEAPER TRUE |
add constraint to ensure that discrete vars are improving
Definition at line 92 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_ONLYLEAVES
#define DEFAULT_ONLYLEAVES FALSE |
disable the heuristic if it was not called at a leaf of the B&B tree
Definition at line 93 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_RELAXINDICATORS
#define DEFAULT_RELAXINDICATORS FALSE |
relax the indicator variables by introducing continuous copies
Definition at line 94 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_RELAXCONTVARS
#define DEFAULT_RELAXCONTVARS FALSE |
enable relaxation of continous variables
Definition at line 95 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_HEURVERBLEVEL
#define DEFAULT_HEURVERBLEVEL 0 |
verblevel of the heuristic, default is 0 to display nothing
Definition at line 98 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_NLPVERBLEVEL
#define DEFAULT_NLPVERBLEVEL 0 |
verblevel of the nlp solver, can be 0 or 1
Definition at line 99 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_RANKVALUE
#define DEFAULT_RANKVALUE 10 |
number of ranks that should be displayed when the heuristic is called
Definition at line 100 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_MAXCALLS
#define DEFAULT_MAXCALLS 25 |
maximal number of recursive calls of the heuristic (if dynamicdepth is off)
Definition at line 101 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_DYNAMICDEPTH
#define DEFAULT_DYNAMICDEPTH 0 |
says if and how the recursion depth is computed at runtime
Definition at line 102 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_MAXEQUALRANKS
#define DEFAULT_MAXEQUALRANKS 50 |
maximal number of variables that may have maximal rank, quit if there are more, turn off by setting -1
Definition at line 103 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_MINGAP
#define DEFAULT_MINGAP 5.0 |
minimal gap for which we still run the heuristic, if gap is less we return without doing anything
Definition at line 106 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_LAMBDASLACK
#define DEFAULT_LAMBDASLACK 1.0 |
value added to objective of slack variables, must not be zero
Definition at line 107 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ DEFAULT_LAMBDAOBJ
#define DEFAULT_LAMBDAOBJ 0.0 |
scaling factor for the objective function
Definition at line 108 of file heur_dualval.c.
Referenced by SCIPincludeHeurDualval().
◆ BIG_VALUE
#define BIG_VALUE 1E+10 |
Definition at line 1553 of file heur_dualval.c.
Referenced by fixDiscreteVars().
Function Documentation
◆ SCIP_DECL_EVENTINIT()
|
static |
initialization method of event handler (called after problem was transformed)
Definition at line 168 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_EVENTTYPE_FIRSTLPSOLVED, SCIP_EVENTTYPE_LPSOLVED, SCIP_OKAY, and SCIPcatchEvent().
◆ SCIP_DECL_EVENTEXIT()
|
static |
deinitialization method of event handler (called before transformed problem is freed)
Definition at line 181 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_EVENTTYPE_FIRSTLPSOLVED, SCIP_EVENTTYPE_LPSOLVED, SCIP_OKAY, and SCIPdropEvent().
◆ SCIP_DECL_EVENTEXEC()
|
static |
execution method of event handler
Definition at line 194 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VERBLEVEL_HIGH, SCIPallocBlockMemoryArray, SCIPconsGetHdlr(), SCIPeventhdlrGetData(), SCIPfindConshdlr(), SCIPfreeBlockMemoryArray, SCIPgetDualsolLinear(), SCIPgetNOrigConss(), SCIPgetOrigConss(), SCIPgetStage(), SCIPgetTransformedCons(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPhashmapRemoveAll(), and SCIPverbMessage().
◆ SCIPincludeEventHdlrLPsol()
|
static |
includes event handler for best solution found
- Parameters
-
scip SCIP data structure heurdata heuristic data
Definition at line 244 of file heur_dualval.c.
References EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeEventhdlrBasic(), SCIPsetEventhdlrExit(), and SCIPsetEventhdlrInit().
Referenced by createSubSCIP().
◆ releaseHashmapEntries()
|
static |
releases all variables or constraints from given hash map
- Parameters
-
scip SCIP data structure hashmap hashmap isvarmap are the entries variables or constraints?
Definition at line 270 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPhashmapEntryGetImage(), SCIPhashmapGetEntry(), SCIPhashmapGetNEntries(), SCIPreleaseCons(), and SCIPreleaseVar().
Referenced by createSubSCIP(), and SCIP_DECL_HEUREXIT().
◆ releaseHashmapNLPRows()
|
static |
releases all NLP rows from given hash map
- Parameters
-
scip SCIP data structure hashmap hashmap
Definition at line 313 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPhashmapEntryGetImage(), SCIPhashmapGetEntry(), SCIPhashmapGetNEntries(), and SCIPreleaseNlRow().
Referenced by SCIP_DECL_HEUREXIT().
◆ addLinearConstraints()
|
static |
adds linear constraints from a SCIP instance to its NLP
- Parameters
-
scip SCIP data structure conshdlr constraint handler for linear constraints addcombconss whether to add combinatorial linear constraints to NLP addcontconss whether to add continuous linear constraints to NLP heurdata heuristic data structure
Definition at line 345 of file heur_dualval.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPaddNlRow(), SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconsIsChecked(), SCIPconsIsEnabled(), SCIPcreateNlRow(), SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPhashmapInsert(), SCIPisRelLE(), SCIPreleaseNlRow(), SCIPvarGetType(), and TRUE.
Referenced by addLinearConstraintsToNlp().
◆ addVarboundConstraints()
|
static |
adds variable bound constraints from a SCIP instance to its NLP
- Parameters
-
scip SCIP data structure conshdlr constraint handler for linear constraints addcombconss whether to add combinatorial linear constraints to NLP addcontconss whether to add continuous linear constraints to NLP heurdata heuristic data structure
Definition at line 422 of file heur_dualval.c.
References NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddNlRow(), SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconsIsChecked(), SCIPconsIsEnabled(), SCIPcreateNlRow(), SCIPgetLhsVarbound(), SCIPgetRhsVarbound(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPhashmapInsert(), and SCIPvarGetType().
Referenced by addLinearConstraintsToNlp().
◆ addLogicOrConstraints()
|
static |
adds logic-or constraints to NLP
- Parameters
-
scip SCIP data structure conshdlr constraint handler for linear constraints heurdata heuristic data structure
Definition at line 480 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_Real, SCIPaddNlRow(), SCIPallocBufferArray, SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconsIsChecked(), SCIPconsIsEnabled(), SCIPcreateNlRow(), SCIPfreeBufferArrayNull, SCIPgetNVarsLogicor(), SCIPgetVarsLogicor(), SCIPhashmapInsert(), SCIPinfinity(), and SCIPreallocBufferArray.
Referenced by addLinearConstraintsToNlp().
◆ addSetppcConstraints()
|
static |
adds setppc constraints to NLP
- Parameters
-
scip SCIP data structure conshdlr constraint handler for linear constraints heurdata heuristic data structure
Definition at line 547 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_ERROR, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIP_SETPPCTYPE_PACKING, SCIP_SETPPCTYPE_PARTITIONING, SCIPaddNlRow(), SCIPallocBufferArray, SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconsIsChecked(), SCIPconsIsEnabled(), SCIPcreateNlRow(), SCIPerrorMessage, SCIPfreeBufferArrayNull, SCIPgetNVarsSetppc(), SCIPgetTypeSetppc(), SCIPgetVarsSetppc(), SCIPhashmapInsert(), SCIPinfinity(), and SCIPreallocBufferArray.
Referenced by addLinearConstraintsToNlp().
◆ addKnapsackConstraints()
|
static |
adds knapsack constraints to NLP
- Parameters
-
scip SCIP data structure conshdlr constraint handler for linear constraints heurdata heuristic data structure
Definition at line 639 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPaddNlRow(), SCIPallocBufferArray, SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPconsIsChecked(), SCIPconsIsEnabled(), SCIPcreateNlRow(), SCIPfreeBufferArrayNull, SCIPgetCapacityKnapsack(), SCIPgetNVarsKnapsack(), SCIPgetVarsKnapsack(), SCIPgetWeightsKnapsack(), SCIPhashmapInsert(), SCIPinfinity(), and SCIPreallocBufferArray.
Referenced by addLinearConstraintsToNlp().
◆ addLinearConstraintsToNlp()
|
static |
adds combinatorial and/or continuous variants of linear constraints from a SCIP instance to its NLP
- Parameters
-
scip SCIP data structure addcombconss whether to add combinatorial linear constraints to NLP addcontconss whether to add continuous linear constraints to NLP heurdata heuristic data structure
Definition at line 711 of file heur_dualval.c.
References addKnapsackConstraints(), addLinearConstraints(), addLogicOrConstraints(), addSetppcConstraints(), addVarboundConstraints(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPfindConshdlr().
Referenced by SCIPapplyHeurDualval().
◆ createSolFromSubScipSol()
|
static |
creates a SCIP_SOL in our SCIP space out of the SCIP_SOL from a sub-SCIP
- Parameters
-
scip SCIP data structure heur heuristic data structure sol buffer to store solution value; if pointing to NULL, a new solution is created, otherwise values in the given one are overwritten subsol solution of sub-SCIP
Definition at line 765 of file heur_dualval.c.
References NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPcreateOrigSol(), SCIPdebugMsg, SCIPfreeSol(), SCIPgetNOrigVars(), SCIPgetOrigVars(), SCIPgetOrigVarsData(), SCIPgetProbvarSum(), SCIPgetSolVal(), SCIPhashmapGetImage(), SCIPheurGetData(), SCIPsetSolVal(), SCIPvarGetLbGlobal(), SCIPvarGetTransVar(), and SCIPvarIsBinary().
Referenced by storeSolution().
◆ createSubSCIP()
|
static |
creates copy of CIP from problem in SCIP
- Parameters
-
scip SCIP data structure heurdata heuristic data structure
Definition at line 856 of file heur_dualval.c.
References BMSclearMemoryArray, FALSE, NULL, REALABS, releaseHashmapEntries(), SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPallocBlockMemoryArray, SCIPblkmem(), SCIPcaptureCons(), SCIPcaptureVar(), SCIPchgVarLbGlobal(), SCIPchgVarObj(), SCIPchgVarType(), SCIPchgVarUbGlobal(), SCIPconsAddUpgradeLocks(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNConss(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcopyConss(), SCIPcopyParamSettings(), SCIPcopyPlugins(), SCIPcopyVars(), SCIPcreate(), SCIPcreateConsIndicatorLinCons(), SCIPcreateConsLinear(), SCIPcreateProb(), SCIPcreateVar(), SCIPdebugMsg, SCIPdelCons(), SCIPfindConshdlr(), SCIPfloor(), SCIPgetBinaryVarIndicator(), SCIPgetLinearConsIndicator(), SCIPgetNConss(), SCIPgetNegatedVar(), SCIPgetNOrigConss(), SCIPgetNOrigVars(), SCIPgetOrigConss(), SCIPgetOrigVars(), SCIPgetProbName(), SCIPgetSlackVarIndicator(), SCIPgetTransformedCons(), SCIPgetVarsData(), SCIPhashmapCreate(), SCIPhashmapEntryGetImage(), SCIPhashmapEntryGetOrigin(), SCIPhashmapFree(), SCIPhashmapGetEntry(), SCIPhashmapGetImage(), SCIPhashmapGetNEntries(), SCIPhashmapInsert(), SCIPhashmapRemove(), SCIPhashmapRemoveAll(), SCIPincludeEventHdlrLPsol(), SCIPinfinity(), SCIPisFeasEQ(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsetIntParam(), SCIPsetRealParam(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetTransVar(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsIntegral(), SCIPvarIsNegated(), and TRUE.
Referenced by SCIP_DECL_HEURINIT(), and SCIPapplyHeurDualval().
◆ freeSubSCIP()
|
static |
free sub-SCIP data structure
- Parameters
-
scip SCIP data structure heurdata heuristic data structure
Definition at line 1483 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_OKAY, and SCIPfree().
Referenced by SCIP_DECL_HEUREXIT().
◆ createSolFromNLP()
|
static |
create a solution from the values of current nonlinear program
- Parameters
-
scip SCIP data structure heur heuristic data structure sol buffer to store solution value; if pointing to NULL a new solution is created, otherwise values in the given one are overwritten
Definition at line 1504 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPcreateSol(), SCIPgetNOrigVars(), SCIPgetOrigVarsData(), SCIPheurGetData(), SCIPsetSolVal(), SCIPvarGetNLPSol(), SCIPvarGetTransVar(), and SCIPvarIsActive().
Referenced by SCIPapplyHeurDualval().
◆ fixDiscreteVars()
|
static |
method to fix the (relaxed) discrete variables
- Parameters
-
scip SCIP data structure heurdata heuristic data structure refpoint point to take fixation of discrete variables from; if NULL, then LP solution is used transsol pointer to new created solution with fixed values as solution value
Definition at line 1557 of file heur_dualval.c.
References BIG_VALUE, MAX, MIN, NULL, REALABS, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPchgLhsLinear(), SCIPchgRhsLinear(), SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPcreateOrigSol(), SCIPfloor(), SCIPgetLPSolstat(), SCIPgetSolVal(), SCIPhashmapGetImage(), SCIPsetSolVal(), SCIPvarGetLbGlobal(), SCIPvarGetTransVar(), and SCIPvarGetUbGlobal().
Referenced by SCIPapplyHeurDualval().
◆ freeMemory()
|
static |
method to free memory before leaving the heuristic or jumping up in the recursion
- Parameters
-
scip scip data structure heurdata heuristic data structure transsol sol that has to be freed absranks array of absolute rank values ranks array of rank values sortedvars array of corresponding variables beforeswitching did we call this method before or after switching variables? clearswitchedvars says if we should clear switchedvars or not
Definition at line 1635 of file heur_dualval.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPfreeBlockMemoryArray, SCIPfreeBufferArrayNull, SCIPfreeSol(), SCIPfreeTransform(), SCIPgetOrigVarsData(), SCIPhashmapGetImage(), SCIPhashmapRemoveAll(), SCIPvarGetLbGlobal(), SCIPvarGetProbindex(), and SCIPvarGetUbGlobal().
Referenced by SCIPapplyHeurDualval(), and storeSolution().
◆ computeRanks()
|
static |
computes the ranks, saves them into an array and sorts the variables according to absolute ranks
- Parameters
-
scip scip data structure heurdata heuristic data structure absranks array of absolute rank values ranks array of rank values sortedvars array of corresponding variables
Definition at line 1721 of file heur_dualval.c.
References NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconshdlrGetConss(), SCIPconshdlrGetNConss(), SCIPfindConshdlr(), SCIPgetBinaryVarIndicator(), SCIPgetLinearConsIndicator(), SCIPgetTransformedCons(), SCIPhashmapGetImage(), SCIPisFeasEQ(), SCIPsortDownRealRealPtr(), SCIPvarGetLbGlobal(), SCIPvarGetNegatedVar(), SCIPvarGetTransVar(), SCIPvarGetUbGlobal(), and SCIPvarIsNegated().
Referenced by SCIPapplyHeurDualval().
◆ maximalslack()
|
static |
compute maximal slack of a variable
- Parameters
-
scip scip data structure heurdata heuristic data structure
Definition at line 1851 of file heur_dualval.c.
References FALSE, NULL, SCIP_Bool, SCIP_Real, SCIP_VERBLEVEL_HIGH, SCIPgetBestSol(), SCIPgetNOrigVars(), SCIPgetOrigVars(), SCIPgetSolVal(), SCIPhashmapGetImage(), SCIPinfinity(), SCIPvarGetName(), SCIPvarGetNLPSol(), SCIPverbMessage(), and TRUE.
Referenced by SCIPapplyHeurDualval().
◆ storeSolution()
|
static |
method called after a solution is found which is feasible in the original problem, stores it and cleans up
- Parameters
-
scip SCIP data structure heur heuristic data result pointer to store result of: did not run, solution found, no solution found, or fixing is infeasible (cutoff) transsol solution to fix variables bestsol solution we create a original scip solution from
Definition at line 1924 of file heur_dualval.c.
References createSolFromSubScipSol(), FALSE, freeMemory(), NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_FOUNDSOL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_HIGH, SCIPdebugMsg, SCIPfreeSol(), SCIPgetNLPSolstat(), SCIPheurGetData(), SCIPheurSetFreq(), SCIPinfinity(), SCIPsolGetOrigObj(), SCIPtrySolFree(), SCIPverbMessage(), and TRUE.
Referenced by SCIPapplyHeurDualval().
◆ SCIP_DECL_HEURFREE()
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 2520 of file heur_dualval.c.
References NULL, SCIP_OKAY, SCIPfreeBlockMemory, and SCIPheurGetData().
◆ SCIP_DECL_HEURINIT()
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 2537 of file heur_dualval.c.
References createSubSCIP(), HEUR_TIMING, NULL, SCIP_CALL, SCIP_HEURTIMING_DURINGLPLOOP, SCIP_OKAY, SCIPblkmem(), SCIPhashmapCreate(), SCIPheurGetData(), SCIPheurGetFreq(), SCIPheurGetFreqofs(), SCIPheurSetTimingmask(), and SCIPsetIntParam().
◆ SCIP_DECL_HEUREXIT()
|
static |
deinitialization method of primal heuristic (called before transformed problem is freed)
Definition at line 2573 of file heur_dualval.c.
References FALSE, freeSubSCIP(), NULL, releaseHashmapEntries(), releaseHashmapNLPRows(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPfreeBlockMemoryArrayNull, SCIPgetNOrigConss(), SCIPgetOrigConss(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapRemoveAll(), SCIPheurGetData(), and TRUE.
◆ SCIP_DECL_HEURINITSOL()
|
static |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 2712 of file heur_dualval.c.
References HEUR_TIMING, NULL, SCIP_HEURTIMING_DURINGLPLOOP, SCIP_OKAY, SCIPheurGetData(), SCIPheurGetFreq(), SCIPheurGetFreqofs(), and SCIPheurSetTimingmask().
◆ SCIP_DECL_HEUREXITSOL()
|
static |
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
Definition at line 2740 of file heur_dualval.c.
References HEUR_TIMING, NULL, SCIP_OKAY, and SCIPheurSetTimingmask().
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 2753 of file heur_dualval.c.
References FALSE, HEUR_TIMING, NULL, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIPapplyHeurDualval(), SCIPheurGetData(), and SCIPheurSetTimingmask().