Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Generates a no good cut for integer solutions that are infeasible for the subproblems.

Author
Stephen J. Maher

Definition in file benderscut_nogood.c.

#include "scip/benderscut_nogood.h"
#include "scip/cons_linear.h"
#include "scip/pub_benderscut.h"
#include "scip/pub_benders.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_var.h"
#include "scip/scip_benders.h"
#include "scip/scip_cons.h"
#include "scip/scip_cut.h"
#include "scip/scip_general.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_sol.h"
#include <string.h>

Go to the source code of this file.

Macros

#define BENDERSCUT_NAME   "nogood"
 
#define BENDERSCUT_DESC   "no good Benders' decomposition integer cut"
 
#define BENDERSCUT_PRIORITY   500
 
#define BENDERSCUT_LPCUT   FALSE
 
#define SCIP_DEFAULT_ADDCUTS   FALSE /** Should cuts be generated, instead of constraints */
 

Functions

static SCIP_RETCODE computeNogoodCut (SCIP *masterprob, SCIP_BENDERS *benders, SCIP_SOL *sol, SCIP_CONS *cons, SCIP_ROW *row, SCIP_Bool addcut)
 
static SCIP_RETCODE generateAndApplyBendersNogoodCut (SCIP *masterprob, SCIP_BENDERS *benders, SCIP_BENDERSCUT *benderscut, SCIP_SOL *sol, SCIP_BENDERSENFOTYPE type, SCIP_RESULT *result)
 
static SCIP_DECL_BENDERSCUTFREE (benderscutFreeNogood)
 
static SCIP_DECL_BENDERSCUTEXEC (benderscutExecNogood)
 
SCIP_RETCODE SCIPincludeBenderscutNogood (SCIP *scip, SCIP_BENDERS *benders)
 

Macro Definition Documentation

◆ BENDERSCUT_NAME

#define BENDERSCUT_NAME   "nogood"

◆ BENDERSCUT_DESC

#define BENDERSCUT_DESC   "no good Benders' decomposition integer cut"

Definition at line 55 of file benderscut_nogood.c.

Referenced by SCIPincludeBenderscutNogood().

◆ BENDERSCUT_PRIORITY

#define BENDERSCUT_PRIORITY   500

Definition at line 56 of file benderscut_nogood.c.

Referenced by SCIPincludeBenderscutNogood().

◆ BENDERSCUT_LPCUT

#define BENDERSCUT_LPCUT   FALSE

Definition at line 57 of file benderscut_nogood.c.

Referenced by SCIPincludeBenderscutNogood().

◆ SCIP_DEFAULT_ADDCUTS

#define SCIP_DEFAULT_ADDCUTS   FALSE /** Should cuts be generated, instead of constraints */

Definition at line 61 of file benderscut_nogood.c.

Referenced by SCIPincludeBenderscutNogood().

Function Documentation

◆ computeNogoodCut()

static SCIP_RETCODE computeNogoodCut ( SCIP masterprob,
SCIP_BENDERS benders,
SCIP_SOL sol,
SCIP_CONS cons,
SCIP_ROW row,
SCIP_Bool  addcut 
)
static

compute no good cut

Parameters
masterprobthe SCIP instance of the master problem
bendersthe benders' decomposition structure
solprimal CIP solution
consthe constraint for the generated cut, can be NULL
rowthe row for the generated cut, can be NULL
addcutindicates whether a cut is created instead of a constraint

Definition at line 83 of file benderscut_nogood.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPaddVarToRow(), SCIPchgLhsLinear(), SCIPchgRowLhs(), SCIPgetActivityLinear(), SCIPgetLhsLinear(), SCIPgetNVars(), SCIPgetRowSolActivity(), SCIPgetSolVal(), SCIPgetVars(), SCIPisFeasEQ(), SCIProwGetLhs(), and SCIPvarIsBinary().

Referenced by generateAndApplyBendersNogoodCut().

◆ generateAndApplyBendersNogoodCut()

static SCIP_RETCODE generateAndApplyBendersNogoodCut ( SCIP masterprob,
SCIP_BENDERS benders,
SCIP_BENDERSCUT benderscut,
SCIP_SOL sol,
SCIP_BENDERSENFOTYPE  type,
SCIP_RESULT result 
)
static

generates and applies Benders' cuts

Parameters
masterprobthe SCIP instance of the master problem
bendersthe benders' decomposition
benderscutthe benders' decomposition cut method
solprimal CIP solution
typethe enforcement type calling this function
resultthe result from solving the subproblems

Definition at line 171 of file benderscut_nogood.c.

References computeNogoodCut(), FALSE, NULL, SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSENFOTYPE_LP, SCIP_BENDERSENFOTYPE_PSEUDO, SCIP_BENDERSENFOTYPE_RELAX, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_SEPARATED, SCIP_STAGE_INITSOLVE, SCIPaddCons(), SCIPaddPoolCut(), SCIPaddRow(), SCIPbenderscutGetData(), SCIPbenderscutGetNFound(), SCIPcreateConsBasicLinear(), SCIPcreateEmptyRowConshdlr(), SCIPdebugPrintCons, SCIPfindConshdlr(), SCIPgetStage(), SCIPinfinity(), SCIPinfoMessage(), SCIPprintRow(), SCIPreleaseCons(), SCIPreleaseRow(), SCIPsetConsDynamic(), SCIPsetConsRemovable(), SCIPsnprintf(), and TRUE.

Referenced by SCIP_DECL_BENDERSCUTEXEC().

◆ SCIP_DECL_BENDERSCUTFREE()

static SCIP_DECL_BENDERSCUTFREE ( benderscutFreeNogood  )
static

destructor of Benders' decomposition cuts to free user data (called when SCIP is exiting)

Definition at line 277 of file benderscut_nogood.c.

References BENDERSCUT_NAME, NULL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPbenderscutGetName(), SCIPbenderscutSetData(), and SCIPfreeBlockMemory.

◆ SCIP_DECL_BENDERSCUTEXEC()