methods for presolvers
Definition in file presol.c.
#include <assert.h>
#include <string.h>
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/set.h"
#include "scip/clock.h"
#include "scip/paramset.h"
#include "scip/scip.h"
#include "scip/pub_misc.h"
#include "scip/presol.h"
#include "scip/struct_presol.h"
Go to the source code of this file.
|
static |
method to call, when the priority of a presolver was changed
Definition at line 70 of file presol.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetPresolPriority().
SCIP_RETCODE SCIPpresolCopyInclude | ( | SCIP_PRESOL * | presol, |
SCIP_SET * | set ) |
copies the given presolver to a new scip
Definition at line 84 of file presol.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPpresolGetName(), and SCIPsetDebugMsg.
Referenced by SCIPsetCopyPlugins().
|
static |
internal method for creating a presolver
presol | pointer to store presolver |
set | global SCIP settings |
messagehdlr | message handler |
blkmem | block memory for parameter settings |
name | name of presolver |
desc | description of presolver |
priority | priority of the presolver (>= 0: before, < 0: after constraint handlers) |
maxrounds | maximal number of presolving rounds the presolver participates in (-1: no limit) |
timing | timing mask of the presolver |
presoldata | presolver data |
Definition at line 103 of file presol.c.
References assert(), BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_DECL_PRESOLCOPY, SCIP_DECL_PRESOLEXEC, SCIP_DECL_PRESOLEXIT, SCIP_DECL_PRESOLFREE, SCIP_DECL_PRESOLINIT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PARAMETERWRONGVAL, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_FINAL, SCIP_PRESOLTIMING_MAX, SCIP_PRESOLTIMING_MEDIUM, SCIPclockCreate(), SCIPmessagePrintError(), SCIPsetAddIntParam(), SCIPsnprintf(), and TRUE.
Referenced by SCIPpresolCreate().
SCIP_RETCODE SCIPpresolCreate | ( | SCIP_PRESOL ** | presol, |
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
BMS_BLKMEM * | blkmem, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
int | maxrounds, | ||
SCIP_PRESOLTIMING | timing, | ||
SCIP_DECL_PRESOLCOPY((*presolcopy)) | , | ||
SCIP_DECL_PRESOLFREE((*presolfree)) | , | ||
SCIP_DECL_PRESOLINIT((*presolinit)) | , | ||
SCIP_DECL_PRESOLEXIT((*presolexit)) | , | ||
SCIP_DECL_PRESOLINITPRE((*presolinitpre)) | , | ||
SCIP_DECL_PRESOLEXITPRE((*presolexitpre)) | , | ||
SCIP_DECL_PRESOLEXEC((*presolexec)) | , | ||
SCIP_PRESOLDATA * | presoldata ) |
creates a presolver
presol | pointer to store presolver |
set | global SCIP settings |
messagehdlr | message handler |
blkmem | block memory for parameter settings |
name | name of presolver |
desc | description of presolver |
priority | priority of the presolver (>= 0: before, < 0: after constraint handlers) |
maxrounds | maximal number of presolving rounds the presolver participates in (-1: no limit) |
timing | timing mask of the presolver |
presoldata | presolver data |
Definition at line 180 of file presol.c.
References assert(), doPresolCreate(), NULL, SCIP_CALL_FINALLY, SCIP_DECL_PRESOLCOPY, SCIP_DECL_PRESOLEXEC, SCIP_DECL_PRESOLEXIT, SCIP_DECL_PRESOLFREE, SCIP_DECL_PRESOLINIT, SCIP_OKAY, and SCIPpresolFree().
Referenced by SCIPincludePresol(), and SCIPincludePresolBasic().
SCIP_RETCODE SCIPpresolFree | ( | SCIP_PRESOL ** | presol, |
SCIP_SET * | set ) |
frees memory of presolver
presol | pointer to presolver data structure |
set | global SCIP settings |
Definition at line 212 of file presol.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().
Referenced by SCIPpresolCreate().
SCIP_RETCODE SCIPpresolInit | ( | SCIP_PRESOL * | presol, |
SCIP_SET * | set ) |
initializes presolver
presol | presolver |
set | global SCIP settings |
Definition at line 239 of file presol.c.
References assert(), SCIP_Presol::initialized, SCIP_Presol::lastnaddconss, SCIP_Presol::lastnaddholes, SCIP_Presol::lastnaggrvars, SCIP_Presol::lastnchgbds, SCIP_Presol::lastnchgcoefs, SCIP_Presol::lastnchgsides, SCIP_Presol::lastnchgvartypes, SCIP_Presol::lastndelconss, SCIP_Presol::lastnfixedvars, SCIP_Presol::lastnupgdconss, SCIP_Presol::naddconss, SCIP_Presol::naddholes, SCIP_Presol::naggrvars, SCIP_Presol::name, SCIP_Presol::ncalls, SCIP_Presol::nchgbds, SCIP_Presol::nchgcoefs, SCIP_Presol::nchgsides, SCIP_Presol::nchgvartypes, SCIP_Presol::ndelconss, SCIP_Presol::nfixedvars, NULL, SCIP_Presol::nupgdconss, SCIP_Presol::presolclock, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIP_Presol::setuptime, and TRUE.
SCIP_RETCODE SCIPpresolExit | ( | SCIP_PRESOL * | presol, |
SCIP_SET * | set ) |
deinitializes presolver
presol | presolver |
set | global SCIP settings |
Definition at line 298 of file presol.c.
References assert(), FALSE, SCIP_Presol::initialized, SCIP_Presol::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Presol::setuptime.
SCIP_RETCODE SCIPpresolInitpre | ( | SCIP_PRESOL * | presol, |
SCIP_SET * | set ) |
informs presolver that the presolving process is being started
presol | presolver |
set | global SCIP settings |
Definition at line 329 of file presol.c.
References assert(), SCIP_Presol::lastnaddconss, SCIP_Presol::lastnaddholes, SCIP_Presol::lastnaggrvars, SCIP_Presol::lastnchgbds, SCIP_Presol::lastnchgcoefs, SCIP_Presol::lastnchgsides, SCIP_Presol::lastnchgvartypes, SCIP_Presol::lastndelconss, SCIP_Presol::lastnfixedvars, SCIP_Presol::lastnupgdconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Presol::setuptime.
SCIP_RETCODE SCIPpresolExitpre | ( | SCIP_PRESOL * | presol, |
SCIP_SET * | set ) |
informs presolver that the presolving process is finished
presol | presolver |
set | global SCIP settings |
Definition at line 364 of file presol.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Presol::setuptime.
SCIP_RETCODE SCIPpresolExec | ( | SCIP_PRESOL * | presol, |
SCIP_SET * | set, | ||
SCIP_PRESOLTIMING | timing, | ||
int | nrounds, | ||
int * | nfixedvars, | ||
int * | naggrvars, | ||
int * | nchgvartypes, | ||
int * | nchgbds, | ||
int * | naddholes, | ||
int * | ndelconss, | ||
int * | naddconss, | ||
int * | nupgdconss, | ||
int * | nchgcoefs, | ||
int * | nchgsides, | ||
SCIP_RESULT * | result ) |
executes presolver
presol | presolver |
set | global SCIP settings |
timing | current presolving timing |
nrounds | number of presolving rounds already done |
nfixedvars | pointer to total number of variables fixed of all presolvers |
naggrvars | pointer to total number of variables aggregated of all presolvers |
nchgvartypes | pointer to total number of variable type changes of all presolvers |
nchgbds | pointer to total number of variable bounds tightened of all presolvers |
naddholes | pointer to total number of domain holes added of all presolvers |
ndelconss | pointer to total number of deleted constraints of all presolvers |
naddconss | pointer to total number of added constraints of all presolvers |
nupgdconss | pointer to total number of upgraded constraints of all presolvers |
nchgcoefs | pointer to total number of changed coefficients of all presolvers |
nchgsides | pointer to total number of changed left/right hand sides of all presolvers |
result | pointer to store the result of the callback method |
Definition at line 388 of file presol.c.
References assert(), SCIP_Presol::lastnaddconss, SCIP_Presol::lastnaddholes, SCIP_Presol::lastnaggrvars, SCIP_Presol::lastnchgbds, SCIP_Presol::lastnchgcoefs, SCIP_Presol::lastnchgsides, SCIP_Presol::lastnchgvartypes, SCIP_Presol::lastndelconss, SCIP_Presol::lastnfixedvars, SCIP_Presol::lastnupgdconss, SCIP_Presol::maxrounds, SCIP_Presol::naddconss, SCIP_Presol::naddholes, SCIP_Presol::naggrvars, SCIP_Presol::name, SCIP_Presol::ncalls, SCIP_Presol::nchgbds, SCIP_Presol::nchgcoefs, SCIP_Presol::nchgsides, SCIP_Presol::nchgvartypes, SCIP_Presol::ndelconss, SCIP_Presol::nfixedvars, NULL, SCIP_Presol::nupgdconss, SCIP_Presol::presolclock, result, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_SUCCESS, SCIP_UNBOUNDED, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPsetDebugMsg, and SCIP_Presol::timing.
Referenced by presolveRound().
void SCIPpresolSetCopy | ( | SCIP_PRESOL * | presol | ) |
sets copy method of presolver
presol | presolver copy method of presolver or NULL if you don't want to copy your plugin into sub-SCIPs |
Definition at line 533 of file presol.c.
References assert(), NULL, and SCIP_DECL_PRESOLCOPY.
Referenced by SCIPsetPresolCopy().
void SCIPpresolSetFree | ( | SCIP_PRESOL * | presol | ) |
sets destructor method of presolver
presol | presolver destructor of presolver |
Definition at line 544 of file presol.c.
References assert(), NULL, and SCIP_DECL_PRESOLFREE.
Referenced by SCIPsetPresolFree().
void SCIPpresolSetInit | ( | SCIP_PRESOL * | presol | ) |
sets initialization method of presolver
presol | presolver initialize presolver |
Definition at line 555 of file presol.c.
References assert(), NULL, and SCIP_DECL_PRESOLINIT.
Referenced by SCIPsetPresolInit().
void SCIPpresolSetExit | ( | SCIP_PRESOL * | presol | ) |
sets deinitialization method of presolver
presol | presolver deinitialize presolver |
Definition at line 566 of file presol.c.
References assert(), NULL, and SCIP_DECL_PRESOLEXIT.
Referenced by SCIPsetPresolExit().
void SCIPpresolSetInitpre | ( | SCIP_PRESOL * | presol | ) |
sets solving process initialization method of presolver
presol | presolver solving process initialization method of presolver |
Definition at line 577 of file presol.c.
References assert(), NULL, and SCIP_DECL_PRESOLINITPRE.
Referenced by SCIPsetPresolInitpre().
void SCIPpresolSetExitpre | ( | SCIP_PRESOL * | presol | ) |
sets solving process deinitialization method of presolver
presol | presolver solving process deinitialization method of presolver |
Definition at line 588 of file presol.c.
References assert(), NULL, and SCIP_DECL_PRESOLEXITPRE.
Referenced by SCIPsetPresolExitpre().
void SCIPpresolSetPriority | ( | SCIP_PRESOL * | presol, |
SCIP_SET * | set, | ||
int | priority ) |
sets priority of presolver
presol | presolver |
set | global SCIP settings |
priority | new priority of the presolver |
Definition at line 639 of file presol.c.
References assert(), FALSE, NULL, and SCIP_Presol::priority.
Referenced by SCIPsetPresolPriority().
void SCIPpresolEnableOrDisableClocks | ( | SCIP_PRESOL * | presol, |
SCIP_Bool | enable ) |
enables or disables all clocks of presol
, depending on the value of the flag
presol | the presolver for which all clocks should be enabled or disabled |
enable | should the clocks of the presolver be enabled? |
Definition at line 685 of file presol.c.
References assert(), NULL, SCIP_Presol::presolclock, SCIP_Bool, SCIPclockEnableOrDisable(), and SCIP_Presol::setuptime.