methods and datastructures for propagators
Definition in file prop.c.
#include <assert.h>
#include <string.h>
#include "scip/def.h"
#include "scip/set.h"
#include "scip/stat.h"
#include "scip/clock.h"
#include "scip/paramset.h"
#include "scip/var.h"
#include "scip/scip.h"
#include "scip/prop.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/struct_prop.h"
Go to the source code of this file.
|
static |
method to call, when the priority of a propagator was changed
Definition at line 61 of file prop.c.
References SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetPropPriority().
|
static |
method to call, when the presolving priority of a propagator was changed
Definition at line 76 of file prop.c.
References SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetPropPresolPriority().
SCIP_RETCODE SCIPpropCopyInclude | ( | SCIP_PROP * | prop, |
SCIP_SET * | set | ||
) |
copies the given propagator to a new scip
prop | propagator |
set | SCIP_SET of SCIP to copy to |
Definition at line 90 of file prop.c.
References SCIP_CALL, SCIP_OKAY, SCIPpropGetName(), and SCIPsetDebugMsg.
SCIP_RETCODE SCIPpropCreate | ( | SCIP_PROP ** | prop, |
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
BMS_BLKMEM * | blkmem, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
int | freq, | ||
SCIP_Bool | delay, | ||
SCIP_PROPTIMING | timingmask, | ||
int | presolpriority, | ||
int | presolmaxrounds, | ||
SCIP_PRESOLTIMING | presoltiming, | ||
SCIP_DECL_PROPCOPY((*propcopy)) | , | ||
SCIP_DECL_PROPFREE((*propfree)) | , | ||
SCIP_DECL_PROPINIT((*propinit)) | , | ||
SCIP_DECL_PROPEXIT((*propexit)) | , | ||
SCIP_DECL_PROPINITPRE((*propinitpre)) | , | ||
SCIP_DECL_PROPEXITPRE((*propexitpre)) | , | ||
SCIP_DECL_PROPINITSOL((*propinitsol)) | , | ||
SCIP_DECL_PROPEXITSOL((*propexitsol)) | , | ||
SCIP_DECL_PROPPRESOL((*proppresol)) | , | ||
SCIP_DECL_PROPEXEC((*propexec)) | , | ||
SCIP_DECL_PROPRESPROP((*propresprop)) | , | ||
SCIP_PROPDATA * | propdata | ||
) |
creates a propagator
prop | pointer to propagator data structure |
set | global SCIP settings |
messagehdlr | message handler |
blkmem | block memory for parameter settings |
name | name of propagator |
desc | description of propagator |
priority | priority of the propagator (>= 0: before, < 0: after constraint handlers) |
freq | frequency for calling propagator |
delay | should propagator be delayed, if other propagators found reductions? |
timingmask | positions in the node solving loop where propagator should be executed |
presolpriority | priority of the propagator (>= 0: before, < 0: after constraint handlers) |
presolmaxrounds | maximal number of presolving rounds the propagator participates in (-1: no limit) |
presoltiming | timing mask of the propagator's presolving method |
propdata | propagator data |
Definition at line 108 of file prop.c.
References BMSallocMemory, BMSduplicateMemoryArray, FALSE, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_MAXTREEDEPTH, SCIP_OKAY, SCIP_PARAMETERWRONGVAL, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_FINAL, SCIP_PRESOLTIMING_MAX, SCIP_PRESOLTIMING_MEDIUM, SCIP_PRESOLTIMING_NONE, SCIP_PROPTIMING_AFTERLPLOOP, SCIP_PROPTIMING_ALWAYS, SCIP_PROPTIMING_BEFORELP, SCIP_PROPTIMING_DURINGLPLOOP, SCIPclockCreate(), SCIPmessagePrintError(), SCIPsetAddBoolParam(), SCIPsetAddIntParam(), SCIPsnprintf(), and TRUE.
Referenced by SCIPincludeProp(), and SCIPincludePropBasic().
SCIP_RETCODE SCIPpropFree | ( | SCIP_PROP ** | prop, |
SCIP_SET * | set | ||
) |
calls destructor and frees memory of propagator
prop | pointer to propagator data structure |
set | global SCIP settings |
Definition at line 230 of file prop.c.
References BMSfreeMemory, BMSfreeMemoryArray, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().
SCIP_RETCODE SCIPpropInit | ( | SCIP_PROP * | prop, |
SCIP_SET * | set | ||
) |
initializes propagator
prop | propagator |
set | global SCIP settings |
Definition at line 259 of file prop.c.
References FALSE, SCIP_Prop::initialized, SCIP_Prop::lastnaddconss, SCIP_Prop::lastnaddholes, SCIP_Prop::lastnaggrvars, SCIP_Prop::lastnchgbds, SCIP_Prop::lastnchgcoefs, SCIP_Prop::lastnchgsides, SCIP_Prop::lastnchgvartypes, SCIP_Prop::lastndelconss, SCIP_Prop::lastnfixedvars, SCIP_Prop::lastnupgdconss, SCIP_Prop::naddconss, SCIP_Prop::naddholes, SCIP_Prop::naggrvars, SCIP_Prop::name, SCIP_Prop::ncalls, SCIP_Prop::nchgbds, SCIP_Prop::nchgcoefs, SCIP_Prop::nchgsides, SCIP_Prop::nchgvartypes, SCIP_Prop::ncutoffs, SCIP_Prop::ndelconss, SCIP_Prop::ndomredsfound, SCIP_Prop::nfixedvars, SCIP_Prop::npresolcalls, SCIP_Prop::nrespropcalls, SCIP_Prop::nupgdconss, SCIP_Prop::presoltime, SCIP_Prop::proptime, SCIP_Prop::resproptime, SCIP_Prop::sbproptime, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIP_Prop::setuptime, TRUE, and SCIP_Prop::wasdelayed.
SCIP_RETCODE SCIPpropExit | ( | SCIP_PROP * | prop, |
SCIP_SET * | set | ||
) |
calls exit method of propagator
prop | propagator |
set | global SCIP settings |
Definition at line 325 of file prop.c.
References FALSE, SCIP_Prop::initialized, SCIP_Prop::name, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Prop::setuptime.
Referenced by SCIPsetInitPlugins().
SCIP_RETCODE SCIPpropInitpre | ( | SCIP_PROP * | prop, |
SCIP_SET * | set | ||
) |
informs propagator that the presolving process is being started
prop | propagator |
set | global SCIP settings |
Definition at line 355 of file prop.c.
References FALSE, SCIP_Prop::lastnaddconss, SCIP_Prop::lastnaddholes, SCIP_Prop::lastnaggrvars, SCIP_Prop::lastnchgbds, SCIP_Prop::lastnchgcoefs, SCIP_Prop::lastnchgsides, SCIP_Prop::lastnchgvartypes, SCIP_Prop::lastndelconss, SCIP_Prop::lastnfixedvars, SCIP_Prop::lastnupgdconss, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIP_Prop::setuptime, and SCIP_Prop::wasdelayed.
Referenced by SCIPsetExitPlugins().
SCIP_RETCODE SCIPpropExitpre | ( | SCIP_PROP * | prop, |
SCIP_SET * | set | ||
) |
informs propagator that the presolving process is finished
prop | propagator |
set | global SCIP settings |
Definition at line 391 of file prop.c.
References SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Prop::setuptime.
Referenced by SCIPsetExitPlugins().
SCIP_RETCODE SCIPpropInitsol | ( | SCIP_PROP * | prop, |
SCIP_SET * | set | ||
) |
informs propagator that the prop and bound process is being started
prop | propagator |
set | global SCIP settings |
Definition at line 415 of file prop.c.
References SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Prop::setuptime.
Referenced by SCIPsetExitprePlugins().
SCIP_RETCODE SCIPpropExitsol | ( | SCIP_PROP * | prop, |
SCIP_SET * | set, | ||
SCIP_Bool | restart | ||
) |
informs propagator that the prop and bound process data is being freed
prop | propagator |
set | global SCIP settings |
restart | was this exit solve call triggered by a restart? |
Definition at line 439 of file prop.c.
References SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Prop::setuptime.
Referenced by SCIPsetInitsolPlugins().
SCIP_RETCODE SCIPpropPresol | ( | SCIP_PROP * | prop, |
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 presolving method of propagator
prop | propagator |
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 464 of file prop.c.
References SCIP_Prop::lastnaddconss, SCIP_Prop::lastnaddholes, SCIP_Prop::lastnaggrvars, SCIP_Prop::lastnchgbds, SCIP_Prop::lastnchgcoefs, SCIP_Prop::lastnchgsides, SCIP_Prop::lastnchgvartypes, SCIP_Prop::lastndelconss, SCIP_Prop::lastnfixedvars, SCIP_Prop::lastnupgdconss, SCIP_Prop::maxprerounds, SCIP_Prop::naddconss, SCIP_Prop::naddholes, SCIP_Prop::naggrvars, SCIP_Prop::name, SCIP_Prop::nchgbds, SCIP_Prop::nchgcoefs, SCIP_Prop::nchgsides, SCIP_Prop::nchgvartypes, SCIP_Prop::ndelconss, SCIP_Prop::nfixedvars, SCIP_Prop::npresolcalls, SCIP_Prop::nupgdconss, SCIP_Prop::presoltime, SCIP_Prop::presoltiming, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_SUCCESS, SCIP_UNBOUNDED, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIPsetDebugMsg.
Referenced by presolveRound().
SCIP_RETCODE SCIPpropExec | ( | SCIP_PROP * | prop, |
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
int | depth, | ||
SCIP_Bool | execdelayed, | ||
SCIP_Bool | instrongbranching, | ||
SCIP_PROPTIMING | proptiming, | ||
SCIP_RESULT * | result | ||
) |
calls execution method of propagator
prop | propagator |
set | global SCIP settings |
stat | dynamic problem statistics |
depth | depth of current node |
execdelayed | execute propagator even if it is marked to be delayed |
instrongbranching | are we currently doing strong branching? |
proptiming | current point in the node solving process |
result | pointer to store the result of the callback method |
Definition at line 590 of file prop.c.
References SCIP_Prop::delay, SCIP_Prop::freq, SCIP_Prop::name, SCIP_Stat::nboundchgs, SCIP_Prop::ncalls, SCIP_Prop::ncutoffs, SCIP_Prop::ndomredsfound, SCIP_Stat::nholechgs, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, SCIP_Prop::proptime, SCIP_Prop::sbproptime, SCIP_CALL, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DELAYNODE, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPsetDebugMsg, and SCIP_Prop::wasdelayed.
Referenced by propagationRound().
SCIP_RETCODE SCIPpropResolvePropagation | ( | SCIP_PROP * | prop, |
SCIP_SET * | set, | ||
SCIP_VAR * | infervar, | ||
int | inferinfo, | ||
SCIP_BOUNDTYPE | inferboundtype, | ||
SCIP_BDCHGIDX * | bdchgidx, | ||
SCIP_Real | relaxedbd, | ||
SCIP_RESULT * | result | ||
) |
resolves the given conflicting bound, that was deduced by the given propagator, by putting all "reason" bounds leading to the deduction into the conflict queue with calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
prop | propagator |
set | global SCIP settings |
infervar | variable whose bound was deduced by the constraint |
inferinfo | user inference information attached to the bound change |
inferboundtype | bound that was deduced (lower or upper bound) |
bdchgidx | bound change index, representing the point of time where change took place |
relaxedbd | the relaxed bound |
result | pointer to store the result of the callback method |
Definition at line 682 of file prop.c.
References SCIP_Prop::name, SCIP_Prop::nrespropcalls, SCIP_Prop::resproptime, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_SUCCESS, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by conflictResolveBound().
void SCIPpropSetCopy | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPCOPY((*propcopy)) | |||
) |
sets copy method of propagator
prop | propagator |
Definition at line 756 of file prop.c.
Referenced by SCIPsetPropCopy().
void SCIPpropSetFree | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPFREE((*propfree)) | |||
) |
sets destructor method of propagator
prop | propagator |
Definition at line 767 of file prop.c.
Referenced by SCIPsetPropFree().
void SCIPpropSetInit | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPINIT((*propinit)) | |||
) |
sets initialization method of propagator
prop | propagator |
Definition at line 778 of file prop.c.
Referenced by SCIPsetPropInit().
void SCIPpropSetExit | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPEXIT((*propexit)) | |||
) |
sets deinitialization method of propagator
prop | propagator |
Definition at line 789 of file prop.c.
Referenced by SCIPsetPropExit().
void SCIPpropSetInitsol | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPINITSOL((*propinitsol)) | |||
) |
sets solving process initialization method of propagator
prop | propagator |
Definition at line 800 of file prop.c.
Referenced by SCIPsetPropInitsol().
void SCIPpropSetExitsol | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPEXITSOL((*propexitsol)) | |||
) |
sets solving process deinitialization method of propagator
prop | propagator |
Definition at line 811 of file prop.c.
Referenced by SCIPsetPropExitsol().
void SCIPpropSetInitpre | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPINITPRE((*propinitpre)) | |||
) |
sets preprocessing initialization method of propagator
prop | propagator |
Definition at line 822 of file prop.c.
Referenced by SCIPsetPropInitpre().
void SCIPpropSetExitpre | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPEXITPRE((*propexitpre)) | |||
) |
sets preprocessing deinitialization method of propagator
prop | propagator |
Definition at line 835 of file prop.c.
Referenced by SCIPsetPropExitpre().
SCIP_RETCODE SCIPpropSetPresol | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPPRESOL((*proppresol)) | , | ||
int | presolpriority, | ||
int | presolmaxrounds, | ||
SCIP_PRESOLTIMING | presoltiming | ||
) |
sets presolving method of propagator
prop | propagator |
presolpriority | presolving priority of the propagator (>= 0: before, < 0: after constraint handlers) |
presolmaxrounds | maximal number of presolving rounds the propagator participates in (-1: no limit) |
presoltiming | timing mask of the propagator's presolving method |
Definition at line 846 of file prop.c.
References SCIP_Prop::maxprerounds, SCIP_Prop::name, SCIP_Prop::presolpriority, SCIP_Prop::presoltiming, SCIP_OKAY, SCIP_PARAMETERWRONGVAL, SCIP_PRESOLTIMING_MAX, and SCIPmessagePrintError().
Referenced by SCIPsetPropPresol().
void SCIPpropSetResprop | ( | SCIP_PROP * | prop, |
SCIP_DECL_PROPRESPROP((*propresprop)) | |||
) |
sets propagation conflict resolving callback of propagator
prop | propagator |
Definition at line 876 of file prop.c.
Referenced by SCIPsetPropResprop().
sets priority of propagator
prop | propagator |
set | global SCIP settings |
priority | new priority of the propagator |
Definition at line 927 of file prop.c.
References FALSE, and SCIP_Prop::priority.
Referenced by SCIPsetPropPriority().
sets presolving priority of propagator
prop | propagator |
set | global SCIP settings |
presolpriority | new priority of the propagator |
Definition at line 941 of file prop.c.
References FALSE, and SCIP_Prop::presolpriority.
Referenced by SCIPsetPropPresolPriority().
enables or disables all clocks of prop
, depending on the value of the flag
prop | the propagator for which all clocks should be enabled or disabled |
enable | should the clocks of the propagator be enabled? |
Definition at line 965 of file prop.c.
References SCIP_Prop::presoltime, SCIP_Prop::proptime, SCIP_Prop::resproptime, SCIP_Prop::sbproptime, SCIPclockEnableOrDisable(), and SCIP_Prop::setuptime.