Scippy

SCIP

Solving Constraint Integer Programs

sepa_rapidlearning.c File Reference

Detailed Description

rapidlearning separator

Author
Timo Berthold

Definition in file sepa_rapidlearning.c.

#include <assert.h>
#include <string.h>
#include "scip/sepa_rapidlearning.h"
#include "scip/scipdefplugins.h"
#include "scip/pub_var.h"

Go to the source code of this file.

Macros

#define SEPA_NAME   "rapidlearning"
 
#define SEPA_DESC   "rapid learning heuristic and separator"
 
#define SEPA_PRIORITY   -1200000
 
#define SEPA_FREQ   -1
 
#define SEPA_MAXBOUNDDIST   1.0
 
#define SEPA_USESSUBSCIP   TRUE
 
#define SEPA_DELAY   FALSE
 
#define DEFAULT_APPLYCONFLICTS   TRUE
 
#define DEFAULT_APPLYBDCHGS   TRUE
 
#define DEFAULT_APPLYINFERVALS   TRUE
 
#define DEFAULT_REDUCEDINFER   FALSE
 
#define DEFAULT_APPLYPRIMALSOL   TRUE
 
#define DEFAULT_APPLYSOLVED   TRUE
 
#define DEFAULT_MAXNVARS   10000
 
#define DEFAULT_MAXNCONSS   10000
 
#define DEFAULT_MINNODES   500
 
#define DEFAULT_MAXNODES   5000
 
#define DEFAULT_CONTVARS   FALSE
 
#define DEFAULT_CONTVARSQUOT   0.3
 
#define DEFAULT_LPITERQUOT   0.2
 
#define DEFAULT_COPYCUTS   TRUE
 

Functions

static SCIP_RETCODE createNewSol (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_HEUR *heur, SCIP_SOL *subsol, SCIP_Bool *success)
 
static SCIP_DECL_SEPACOPY (sepaCopyRapidlearning)
 
static SCIP_DECL_SEPAFREE (sepaFreeRapidlearning)
 
static SCIP_RETCODE setupAndSolveSubscipRapidlearning (SCIP *scip, SCIP *subscip, SCIP_SEPADATA *sepadata, SCIP_RESULT *result)
 
static SCIP_DECL_SEPAEXECLP (sepaExeclpRapidlearning)
 
SCIP_RETCODE SCIPincludeSepaRapidlearning (SCIP *scip)
 

Macro Definition Documentation

◆ SEPA_NAME

#define SEPA_NAME   "rapidlearning"

Definition at line 32 of file sepa_rapidlearning.c.

◆ SEPA_DESC

#define SEPA_DESC   "rapid learning heuristic and separator"

Definition at line 33 of file sepa_rapidlearning.c.

◆ SEPA_PRIORITY

#define SEPA_PRIORITY   -1200000

Definition at line 34 of file sepa_rapidlearning.c.

◆ SEPA_FREQ

#define SEPA_FREQ   -1

Definition at line 35 of file sepa_rapidlearning.c.

◆ SEPA_MAXBOUNDDIST

#define SEPA_MAXBOUNDDIST   1.0

Definition at line 36 of file sepa_rapidlearning.c.

◆ SEPA_USESSUBSCIP

#define SEPA_USESSUBSCIP   TRUE

does the separator use a secondary SCIP instance?

Definition at line 37 of file sepa_rapidlearning.c.

◆ SEPA_DELAY

#define SEPA_DELAY   FALSE

should separation method be delayed, if other separators found cuts?

Definition at line 38 of file sepa_rapidlearning.c.

◆ DEFAULT_APPLYCONFLICTS

#define DEFAULT_APPLYCONFLICTS   TRUE

should the found conflicts be applied in the original SCIP?

Definition at line 40 of file sepa_rapidlearning.c.

◆ DEFAULT_APPLYBDCHGS

#define DEFAULT_APPLYBDCHGS   TRUE

should the found global bound deductions be applied in the original SCIP? apply only if conflicts and incumbent solution will be copied too

Definition at line 41 of file sepa_rapidlearning.c.

◆ DEFAULT_APPLYINFERVALS

#define DEFAULT_APPLYINFERVALS   TRUE

should the inference values be used as initialization in the original SCIP?

Definition at line 46 of file sepa_rapidlearning.c.

◆ DEFAULT_REDUCEDINFER

#define DEFAULT_REDUCEDINFER   FALSE

should the inference values only be used when rapid learning found other reductions?

Definition at line 47 of file sepa_rapidlearning.c.

◆ DEFAULT_APPLYPRIMALSOL

#define DEFAULT_APPLYPRIMALSOL   TRUE

should the incumbent solution be copied to the original SCIP?

Definition at line 48 of file sepa_rapidlearning.c.

◆ DEFAULT_APPLYSOLVED

#define DEFAULT_APPLYSOLVED   TRUE

should a solved status be copied to the original SCIP?

Definition at line 49 of file sepa_rapidlearning.c.

◆ DEFAULT_MAXNVARS

#define DEFAULT_MAXNVARS   10000

maximum problem size (variables) for which rapid learning will be called

Definition at line 51 of file sepa_rapidlearning.c.

◆ DEFAULT_MAXNCONSS

#define DEFAULT_MAXNCONSS   10000

maximum problem size (constraints) for which rapid learning will be called

Definition at line 52 of file sepa_rapidlearning.c.

◆ DEFAULT_MINNODES

#define DEFAULT_MINNODES   500

minimum number of nodes considered in rapid learning run

Definition at line 54 of file sepa_rapidlearning.c.

◆ DEFAULT_MAXNODES

#define DEFAULT_MAXNODES   5000

maximum number of nodes considered in rapid learning run

Definition at line 55 of file sepa_rapidlearning.c.

◆ DEFAULT_CONTVARS

#define DEFAULT_CONTVARS   FALSE

should rapid learning be applied when there are continuous variables?

Definition at line 57 of file sepa_rapidlearning.c.

◆ DEFAULT_CONTVARSQUOT

#define DEFAULT_CONTVARSQUOT   0.3

maximal portion of continuous variables to apply rapid learning

Definition at line 58 of file sepa_rapidlearning.c.

◆ DEFAULT_LPITERQUOT

#define DEFAULT_LPITERQUOT   0.2

maximal fraction of LP iterations compared to node LP iterations

Definition at line 59 of file sepa_rapidlearning.c.

◆ DEFAULT_COPYCUTS

#define DEFAULT_COPYCUTS   TRUE

should all active cuts from the cutpool of the original scip be copied to constraints of the subscip

Definition at line 60 of file sepa_rapidlearning.c.

Function Documentation

◆ createNewSol()

static SCIP_RETCODE createNewSol ( SCIP scip,
SCIP subscip,
SCIP_VAR **  subvars,
SCIP_HEUR heur,
SCIP_SOL subsol,
SCIP_Bool success 
)
static

creates a new solution for the original problem by copying the solution of the subproblem

Parameters
sciporiginal SCIP data structure
subscipSCIP structure of the subproblem
subvarsthe variables of the subproblem
heurtrysol heuristic structure
subsolsolution of the subproblem
successused to store whether new solution was found or not

Definition at line 94 of file sepa_rapidlearning.c.

References FALSE, NULL, SCIP_CALL, SCIP_DECL_SEPACOPY(), SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateSol(), SCIPfreeBufferArray, SCIPgetNOrigVars(), SCIPgetSolVals(), SCIPgetVarsData(), SCIPsetSolVals(), SCIPtrySolFree(), and TRUE.

Referenced by setupAndSolveSubscipRapidlearning().

◆ SCIP_DECL_SEPACOPY()

static SCIP_DECL_SEPACOPY ( sepaCopyRapidlearning  )
static

copy method for separator plugins (called when SCIP copies plugins)

Definition at line 145 of file sepa_rapidlearning.c.

Referenced by createNewSol().

◆ SCIP_DECL_SEPAFREE()

static SCIP_DECL_SEPAFREE ( sepaFreeRapidlearning  )
static

destructor of separator to free user data (called when SCIP is exiting)

Definition at line 159 of file sepa_rapidlearning.c.

◆ setupAndSolveSubscipRapidlearning()

static SCIP_RETCODE setupAndSolveSubscipRapidlearning ( SCIP scip,
SCIP subscip,
SCIP_SEPADATA sepadata,
SCIP_RESULT result 
)
static

setup and solve sub-SCIP

Parameters
scipSCIP data structure
subscipsubSCIP data structure
sepadataseparator data
resultresult pointer

Definition at line 179 of file sepa_rapidlearning.c.

References createNewSol(), FALSE, MAX, MIN, NULL, SCIP_Bool, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_CALL_ABORT, SCIP_CONSADDED, SCIP_DECL_SEPAEXECLP(), SCIP_LOCKTYPE_MODEL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_Real, SCIP_REDUCEDDOM, SCIP_STAGE_SOLVED, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_OPTIMAL, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPaddCons(), SCIPaddVarLocksType(), SCIPallocBufferArray, SCIPblkmem(), SCIPchgVarType(), SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNConss(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPcopyConsCompression(), SCIPcopyCuts(), SCIPcopyLimits(), SCIPdebugMsg, SCIPfindConshdlr(), SCIPfindHeur(), SCIPfreeBufferArray, SCIPfreeTransform(), SCIPgetConsCopy(), SCIPgetDepth(), SCIPgetDualbound(), SCIPgetNConflictConssApplied(), SCIPgetNConflictConssFound(), SCIPgetNFixedVars(), SCIPgetNLPIterations(), SCIPgetNSols(), SCIPgetSolOrigObj(), SCIPgetSols(), SCIPgetStage(), SCIPgetStatus(), SCIPgetUpperbound(), SCIPgetVarAvgConflictlength(), SCIPgetVarAvgInferences(), SCIPgetVarsData(), SCIPgetVarVSIDS(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPinitVarBranchStats(), SCIPisEQ(), SCIPisFeasLE(), SCIPisFeasLT(), SCIPisInfinity(), SCIPisLE(), SCIPisNegative(), SCIPisParamFixed(), SCIPisPositive(), SCIPpresolve(), SCIPprintStatistics(), SCIPreleaseCons(), SCIPretransformObj(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetObjlimit(), SCIPsetPresolving(), SCIPsetRealParam(), SCIPsetSeparating(), SCIPsetSubscipsOff(), SCIPsolve(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPtransformProb(), SCIPunfixParam(), SCIPupdateLocalDualbound(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetTransVar(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPwarningMessage(), and TRUE.

◆ SCIP_DECL_SEPAEXECLP()

static SCIP_DECL_SEPAEXECLP ( sepaExeclpRapidlearning  )
static

LP solution separation method of separator

Definition at line 645 of file sepa_rapidlearning.c.

Referenced by setupAndSolveSubscipRapidlearning().