SCIP Doxygen Documentation
Loading...
Searching...
No Matches

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 "scip/type_message.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 void checkSubproblemValidity (SCIP_BENDERS *benders, SCIP_BENDERSCUT *benderscut)
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"

Definition at line 55 of file benderscut_nogood.c.

◆ BENDERSCUT_DESC

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

Definition at line 56 of file benderscut_nogood.c.

◆ BENDERSCUT_PRIORITY

#define BENDERSCUT_PRIORITY   500

Definition at line 57 of file benderscut_nogood.c.

◆ BENDERSCUT_LPCUT

#define BENDERSCUT_LPCUT   FALSE

Definition at line 58 of file benderscut_nogood.c.

◆ SCIP_DEFAULT_ADDCUTS

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

Definition at line 62 of file benderscut_nogood.c.

Function Documentation

◆ checkSubproblemValidity()

void checkSubproblemValidity ( SCIP_BENDERS * benders,
SCIP_BENDERSCUT * benderscut )
static

determines if the subproblems are valid for generating nogood cuts

Parameters
bendersthe benders' decomposition structure
benderscutthe benders' decomposition cut method

Definition at line 85 of file benderscut_nogood.c.

References assert(), BENDERSCUT_NAME, FALSE, i, NULL, SCIPbenderscutGetData(), SCIPbenderscutGetName(), SCIPbendersGetNSubproblems(), and SCIPbendersGetSubproblemMasterVarsData().

Referenced by SCIP_DECL_BENDERSCUTEXEC().

◆ computeNogoodCut()

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 121 of file benderscut_nogood.c.

References assert(), i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPaddVarToRow(), SCIPchgLhsLinear(), SCIPchgRowLhs(), SCIPgetActivityLinear(), SCIPgetLhsLinear(), SCIPgetNVars(), SCIPgetRowSolActivity(), SCIPgetSolVal(), SCIPgetVars(), SCIPisFeasEQ(), SCIProwGetLhs(), SCIPvarIsBinary(), sol, and vars.

Referenced by generateAndApplyBendersNogoodCut().

◆ generateAndApplyBendersNogoodCut()

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

◆ SCIP_DECL_BENDERSCUTFREE()

SCIP_DECL_BENDERSCUTFREE ( benderscutFreeNogood )
static

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

Definition at line 315 of file benderscut_nogood.c.

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

◆ SCIP_DECL_BENDERSCUTEXEC()