Detailed Description
run Benders algorithm
Run Benders algorithm using an oracle for solving the subproblems and solving the master problem to optimality.
Definition in file benders.c.
#include "benders.h"
Go to the source code of this file.
Macros | |
#define | MAXITERATIONS 10000 |
Functions | |
static SCIP_RETCODE | printStatus (SCIP *masterscip, SCIP_STATUS status) |
static SCIP_RETCODE | printShortStatistics (SCIP *masterscip, SCIP_STATUS status, SCIP_CLOCK *totaltimeclock, SCIP_Real primalbound, SCIP_Real dualbound, SCIP_Longint ntotalnodes, int niter) |
static SCIP_RETCODE | printLongStatistics (SCIP *masterscip, SCIP_STATUS status, SCIP_CLOCK *totaltimeclock, SCIP_CLOCK *oracletimeclock, SCIP_CLOCK *mastertimeclock, SCIP_Real primalbound, SCIP_Real dualbound, SCIP_Longint ntotalnodes, SCIP_Longint ntotalcuts, int niter) |
SCIP_RETCODE | runBenders (SCIP *masterscip, BENDERS_CUTORACLE((*Oracle)), BENDERS_DATA *data, SCIP_Real timelimit, SCIP_Real memlimit, int dispfreq, SCIP_Bool usereopt, SCIP_Bool solvemasterapprox, SCIP_Longint masterstallnodes, SCIP_Real mastergaplimit, SCIP_VERBLEVEL verblevel, SCIP_STATUS *status) |
Macro Definition Documentation
◆ MAXITERATIONS
#define MAXITERATIONS 10000 |
maximal number of iterations of main loop
Definition at line 26 of file benders.c.
Referenced by runBenders().
Function Documentation
◆ printStatus()
|
static |
output status
- Parameters
-
masterscip master problem SCIP instance status solution status
Definition at line 31 of file benders.c.
References NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, SCIPerrorMessage, and SCIPinfoMessage().
Referenced by printLongStatistics(), printShortStatistics(), and polyscip::Polyscip::writeResults().
◆ printShortStatistics()
|
static |
output short statistics
- Parameters
-
masterscip master problem SCIP instance status solution status totaltimeclock clock for total time primalbound primal bound dualbound dual bound ntotalnodes total number of nodes niter number of iterations
Definition at line 88 of file benders.c.
References fabs(), NULL, printStatus(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetClockTime(), SCIPinfoMessage(), and SCIPisInfinity().
Referenced by runBenders().
◆ printLongStatistics()
|
static |
output long statistics
- Parameters
-
masterscip master problem SCIP instance status solution status totaltimeclock clock for total time oracletimeclock clock for oracle mastertimeclock clock for master problem primalbound primal bound dualbound dual bound ntotalnodes total number of nodes ntotalcuts total number of cuts niter number of iterations
Definition at line 124 of file benders.c.
References fabs(), NULL, printStatus(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetClockTime(), SCIPgetNBinVars(), SCIPgetNConss(), SCIPgetNContVars(), SCIPgetNImplVars(), SCIPgetNIntVars(), SCIPgetNOrigConss(), SCIPgetNOrigVars(), SCIPgetNVars(), SCIPgetProbName(), SCIPinfoMessage(), and SCIPisInfinity().
Referenced by runBenders().
◆ runBenders()
SCIP_RETCODE runBenders | ( | SCIP * | masterscip, |
BENDERS_CUTORACLE((*Oracle)) | , | ||
BENDERS_DATA * | data, | ||
SCIP_Real | timelimit, | ||
SCIP_Real | memlimit, | ||
int | dispfreq, | ||
SCIP_Bool | usereopt, | ||
SCIP_Bool | solvemasterapprox, | ||
SCIP_Longint | masterstallnodes, | ||
SCIP_Real | mastergaplimit, | ||
SCIP_VERBLEVEL | verblevel, | ||
SCIP_STATUS * | status | ||
) |
run Benders algorithm using an oracle for the subproblems
- Parameters
-
masterscip master SCIP instance data user data for oracle timelimit time limit read from arguments memlimit memory limit read from arguments dispfreq display frequency usereopt Use reoptimization? solvemasterapprox Solve master problem approximately? masterstallnodes stall nodes for master problem if solvemasterapprox is true mastergaplimit gap limit for master problem if solvemasterapprox is true verblevel verbosity level for output status status of optimization
Definition at line 198 of file benders.c.
References BENDERS_STATUS_ADDEDCUT, BENDERS_STATUS_SUCESS, BENDERS_STATUS_TIMELIMIT, BENDERS_STATUS_UNKNOWN, BENDERS_STATUS_USERINTERRUPT, FALSE, MAX, MAXITERATIONS, NULL, printLongStatistics(), printShortStatistics(), SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_OPTIMAL, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, SCIP_VERBLEVEL_NORMAL, SCIPallocClearBlockMemoryArray, SCIPcreateClock(), SCIPdebugMessage, SCIPdispInt(), SCIPdispLongint(), SCIPdispTime(), SCIPenableReoptimization(), SCIPerrorMessage, SCIPfreeBlockMemoryArray, SCIPfreeClock(), SCIPfreeTransform(), SCIPgetBestSol(), SCIPgetClockTime(), SCIPgetDualbound(), SCIPgetGap(), SCIPgetMessagehdlr(), SCIPgetNIntVars(), SCIPgetNOrigConss(), SCIPgetNOrigVars(), SCIPgetNTotalNodes(), SCIPgetOrigVarsData(), SCIPgetSolOrigObj(), SCIPgetSolVal(), SCIPgetStatus(), SCIPinfinity(), SCIPinfoMessage(), SCIPisInfinity(), SCIPisIntegral(), SCIPmessageFPrintInfo(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetRealParam(), SCIPsolve(), SCIPstartClock(), SCIPstopClock(), and TRUE.
Referenced by solveClassification(), and solveMinIISC().