Detailed Description
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) |
Macro Definition Documentation
◆ BENDERSCUT_NAME
#define BENDERSCUT_NAME "feasalt" |
Definition at line 62 of file benderscut_feasalt.c.
Referenced by SCIP_DECL_BENDERSCUTEXIT(), and SCIPincludeBenderscutFeasalt().
◆ BENDERSCUT_DESC
#define BENDERSCUT_DESC "Alternative feasibility cuts for Benders' decomposition" |
Definition at line 63 of file benderscut_feasalt.c.
Referenced by SCIPincludeBenderscutFeasalt().
◆ BENDERSCUT_PRIORITY
#define BENDERSCUT_PRIORITY 10001 |
Definition at line 64 of file benderscut_feasalt.c.
Referenced by SCIPincludeBenderscutFeasalt().
◆ BENDERSCUT_LPCUT
#define BENDERSCUT_LPCUT TRUE |
Definition at line 65 of file benderscut_feasalt.c.
Referenced by SCIPincludeBenderscutFeasalt().
◆ SCIP_DEFAULT_DISPLAYFREQ
#define SCIP_DEFAULT_DISPLAYFREQ 20 |
Definition at line 67 of file benderscut_feasalt.c.
Referenced by generateAndApplyBendersCuts().
◆ SLACKVAR_NAME
#define SLACKVAR_NAME |
Definition at line 68 of file benderscut_feasalt.c.
Referenced by createAuxiliaryNonlinearSubproblem().
Function Documentation
◆ freeNonlinearProblem()
|
static |
frees the non linear problem
- Parameters
-
masterprob the SCIP instance of the master problem subproblem the SCIP instance of the pricing problem benderscut the Benders' decomposition structure
Definition at line 95 of file benderscut_feasalt.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPfreeBlockMemoryArray, and SCIPhashmapFree().
Referenced by createAuxiliaryNonlinearSubproblem(), and SCIP_DECL_BENDERSCUTEXEC().
◆ solveFeasibilityNonlinearSubproblem()
|
static |
solves the auxiliary feasibility subproblem.
- Note
- : the variable fixings need to be setup before calling this function
- Parameters
-
scip SCIP data structure benderscutdata Benders' cut data success returns whether solving the feasibility problem was successful
Definition at line 139 of file benderscut_feasalt.c.
References FALSE, NULL, SCIP_CALL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_OKAY, SCIPdebugMsg, SCIPsolveNlpi, and TRUE.
Referenced by generateAndApplyBendersCuts().
◆ createAuxiliaryNonlinearSubproblem()
|
static |
builds the non-linear problem to resolve to generate a cut for the infeasible subproblem
- Parameters
-
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 168 of file benderscut_feasalt.c.
References FALSE, freeNonlinearProblem(), NULL, 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().
◆ updateAuxiliaryNonlinearSubproblem()
|
static |
updates the non-linear problem that is resolved to generate a cut for the infeasible subproblem
- Parameters
-
subproblem the SCIP instance of the pricing problem benderscut the benders' decomposition cut method
Definition at line 243 of file benderscut_feasalt.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutGetData(), SCIPinfinity(), and SCIPupdateNlpiProblem().
Referenced by generateAndApplyBendersCuts().
◆ generateAndApplyBendersCuts()
|
static |
generates and applies Benders' cuts
- Parameters
-
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 273 of file benderscut_feasalt.c.
References createAuxiliaryNonlinearSubproblem(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_DEFAULT_DISPLAYFREQ, SCIP_DIDNOTFIND, 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(), solveFeasibilityNonlinearSubproblem(), TRUE, and updateAuxiliaryNonlinearSubproblem().
Referenced by SCIP_DECL_BENDERSCUTEXEC().
◆ SCIP_DECL_BENDERSCUTEXIT()
|
static |
deinitialization method of Benders' decomposition cuts (called before transformed problem is freed)
Definition at line 385 of file benderscut_feasalt.c.
References BENDERSCUT_NAME, NULL, SCIP_OKAY, and SCIPbenderscutGetName().
◆ SCIP_DECL_BENDERSCUTFREE()
|
static |
destructor of the Benders' decomposition cut to free user data (called when SCIP is exiting)
Definition at line 395 of file benderscut_feasalt.c.
References NULL, SCIP_OKAY, SCIPbenderscutGetData(), and SCIPfreeBlockMemory.
◆ SCIP_DECL_BENDERSCUTEXEC()
|
static |
execution method of Benders' decomposition cuts
Definition at line 412 of file benderscut_feasalt.c.
References freeNonlinearProblem(), generateAndApplyBendersCuts(), NULL, SCIP_BENDERSSUBTYPE_CONVEXDIS, SCIP_Bool, SCIP_CALL, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPgetNLPSolstat(), SCIPgetNNlpis(), SCIPgetStage(), and SCIPisNLPConstructed().