Generates a Laporte and Louveaux Benders' decomposition integer cut.
Definition in file benderscut_int.c.
#include "scip/benderscut_int.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_paramset.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 "integer" |
#define | BENDERSCUT_DESC "Laporte and Louveaux Benders' decomposition integer cut" |
#define | BENDERSCUT_PRIORITY 0 |
#define | BENDERSCUT_LPCUT FALSE |
#define | SCIP_DEFAULT_ADDCUTS FALSE /** Should cuts be generated, instead of constraints */ |
#define | SCIP_DEFAULT_CUTCONSTANT -10000.0 |
#define BENDERSCUT_NAME "integer" |
Definition at line 55 of file benderscut_int.c.
#define BENDERSCUT_DESC "Laporte and Louveaux Benders' decomposition integer cut" |
Definition at line 56 of file benderscut_int.c.
#define BENDERSCUT_PRIORITY 0 |
Definition at line 57 of file benderscut_int.c.
#define BENDERSCUT_LPCUT FALSE |
Definition at line 58 of file benderscut_int.c.
#define SCIP_DEFAULT_ADDCUTS FALSE /** Should cuts be generated, instead of constraints */ |
Definition at line 60 of file benderscut_int.c.
Referenced by SCIPincludeBenderscutInt(), SCIPincludeBenderscutNogood(), and SCIPincludeBenderscutOpt().
#define SCIP_DEFAULT_CUTCONSTANT -10000.0 |
Definition at line 61 of file benderscut_int.c.
Referenced by SCIPincludeBenderscutInt().
|
static |
method to call, when the priority of a Benders' decomposition was changed
Definition at line 80 of file benderscut_int.c.
References assert(), i, NULL, SCIP_OKAY, and SCIPparamGetData().
|
static |
creates the Benders' decomposition cut data
scip | the SCIP data structure |
benderscutdata | the Benders' cut data |
Definition at line 97 of file benderscut_int.c.
References assert(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and TRUE.
Referenced by SCIP_DECL_BENDERSCUTINIT().
|
static |
updates the cut constant for the given subproblem based upon the global bounds of the associated auxiliary variable
masterprob | the SCIP instance of the master problem |
benders | the benders' decomposition structure |
benderscutdata | the Benders' decomposition cut data |
probnumber | the index for the subproblem |
Definition at line 126 of file benderscut_int.c.
References assert(), NULL, SCIPbendersGetAuxiliaryVar(), SCIPbendersGetSubproblemLowerbound(), SCIPisGT(), SCIPvarGetLbGlobal(), and TRUE.
Referenced by generateAndApplyBendersIntegerCuts().
|
static |
computes a standard Benders' optimality cut from the dual solutions of the LP
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 |
cutconstant | the constant value in the integer optimality cut |
probnumber | the number of the pricing problem |
addcut | indicates whether a cut is created instead of a constraint |
success | was the cut generation successful? |
Definition at line 158 of file benderscut_int.c.
References assert(), FALSE, i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPaddVarToRow(), SCIPbendersGetSubproblemObjval(), SCIPbendersSubproblem(), SCIPchgLhsLinear(), SCIPchgRowLhs(), SCIPdebug, SCIPdebugMsg, SCIPgetActivityLinear(), SCIPgetBendersSubproblemVar(), SCIPgetBestSol(), SCIPgetLhsLinear(), SCIPgetNVars(), SCIPgetObjsense(), SCIPgetRowSolActivity(), SCIPgetSolOrigObj(), SCIPgetSolVal(), SCIPgetVars(), SCIPisFeasEQ(), SCIPisInfinity(), SCIProwGetLhs(), sol, TRUE, and vars.
Referenced by generateAndApplyBendersIntegerCuts().
|
static |
adds the auxiliary variable to the generated cut. If this is the first optimality cut for the subproblem, then the auxiliary variable is first created and added to the master problem.
masterprob | the SCIP instance of the master problem |
benders | the benders' decomposition structure |
cons | the constraint for the generated cut, can be NULL |
row | the row for the generated cut, can be NULL |
probnumber | the number of the pricing problem |
addcut | indicates whether a cut is created instead of a constraint |
Definition at line 283 of file benderscut_int.c.
References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCoefLinear(), SCIPaddVarToRow(), and SCIPbendersGetAuxiliaryVar().
Referenced by generateAndApplyBendersIntegerCuts().
|
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 |
probnumber | the number of the pricing problem |
type | the enforcement type calling this function |
result | the result from solving the subproblems |
initcons | is this function called to generate the initial constraint |
Definition at line 317 of file benderscut_int.c.
References addAuxiliaryVariableToCut(), assert(), BENDERSCUT_NAME, computeStandardIntegerOptCut(), FALSE, generateAndApplyBendersIntegerCuts(), NULL, result, SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSENFOTYPE_LP, SCIP_BENDERSENFOTYPE_PSEUDO, SCIP_BENDERSENFOTYPE_RELAX, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTFIND, SCIP_FEASIBLE, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIP_STAGE_INITSOLVE, SCIPaddCons(), SCIPaddPoolCut(), SCIPaddRow(), SCIPbenderscutGetData(), SCIPbenderscutGetNFound(), SCIPbendersGetAuxiliaryVar(), SCIPcheckBendersSubproblemOptimality(), SCIPchgLhsLinear(), SCIPchgRowLhs(), SCIPcreateConsBasicLinear(), SCIPcreateEmptyRowConshdlr(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPfindConshdlr(), SCIPgetLhsLinear(), SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPgetStage(), SCIPinfinity(), SCIPinfoMessage(), SCIPisInfinity(), SCIPprintRow(), SCIPreleaseCons(), SCIPreleaseRow(), SCIProwGetLhs(), SCIPsetConsDynamic(), SCIPsetConsRemovable(), SCIPsnprintf(), SCIPvarGetLbGlobal(), sol, TRUE, and updateSubproblemCutConstant().
Referenced by generateAndApplyBendersIntegerCuts(), and SCIP_DECL_BENDERSCUTEXEC().
|
static |
destructor of Benders' decomposition cuts to free user data (called when SCIP is exiting)
Definition at line 508 of file benderscut_int.c.
References assert(), BENDERSCUT_NAME, NULL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPbenderscutGetName(), SCIPbenderscutSetData(), and SCIPfreeBlockMemory.
|
static |
initialization method of Benders' decomposition cuts (called after problem was transformed)
Definition at line 529 of file benderscut_int.c.
References assert(), BENDERSCUT_NAME, createBenderscutData(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPbenderscutGetName(), and SCIPbendersGetNSubproblems().
|
static |
deinitialization method of Benders' decomposition cuts (called before transformed problem is freed)
Definition at line 548 of file benderscut_int.c.
References assert(), BENDERSCUT_NAME, NULL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPbenderscutGetName(), and SCIPfreeBlockMemoryArray.
|
static |
execution method of Benders' decomposition cuts
Definition at line 567 of file benderscut_int.c.
References assert(), BENDERSCUT_NAME, FALSE, generateAndApplyBendersIntegerCuts(), NULL, result, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_STATUS_OPTIMAL, SCIPbenderscutSetEnabled(), SCIPbendersGetNSubproblems(), SCIPbendersMasterIsNonlinear(), SCIPbendersSubproblem(), SCIPdebugMsg, SCIPgetNBinVars(), SCIPgetNVars(), SCIPgetStatus(), SCIPinfoMessage(), and sol.