Scippy

SCIP

Solving Constraint Integer Programs

sepa_intobj.c File Reference

Detailed Description

integer objective value separator

Author
Tobias Achterberg
Timo Berthold

Definition in file sepa_intobj.c.

#include <assert.h>
#include <string.h>
#include "scip/sepa_intobj.h"

Go to the source code of this file.

Macros

#define SEPA_NAME   "intobj"
 
#define SEPA_DESC   "integer objective value separator"
 
#define SEPA_PRIORITY   -100
 
#define SEPA_FREQ   -1
 
#define SEPA_MAXBOUNDDIST   0.0
 
#define SEPA_USESSUBSCIP   FALSE
 
#define SEPA_DELAY   FALSE
 
#define EVENTHDLR_NAME   "intobj"
 
#define EVENTHDLR_DESC   "objective change event handler for integer objective value separator"
 

Functions

static SCIP_RETCODE sepadataCreate (SCIP *scip, SCIP_SEPADATA **sepadata)
 
static SCIP_RETCODE sepadataFree (SCIP *scip, SCIP_SEPADATA **sepadata)
 
static SCIP_RETCODE createObjRow (SCIP *scip, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
 
static SCIP_RETCODE separateCuts (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
 
static SCIP_DECL_SEPACOPY (sepaCopyIntobj)
 
static SCIP_DECL_SEPAFREE (sepaFreeIntobj)
 
static SCIP_DECL_SEPAEXIT (sepaExitIntobj)
 
static SCIP_DECL_SEPAEXITSOL (sepaExitsolIntobj)
 
static SCIP_DECL_SEPAEXECLP (sepaExeclpIntobj)
 
static SCIP_DECL_SEPAEXECSOL (sepaExecsolIntobj)
 
static SCIP_DECL_EVENTINIT (eventInitIntobj)
 
static SCIP_DECL_EVENTEXIT (eventExitIntobj)
 
static SCIP_DECL_EVENTEXEC (eventExecIntobj)
 
SCIP_RETCODE SCIPincludeSepaIntobj (SCIP *scip)
 

Macro Definition Documentation

◆ SEPA_NAME

#define SEPA_NAME   "intobj"

Definition at line 29 of file sepa_intobj.c.

Referenced by SCIP_DECL_SEPACOPY(), and SCIPincludeSepaIntobj().

◆ SEPA_DESC

#define SEPA_DESC   "integer objective value separator"

Definition at line 30 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

◆ SEPA_PRIORITY

#define SEPA_PRIORITY   -100

Definition at line 31 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

◆ SEPA_FREQ

#define SEPA_FREQ   -1

Definition at line 32 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

◆ SEPA_MAXBOUNDDIST

#define SEPA_MAXBOUNDDIST   0.0

Definition at line 33 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

◆ SEPA_USESSUBSCIP

#define SEPA_USESSUBSCIP   FALSE

does the separator use a secondary SCIP instance?

Definition at line 34 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

◆ SEPA_DELAY

#define SEPA_DELAY   FALSE

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

Definition at line 35 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

◆ EVENTHDLR_NAME

#define EVENTHDLR_NAME   "intobj"

Definition at line 37 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

◆ EVENTHDLR_DESC

#define EVENTHDLR_DESC   "objective change event handler for integer objective value separator"

Definition at line 38 of file sepa_intobj.c.

Referenced by SCIPincludeSepaIntobj().

Function Documentation

◆ sepadataCreate()

static SCIP_RETCODE sepadataCreate ( SCIP scip,
SCIP_SEPADATA **  sepadata 
)
static

creates separator data

Parameters
scipSCIP data structure
sepadatapointer to store separator data

Definition at line 60 of file sepa_intobj.c.

References SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.

Referenced by SCIPincludeSepaIntobj().

◆ sepadataFree()

static SCIP_RETCODE sepadataFree ( SCIP scip,
SCIP_SEPADATA **  sepadata 
)
static

frees separator data

Parameters
scipSCIP data structure
sepadatapointer to separator data

Definition at line 77 of file sepa_intobj.c.

References SCIP_OKAY, and SCIPfreeBlockMemory.

Referenced by SCIP_DECL_SEPAFREE().

◆ createObjRow()

static SCIP_RETCODE createObjRow ( SCIP scip,
SCIP_SEPA sepa,
SCIP_SEPADATA sepadata 
)
static

creates the objective value inequality and the objective value variable, if not yet existing

Parameters
scipSCIP data structure
sepaseparator
sepadataseparator data

Definition at line 94 of file sepa_intobj.c.

References FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_IMPLINT, SCIPaddVar(), SCIPaddVarLocks(), SCIPaddVarToRow(), SCIPallVarsInProb(), SCIPcacheRowExtensions(), SCIPceil(), SCIPcreateEmptyRowSepa(), SCIPcreateVar(), SCIPdebug, SCIPdebugMsg, SCIPflushRowExtensions(), SCIPgetLowerbound(), SCIPgetNVars(), SCIPgetVars(), SCIPinfinity(), SCIPisZero(), SCIPprintRow(), SCIPvarGetLbGlobal(), SCIPvarGetObj(), and TRUE.

Referenced by separateCuts().

◆ separateCuts()

static SCIP_RETCODE separateCuts ( SCIP scip,
SCIP_SEPA sepa,
SCIP_SOL sol,
SCIP_RESULT result 
)
static

searches and adds integral objective cuts that separate the given primal solution

Parameters
scipSCIP data structure
sepathe intobj separator
solthe solution that should be separated, or NULL for LP solution
resultpointer to store the result

Definition at line 157 of file sepa_intobj.c.

References createObjRow(), FALSE, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPaddRow(), SCIPceil(), SCIPdebugMsg, SCIPgetLPObjval(), SCIPgetSolTransObj(), SCIPisFeasIntegral(), SCIPisObjIntegral(), SCIProwIsInLP(), SCIPsepaGetData(), SCIPtightenVarLb(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal().

Referenced by SCIP_DECL_SEPAEXECLP(), and SCIP_DECL_SEPAEXECSOL().

◆ SCIP_DECL_SEPACOPY()

static SCIP_DECL_SEPACOPY ( sepaCopyIntobj  )
static

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

Definition at line 226 of file sepa_intobj.c.

References SCIP_CALL, SCIP_OKAY, SCIPincludeSepaIntobj(), SCIPsepaGetName(), and SEPA_NAME.

◆ SCIP_DECL_SEPAFREE()

static SCIP_DECL_SEPAFREE ( sepaFreeIntobj  )
static

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

Definition at line 240 of file sepa_intobj.c.

References SCIP_CALL, SCIP_OKAY, SCIPsepaGetData(), SCIPsepaSetData(), and sepadataFree().

◆ SCIP_DECL_SEPAEXIT()

static SCIP_DECL_SEPAEXIT ( sepaExitIntobj  )
static

deinitialization method of separator (called before transformed problem is freed)

Definition at line 258 of file sepa_intobj.c.

References SCIP_CALL, SCIP_OKAY, SCIPreleaseVar(), and SCIPsepaGetData().

◆ SCIP_DECL_SEPAEXITSOL()

static SCIP_DECL_SEPAEXITSOL ( sepaExitsolIntobj  )
static

solving process deinitialization method of separator (called before branch and bound process data is freed)

Definition at line 277 of file sepa_intobj.c.

References SCIP_CALL, SCIP_OKAY, SCIPreleaseRow(), and SCIPsepaGetData().

◆ SCIP_DECL_SEPAEXECLP()

static SCIP_DECL_SEPAEXECLP ( sepaExeclpIntobj  )
static

LP solution separation method of separator

Definition at line 296 of file sepa_intobj.c.

References SCIP_CALL, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPgetLPSolstat(), SCIPgetNLPBranchCands(), SCIPisStopped(), and separateCuts().

◆ SCIP_DECL_SEPAEXECSOL()

static SCIP_DECL_SEPAEXECSOL ( sepaExecsolIntobj  )
static

arbitrary primal solution separation method of separator

Definition at line 321 of file sepa_intobj.c.

References SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, and separateCuts().

◆ SCIP_DECL_EVENTINIT()

static SCIP_DECL_EVENTINIT ( eventInitIntobj  )
static

initialization method of event handler (called after problem was transformed)

Definition at line 339 of file sepa_intobj.c.

References SCIP_CALL, SCIP_EVENTTYPE_OBJCHANGED, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, and SCIPcatchEvent().

◆ SCIP_DECL_EVENTEXIT()

static SCIP_DECL_EVENTEXIT ( eventExitIntobj  )
static

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 348 of file sepa_intobj.c.

References SCIP_CALL, SCIP_EVENTTYPE_OBJCHANGED, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, and SCIPdropEvent().

◆ SCIP_DECL_EVENTEXEC()