methods commonly used by primal heuristics
Definition in file heuristics.c.
#include "scip/heuristics.h"#include "scip/cons_linear.h"#include "scip/scip_exact.h"#include "scip/scipdefplugins.h"#include "scip/stat.h"#include "scip/struct_scip.h"#include "scip/pub_heur.h"#include "scip/cons_indicator.h"#include "scip/cons_sos1.h"Go to the source code of this file.
Macros | |
| #define | MINLPITER 10000 |
| #define MINLPITER 10000 |
minimal number of LP iterations allowed in each LP solving call
Definition at line 44 of file heuristics.c.
|
static |
solve probing LP
| scip | SCIP data structure |
| diveset | diving settings |
| maxnlpiterations | maximum number of allowed LP iterations |
| divecontext | context for diving statistics |
| lperror | pointer to store if an internal LP error occurred |
| cutoff | pointer to store whether the LP was infeasible |
Definition at line 49 of file heuristics.c.
References assert(), cutoff, diveset, lperror, MAX, maxnlpiterations, MINLPITER, nlpiterations, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPdivesetGetName(), SCIPdivesetGetNLPIterations(), SCIPgetNLPIterations(), SCIPsolveProbingLP(), SCIPupdateDivesetLPStats(), and SCIPwarningMessage().
Referenced by SCIPperformGenericDivingAlgorithm().
|
static |
select the next variable and type of diving
| scip | SCIP data structure |
| diveset | dive set |
| worksol | current working solution |
| onlylpbranchcands | should only LP branching candidates be considered? |
| storelpcandscores | should the scores of the LP candidates be updated? |
| lpcands | LP branching candidates, or NULL if not needed |
| lpcandssol | solution values LP branching candidates, or NULL if not needed |
| lpcandsfrac | fractionalities of LP branching candidates, or NULL if not needed |
| lpcandsscores | array with LP branching candidate scores, or NULL |
| lpcandroundup | array to remember whether the preferred branching direction is upwards |
| nviollpcands | pointer to store the number of LP candidates whose solution value already violates local bounds |
| nlpcands | number of current LP cands |
| enfosuccess | pointer to store whether a candidate was sucessfully found |
| infeasible | pointer to store whether the diving can be immediately aborted because it is infeasible |
Definition at line 93 of file heuristics.c.
References assert(), c, diveset, lpcands, lpcandsfrac, lpcandssol, nlpcands, NULL, SCIP_Bool, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_DIVETYPE_INTEGRALITY, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIPaddDiveBoundChange(), SCIPceil(), SCIPclearDiveBoundChanges(), SCIPfloor(), SCIPgetDiveBoundChanges(), SCIPgetDivesetScore(), SCIPgetSolVal(), SCIPisGE(), SCIPisLE(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by SCIPperformGenericDivingAlgorithm().
|
static |
return the LP iteration budget suggestion for this dive set
| scip | SCIP data structure |
| diveset | dive set data structure |
| divecontext | context for diving statistics |
Definition at line 178 of file heuristics.c.
References diveset, SCIP_Longint, SCIPdivesetGetMaxLPIterOffset(), SCIPdivesetGetMaxLPIterQuot(), SCIPdivesetGetNCalls(), SCIPdivesetGetNLPIterations(), SCIPdivesetGetSolSuccess(), and SCIPgetNNodeLPIterations().
Referenced by SCIPperformGenericDivingAlgorithm().
|
static |
creates the rows of the subproblem
| scip | original SCIP data structure |
| subscip | SCIP data structure for the subproblem |
| varmap | a hashmap to store the mapping of source variables to the corresponding target variables |
Definition at line 891 of file heuristics.c.
References assert(), FALSE, i, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPcolGetVar(), SCIPcreateConsLinear(), SCIPfreeBufferArray, SCIPgetLPRowsData(), SCIPhashmapGetImage(), SCIPreleaseCons(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetRhs(), SCIProwGetVals(), SCIProwIsLocal(), and TRUE.
Referenced by SCIPcopyLargeNeighborhoodSearch().