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 "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) |
| #define BENDERSCUT_NAME "nogood" |
Definition at line 55 of file benderscut_nogood.c.
| #define BENDERSCUT_DESC "no good Benders' decomposition integer cut" |
Definition at line 56 of file benderscut_nogood.c.
| #define BENDERSCUT_PRIORITY 500 |
Definition at line 57 of file benderscut_nogood.c.
| #define BENDERSCUT_LPCUT FALSE |
Definition at line 58 of file benderscut_nogood.c.
| #define SCIP_DEFAULT_ADDCUTS FALSE /** Should cuts be generated, instead of constraints */ |
Definition at line 62 of file benderscut_nogood.c.
|
static |
determines if the subproblems are valid for generating nogood cuts
| benders | the benders' decomposition structure |
| benderscut | the 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().
|
static |
compute no good cut
| 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 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().
|
static |
generates and applies Benders' cuts
| 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 209 of file benderscut_nogood.c.
References assert(), computeNogoodCut(), FALSE, NULL, result, 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(), sol, and TRUE.
Referenced by SCIP_DECL_BENDERSCUTEXEC().
|
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.
|
static |
execution method of Benders' decomposition cuts
Definition at line 336 of file benderscut_nogood.c.
References assert(), BENDERSCUT_NAME, checkSubproblemValidity(), FALSE, generateAndApplyBendersNogoodCut(), NULL, result, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_STATUS_INFEASIBLE, SCIPbenderscutGetData(), SCIPbenderscutSetEnabled(), SCIPbendersGetNCalls(), SCIPbendersSubproblem(), SCIPdebugMsg, SCIPgetStatus(), SCIPwarningMessage(), and sol.