Alternative feasibility cuts for Benders' decomposition.
Definition in file benderscut_feasalt.c.
#include <assert.h>
#include <string.h>
#include "scip/pub_expr.h"
#include "scip/benderscut_feasalt.h"
#include "scip/benderscut_opt.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_misc_linear.h"
#include "scip/pub_nlp.h"
#include "scip/pub_var.h"
#include "scip/scip_benders.h"
#include "scip/scip_cons.h"
#include "scip/scip_general.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nlp.h"
#include "scip/scip_nlpi.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_timing.h"
#include "scip/scip_var.h"
Go to the source code of this file.
Macros | |
#define | BENDERSCUT_NAME "feasalt" |
#define | BENDERSCUT_DESC "Alternative feasibility cuts for Benders' decomposition" |
#define | BENDERSCUT_PRIORITY 10001 |
#define | BENDERSCUT_LPCUT TRUE |
#define | SCIP_DEFAULT_DISPLAYFREQ 20 |
#define | SLACKVAR_NAME |
Functions | |
static SCIP_RETCODE | freeNonlinearProblem (SCIP *masterprob, SCIP *subproblem, SCIP_BENDERSCUT *benderscut) |
static SCIP_RETCODE | solveFeasibilityNonlinearSubproblem (SCIP *scip, SCIP_BENDERSCUTDATA *benderscutdata, SCIP_Bool *success) |
static SCIP_RETCODE | createAuxiliaryNonlinearSubproblem (SCIP *masterprob, SCIP *subproblem, SCIP_BENDERSCUT *benderscut) |
static SCIP_RETCODE | updateAuxiliaryNonlinearSubproblem (SCIP *subproblem, SCIP_BENDERSCUT *benderscut) |
static SCIP_RETCODE | generateAndApplyBendersCuts (SCIP *masterprob, SCIP *subproblem, SCIP_BENDERS *benders, SCIP_BENDERSCUT *benderscut, SCIP_SOL *sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT *result) |
static | SCIP_DECL_BENDERSCUTEXIT (benderscutExitFeasalt) |
static | SCIP_DECL_BENDERSCUTFREE (benderscutFreeFeasalt) |
static | SCIP_DECL_BENDERSCUTEXEC (benderscutExecFeasalt) |
SCIP_RETCODE | SCIPincludeBenderscutFeasalt (SCIP *scip, SCIP_BENDERS *benders) |
#define BENDERSCUT_NAME "feasalt" |
Definition at line 62 of file benderscut_feasalt.c.
#define BENDERSCUT_DESC "Alternative feasibility cuts for Benders' decomposition" |
Definition at line 63 of file benderscut_feasalt.c.
#define BENDERSCUT_PRIORITY 10001 |
Definition at line 64 of file benderscut_feasalt.c.
#define BENDERSCUT_LPCUT TRUE |
Definition at line 65 of file benderscut_feasalt.c.
#define SCIP_DEFAULT_DISPLAYFREQ 20 |
Definition at line 67 of file benderscut_feasalt.c.
Referenced by generateAndApplyBendersCuts().
#define SLACKVAR_NAME |
Definition at line 68 of file benderscut_feasalt.c.
|
static |
frees the non linear problem
masterprob | the SCIP instance of the master problem |
subproblem | the SCIP instance of the pricing problem |
benderscut | the Benders' decomposition structure |
Definition at line 94 of file benderscut_feasalt.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPfreeBlockMemoryArray, and SCIPhashmapFree().
Referenced by createAuxiliaryNonlinearSubproblem(), and SCIP_DECL_BENDERSCUTEXEC().
|
static |
solves the auxiliary feasibility subproblem.
scip | SCIP data structure |
benderscutdata | Benders' cut data |
success | returns whether solving the feasibility problem was successful |
Definition at line 138 of file benderscut_feasalt.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_OKAY, SCIPdebugMsg, SCIPsolveNlpi, and TRUE.
Referenced by generateAndApplyBendersCuts().
|
static |
builds the non-linear problem to resolve to generate a cut for the infeasible subproblem
masterprob | the SCIP instance of the master problem |
subproblem | the SCIP instance of the pricing problem |
benderscut | the benders' decomposition cut method |
Definition at line 167 of file benderscut_feasalt.c.
References assert(), FALSE, freeNonlinearProblem(), i, NULL, obj, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPbenderscutGetData(), SCIPblkmem(), SCIPcreateNlpiProblemFromNlRows(), SCIPduplicateBlockMemoryArray, SCIPfreeBufferArray, SCIPgetNlpis(), SCIPgetNLPNlRows(), SCIPgetNNLPNlRows(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapGetImageInt(), SCIPinfinity(), SCIPvarGetName(), and SLACKVAR_NAME.
Referenced by generateAndApplyBendersCuts().
|
static |
updates the non-linear problem that is resolved to generate a cut for the infeasible subproblem
subproblem | the SCIP instance of the pricing problem |
benderscut | the benders' decomposition cut method |
Definition at line 242 of file benderscut_feasalt.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPinfinity(), and SCIPupdateNlpiProblem().
Referenced by generateAndApplyBendersCuts().
|
static |
generates and applies Benders' cuts
masterprob | the SCIP instance of the master problem |
subproblem | the SCIP instance of the pricing 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 |
Definition at line 272 of file benderscut_feasalt.c.
References assert(), createAuxiliaryNonlinearSubproblem(), FALSE, i, NULL, obj, result, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_DEFAULT_DISPLAYFREQ, SCIP_DIDNOTFIND, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VERBLEVEL_NORMAL, SCIPbenderscutGetData(), SCIPbenderscutGetNFound(), SCIPdebugMsg, SCIPgenerateAndApplyBendersOptCut(), SCIPgetDualbound(), SCIPgetStage(), SCIPhashmapExists(), SCIPhashmapGetImageInt(), SCIPisInfinity(), SCIPisZero(), SCIPprintDisplayLine(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetObj(), SCIPverbMessage(), sol, solveFeasibilityNonlinearSubproblem(), TRUE, and updateAuxiliaryNonlinearSubproblem().
Referenced by SCIP_DECL_BENDERSCUTEXEC().
|
static |
deinitialization method of Benders' decomposition cuts (called before transformed problem is freed)
Definition at line 384 of file benderscut_feasalt.c.
References assert(), BENDERSCUT_NAME, NULL, SCIP_OKAY, and SCIPbenderscutGetName().
|
static |
destructor of the Benders' decomposition cut to free user data (called when SCIP is exiting)
Definition at line 394 of file benderscut_feasalt.c.
References assert(), NULL, SCIP_OKAY, SCIPbenderscutGetData(), and SCIPfreeBlockMemory.
|
static |
execution method of Benders' decomposition cuts
Definition at line 411 of file benderscut_feasalt.c.
References assert(), BENDERSCUT_NAME, freeNonlinearProblem(), generateAndApplyBendersCuts(), NULL, result, SCIP_BENDERSSUBTYPE_CONVEXDIS, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPdebugMsg, SCIPgetNLPSolstat(), SCIPgetNNlpis(), SCIPgetStage(), SCIPisNLPConstructed(), and sol.