Detailed Description
Generates a no good cut for integer solutions that are infeasible for the subproblems.
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" |
Definition at line 54 of file benderscut_nogood.c.
Referenced by SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTFREE(), and SCIPincludeBenderscutNogood().
◆ 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 |
compute no good cut
- Parameters
-
masterprob the SCIP instance of the master problem benders the benders' decomposition structure sol primal CIP solution cons the constraint for the generated cut, can be NULL row the row for the generated cut, can be NULL addcut indicates 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 |
generates and applies Benders' cuts
- Parameters
-
masterprob the SCIP instance of the master problem benders the benders' decomposition benderscut the benders' decomposition cut method sol primal CIP solution type the enforcement type calling this function result the 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_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 |
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()
|
static |
execution method of Benders' decomposition cuts
Definition at line 298 of file benderscut_nogood.c.
References BENDERSCUT_NAME, FALSE, generateAndApplyBendersNogoodCut(), NULL, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_STATUS_INFEASIBLE, SCIPbenderscutGetData(), SCIPbenderscutSetEnabled(), SCIPbendersGetNCalls(), SCIPbendersGetNSubproblems(), SCIPbendersMasterIsNonlinear(), SCIPbendersSubproblem(), SCIPdebugMsg, SCIPgetNBinVars(), SCIPgetNVars(), SCIPgetStatus(), and SCIPinfoMessage().