methods for Benders' decomposition cuts plugins
SCIP_DECL_SORTPTRCOMP | ( | SCIPbenderscutComp | ) |
compares two Benders' decomposition cuts w. r. to their priority
compares two Benders' cuts w. r. to their delay positions and their priority
Definition at line 53 of file benderscut.c.
SCIP_DECL_SORTPTRCOMP | ( | SCIPbenderscutCompName | ) |
comparison method for sorting Benders' decomposition cuts w.r.t. to their name
comparison method for sorting Benders' cuts w.r.t. to their name
Definition at line 65 of file benderscut.c.
References i, and SCIPbenderscutGetName().
SCIP_BENDERSCUTDATA * SCIPbenderscutGetData | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets user data of the Benders' decomposition cut
benderscut | Benders' decomposition cut |
Definition at line 403 of file benderscut.c.
References assert(), i, and NULL.
Referenced by createAuxiliaryNonlinearSubproblem(), freeNonlinearProblem(), generateAndApplyBendersCuts(), generateAndApplyBendersIntegerCuts(), generateAndApplyBendersNogoodCut(), SCIP_DECL_BENDERSCUTCOPY(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXIT(), SCIP_DECL_BENDERSCUTEXIT(), SCIP_DECL_BENDERSCUTEXITSOL(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTINIT(), SCIP_DECL_BENDERSCUTINIT(), SCIP_DECL_BENDERSCUTINITSOL(), SCIPfindObjBenderscut(), SCIPgenerateAndApplyBendersOptCut(), SCIPgetObjBenderscut(), and updateAuxiliaryNonlinearSubproblem().
void SCIPbenderscutSetData | ( | SCIP_BENDERSCUT * | benderscut, |
SCIP_BENDERSCUTDATA * | benderscutdata ) |
sets user data of the Benders' decomposition cut; user has to free old data in advance!
benderscut | Benders' decomposition cut |
benderscutdata | new Benders' decomposition cut user data |
Definition at line 413 of file benderscut.c.
References assert(), i, and NULL.
Referenced by SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), and SCIP_DECL_BENDERSCUTFREE().
const char * SCIPbenderscutGetName | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets name of the Benders' decomposition cut
benderscut | Benders' decomposition cut |
Definition at line 492 of file benderscut.c.
References assert(), i, and NULL.
Referenced by SCIP_DECL_BENDERSCUTEXIT(), SCIP_DECL_BENDERSCUTEXIT(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTFREE(), SCIP_DECL_BENDERSCUTINIT(), SCIP_DECL_SORTPTRCOMP(), SCIPbenderscutCopyInclude(), SCIPfindBenderscut(), and SCIPprintBendersStatistics().
const char * SCIPbenderscutGetDesc | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets description of the Benders' decomposition cut
benderscut | Benders' decomposition cut |
Definition at line 502 of file benderscut.c.
int SCIPbenderscutGetPriority | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets priority of the Benders' decomposition cut
benderscut | Benders' decomposition cut |
Definition at line 512 of file benderscut.c.
SCIP_Longint SCIPbenderscutGetNCalls | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets the number of times, the Benders' decomposition cut was called and tried to find a violated cut
gets the number of times, the heuristic was called and tried to find a solution
benderscut | Benders' decomposition cut |
Definition at line 533 of file benderscut.c.
References assert(), i, and NULL.
Referenced by SCIPprintBendersStatistics().
SCIP_Longint SCIPbenderscutGetNFound | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets the number of the cuts found by this Benders' decomposition cut
gets the number of Benders' cuts found by this Benders' decomposition cut
benderscut | Benders' decomposition cut |
Definition at line 543 of file benderscut.c.
References assert(), i, and NULL.
Referenced by generateAndApplyBendersCuts(), generateAndApplyBendersCuts(), generateAndApplyBendersIntegerCuts(), generateAndApplyBendersNogoodCut(), generateBendersCuts(), SCIP_DECL_BENDERSCUTEXEC(), and SCIPprintBendersStatistics().
SCIP_Bool SCIPbenderscutIsInitialized | ( | SCIP_BENDERSCUT * | benderscut | ) |
is the Benders' decomposition cut initialized?
benderscut | Benders' decomposition cut |
Definition at line 553 of file benderscut.c.
SCIP_Real SCIPbenderscutGetSetupTime | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets time in seconds used in this Benders' decomposition cut for setting up for next stages
gets time in seconds used by this Benders' decomposition cut for setting up
benderscut | Benders' decomposition cut |
Definition at line 563 of file benderscut.c.
References assert(), i, NULL, and SCIPclockGetTime().
Referenced by SCIPprintBendersStatistics().
SCIP_Real SCIPbenderscutGetTime | ( | SCIP_BENDERSCUT * | benderscut | ) |
gets time in seconds used in this Benders' decomposition cut
benderscut | Benders' decomposition cut |
Definition at line 573 of file benderscut.c.
References assert(), i, NULL, and SCIPclockGetTime().
Referenced by SCIPprintBendersStatistics().
SCIP_Bool SCIPbenderscutIsLPCut | ( | SCIP_BENDERSCUT * | benderscut | ) |
returns whether the Benders' cut uses the LP information
benderscut | Benders' decomposition cut |
Definition at line 583 of file benderscut.c.
References assert(), i, and NULL.
Referenced by generateBendersCuts().
void SCIPbenderscutSetEnabled | ( | SCIP_BENDERSCUT * | benderscut, |
SCIP_Bool | enabled ) |
sets the enabled flag of the Benders' decomposition cut method
benderscut | Benders' decomposition cut |
enabled | flag to indicate whether the Benders' decomposition cut is enabled |
Definition at line 593 of file benderscut.c.
References assert(), i, and NULL.
Referenced by SCIP_DECL_BENDERSCUTEXEC(), and SCIP_DECL_BENDERSCUTEXEC().
SCIP_RETCODE SCIPincludeBenderscut | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
SCIP_Bool | islpcut, | ||
SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy)) | , | ||
SCIP_DECL_BENDERSCUTFREE((*benderscutfree)) | , | ||
SCIP_DECL_BENDERSCUTINIT((*benderscutinit)) | , | ||
SCIP_DECL_BENDERSCUTEXIT((*benderscutexit)) | , | ||
SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol)) | , | ||
SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol)) | , | ||
SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)) | , | ||
SCIP_BENDERSCUTDATA * | benderscutdata ) |
creates a Benders' cut algorithms and includes it in the associated Benders' decomposition
This should be called from the SCIPincludeBendersXyz for the associated Benders' decomposition. It is only possible to include a Benders' cut algorithm if a Benders' decomposition has already been included This should be done during the problem creation stage.
scip | SCIP data structure |
benders | Benders' decomposition |
name | name of Benders' decomposition cuts |
desc | description of Benders' decomposition cuts |
priority | priority of the Benders' decomposition cuts |
islpcut | indicates whether the cut is generated from the LP solution |
benderscutdata | Benders' decomposition cuts data |
Definition at line 1085 of file scip_benders.c.
References FALSE, i, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbenderscutCreate(), SCIPbendersIncludeBenderscut(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenderscut(), and TRUE.
Referenced by SCIPincludeObjBenderscut().
SCIP_RETCODE SCIPincludeBenderscutBasic | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_BENDERSCUT ** | benderscutptr, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
SCIP_Bool | islpcut, | ||
SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)) | , | ||
SCIP_BENDERSCUTDATA * | benderscutdata ) |
creates a Benders' cut and includes it an associated Benders' decomposition with all non-fundamental callbacks set to NULL
If needed, the non-fundamental callbacks can be added afterwards via setter functions SCIPsetBenderscutCopy(), SCIPsetBenderscutFree(), SCIPsetBenderscutInit(), SCIPsetBenderscutExit(), SCIPsetBenderscutInitsol(), SCIPsetBenderscutExitsol().
This should be done during the problem creation stage.
scip | SCIP data structure |
benders | Benders' decomposition |
benderscutptr | reference to a Benders' decomposition cut, or NULL |
name | name of Benders' decomposition |
desc | description of Benders' decomposition |
priority | priority of the Benders' decomposition |
islpcut | indicates whether the cut is generated from the LP solution |
benderscutdata | Benders' cut data |
Definition at line 1138 of file scip_benders.c.
References FALSE, i, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbenderscutCreate(), SCIPbendersIncludeBenderscut(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenderscut(), and TRUE.
Referenced by SCIPincludeBenderscutFeas(), SCIPincludeBenderscutFeasalt(), SCIPincludeBenderscutInt(), SCIPincludeBenderscutNogood(), and SCIPincludeBenderscutOpt().
SCIP_RETCODE SCIPsetBenderscutCopy | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut ) |
sets copy method of Benders' decomposition cut
scip | SCIP data structure |
benderscut | Benders' decomposition cut copy method of benderscut or NULL if you don't want to copy your plugin into sub-SCIPs |
Definition at line 1180 of file scip_benders.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutSetCopy(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBenderscutFree | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut ) |
sets destructor method of benderscut
scip | SCIP data structure |
benderscut | benderscut destructor of benderscut |
Definition at line 1204 of file scip_benders.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutSetFree(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBenderscutFeasalt(), SCIPincludeBenderscutInt(), SCIPincludeBenderscutNogood(), and SCIPincludeBenderscutOpt().
SCIP_RETCODE SCIPsetBenderscutInit | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut ) |
sets initialization method of benderscut
scip | SCIP data structure |
benderscut | benderscut initialize benderscut |
Definition at line 1228 of file scip_benders.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutSetInit(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBenderscutInt().
SCIP_RETCODE SCIPsetBenderscutExit | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut ) |
sets deinitialization method of benderscut
scip | SCIP data structure |
benderscut | benderscut deinitialize benderscut |
Definition at line 1252 of file scip_benders.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutSetExit(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBenderscutFeasalt(), and SCIPincludeBenderscutInt().
SCIP_RETCODE SCIPsetBenderscutInitsol | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut ) |
sets solving process initialization method of benderscut
scip | SCIP data structure |
benderscut | benderscut solving process initialization method of benderscut |
Definition at line 1276 of file scip_benders.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutSetInitsol(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBenderscutExitsol | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut ) |
sets solving process deinitialization method of benderscut
scip | SCIP data structure |
benderscut | benderscut solving process deinitialization method of benderscut |
Definition at line 1300 of file scip_benders.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutSetExitsol(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBenderscutPriority | ( | SCIP * | scip, |
SCIP_BENDERSCUT * | benderscut, | ||
int | priority ) |
sets the priority of a Benders' decomposition cut algorithm
scip | SCIP data structure |
benderscut | benderscut |
priority | new priority of the Benders' decomposition |
Definition at line 1324 of file scip_benders.c.
References assert(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutSetPriority(), SCIPbendersSetBenderscutsSorted(), SCIPcheckStage(), SCIPgetBenders(), SCIPgetNBenders(), and TRUE.
Referenced by SCIP_DECL_PARAMCHGD().
SCIP_RETCODE SCIPstoreBendersCut | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_VAR ** | vars, | ||
SCIP_Real * | vals, | ||
SCIP_Real | lhs, | ||
SCIP_Real | rhs, | ||
int | nvars ) |
adds the generated cuts to the Benders' cut storage
scip | the SCIP data structure |
benders | Benders' decomposition |
vars | the variables that have non-zero coefficients in the cut |
vals | the coefficients of the variables in the cut |
lhs | the left hand side of the cut |
rhs | the right hand side of the cut |
nvars | the number of variables with non-zero coefficients in the cut |
Definition at line 1366 of file scip_benders.c.
References assert(), FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPbendersStoreCut(), SCIPcheckStage(), TRUE, and vars.
Referenced by SCIPgenerateAndApplyBendersOptCut().
SCIP_RETCODE SCIPapplyBendersStoredCuts | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
applies the Benders' decomposition cuts in storage to the input SCIP instance
When calling the function, the user must be sure that the variables are associated with the input SCIP instance. The main use of this method is to transfer Benders' cuts between solvers in ParaSCIP.
applies the Benders' decomposition cuts in storage to the input SCIP instance
scip | the SCIP data structure |
benders | Benders' decomposition |
Definition at line 1434 of file scip_benders.c.
References assert(), createAndApplyStoredBendersCut(), i, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPbendersGetNStoredCuts(), SCIPbendersGetStoredCutData(), and vars.