SCIP Doxygen Documentation
Loading...
Searching...
No Matches
prop.h File Reference

Detailed Description

internal methods for propagators

Author
Tobias Achterberg

Definition in file prop.h.

#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_stat.h"
#include "scip/type_lp.h"
#include "scip/type_message.h"
#include "scip/type_var.h"
#include "scip/type_prop.h"
#include "scip/pub_prop.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPpropCopyInclude (SCIP_PROP *prop, SCIP_SET *set)
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)
SCIP_RETCODE SCIPpropFree (SCIP_PROP **prop, SCIP_SET *set)
SCIP_RETCODE SCIPpropInit (SCIP_PROP *prop, SCIP_SET *set)
SCIP_RETCODE SCIPpropExit (SCIP_PROP *prop, SCIP_SET *set)
SCIP_RETCODE SCIPpropInitpre (SCIP_PROP *prop, SCIP_SET *set)
SCIP_RETCODE SCIPpropExitpre (SCIP_PROP *prop, SCIP_SET *set)
SCIP_RETCODE SCIPpropInitsol (SCIP_PROP *prop, SCIP_SET *set)
SCIP_RETCODE SCIPpropExitsol (SCIP_PROP *prop, SCIP_SET *set, SCIP_Bool restart)
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)
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)
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)
void SCIPpropSetPriority (SCIP_PROP *prop, SCIP_SET *set, int priority)
void SCIPpropSetPresolPriority (SCIP_PROP *prop, SCIP_SET *set, int presolpriority)
void SCIPpropSetCopy (SCIP_PROP *prop,)
void SCIPpropSetFree (SCIP_PROP *prop,)
void SCIPpropSetInit (SCIP_PROP *prop,)
void SCIPpropSetExit (SCIP_PROP *prop,)
void SCIPpropSetInitsol (SCIP_PROP *prop,)
void SCIPpropSetExitsol (SCIP_PROP *prop,)
void SCIPpropSetInitpre (SCIP_PROP *prop,)
void SCIPpropSetExitpre (SCIP_PROP *prop,)
SCIP_RETCODE SCIPpropSetPresol (SCIP_PROP *prop, SCIP_DECL_PROPPRESOL((*proppresol)), int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming)
void SCIPpropSetResprop (SCIP_PROP *prop,)
void SCIPpropEnableOrDisableClocks (SCIP_PROP *prop, SCIP_Bool enable)

Function Documentation

◆ SCIPpropCopyInclude()

SCIP_RETCODE SCIPpropCopyInclude ( SCIP_PROP * prop,
SCIP_SET * set )

copies the given propagator to a new scip

Parameters
proppropagator
setSCIP_SET of SCIP to copy to

Definition at line 100 of file prop.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPpropCopyInclude(), SCIPpropGetName(), and SCIPsetDebugMsg.

Referenced by SCIPpropCopyInclude(), and SCIPsetCopyPlugins().

◆ SCIPpropCreate()

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

Parameters
proppointer to propagator data structure
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
namename of propagator
descdescription of propagator
prioritypriority of the propagator (>= 0: before, < 0: after constraint handlers)
freqfrequency for calling propagator
delayshould propagator be delayed, if other propagators found reductions?
timingmaskpositions in the node solving loop where propagator should be executed
presolprioritypriority of the propagator (>= 0: before, < 0: after constraint handlers)
presolmaxroundsmaximal number of presolving rounds the propagator participates in (-1: no limit)
presoltimingtiming mask of the propagator's presolving method
-copy method of propagator or NULL if you don't want to copy your plugin into sub-SCIPs
-destructor of propagator
-initialize propagator
-deinitialize propagator
-presolving initialization method of propagator
-presolving deinitialization method of propagator
-solving process initialization method of propagator
-solving process deinitialization method of propagator
-presolving method
-execution method of propagator
-propagation conflict resolving method
propdatapropagator data

Definition at line 243 of file prop.c.

References assert(), doPropCreate(), NULL, SCIP_Bool, SCIP_CALL_FINALLY, SCIP_DECL_PROPCOPY, SCIP_DECL_PROPEXEC, SCIP_DECL_PROPEXIT, SCIP_DECL_PROPEXITPRE, SCIP_DECL_PROPEXITSOL, SCIP_DECL_PROPFREE, SCIP_DECL_PROPINIT, SCIP_DECL_PROPINITPRE, SCIP_DECL_PROPINITSOL, SCIP_DECL_PROPPRESOL, SCIP_DECL_PROPRESPROP, SCIP_OKAY, SCIPpropCreate(), and SCIPpropFree().

Referenced by SCIPincludeProp(), SCIPincludePropBasic(), and SCIPpropCreate().

◆ SCIPpropFree()

SCIP_RETCODE SCIPpropFree ( SCIP_PROP ** prop,
SCIP_SET * set )

calls destructor and frees memory of propagator

Parameters
proppointer to propagator data structure
setglobal SCIP settings

Definition at line 285 of file prop.c.

References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockFree(), and SCIPpropFree().

Referenced by SCIPpropCreate(), and SCIPpropFree().

◆ SCIPpropInit()

◆ SCIPpropExit()

SCIP_RETCODE SCIPpropExit ( SCIP_PROP * prop,
SCIP_SET * set )

calls exit method of propagator

Parameters
proppropagator
setglobal SCIP settings

Definition at line 381 of file prop.c.

References assert(), FALSE, SCIP_Prop::initialized, SCIP_Prop::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPpropExit(), and SCIP_Prop::setuptime.

Referenced by SCIPpropExit().

◆ SCIPpropInitpre()

◆ SCIPpropExitpre()

SCIP_RETCODE SCIPpropExitpre ( SCIP_PROP * prop,
SCIP_SET * set )

informs propagator that the presolving is finished

informs propagator that the presolving process is finished

Parameters
proppropagator
setglobal SCIP settings

Definition at line 447 of file prop.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPpropExitpre(), and SCIP_Prop::setuptime.

Referenced by SCIPpropExitpre().

◆ SCIPpropInitsol()

SCIP_RETCODE SCIPpropInitsol ( SCIP_PROP * prop,
SCIP_SET * set )

informs propagator that the branch and bound process is being started

informs propagator that the prop and bound process is being started

Parameters
proppropagator
setglobal SCIP settings

Definition at line 471 of file prop.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPpropInitsol(), and SCIP_Prop::setuptime.

Referenced by SCIPpropInitsol().

◆ SCIPpropExitsol()

SCIP_RETCODE SCIPpropExitsol ( SCIP_PROP * prop,
SCIP_SET * set,
SCIP_Bool restart )

informs propagator that the branch and bound process data is being freed

informs propagator that the prop and bound process data is being freed

Parameters
proppropagator
setglobal SCIP settings
restartwas this exit solve call triggered by a restart?

Definition at line 495 of file prop.c.

References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPpropExitsol(), and SCIP_Prop::setuptime.

Referenced by SCIPpropExitsol().

◆ SCIPpropPresol()

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

Parameters
proppropagator
setglobal SCIP settings
timingcurrent presolving timing
nroundsnumber of presolving rounds already done
nfixedvarspointer to total number of variables fixed of all presolvers
naggrvarspointer to total number of variables aggregated of all presolvers
nchgvartypespointer to total number of variable type changes of all presolvers
nchgbdspointer to total number of variable bounds tightened of all presolvers
naddholespointer to total number of domain holes added of all presolvers
ndelconsspointer to total number of deleted constraints of all presolvers
naddconsspointer to total number of added constraints of all presolvers
nupgdconsspointer to total number of upgraded constraints of all presolvers
nchgcoefspointer to total number of changed coefficients of all presolvers
nchgsidespointer to total number of changed left/right hand sides of all presolvers
resultpointer to store the result of the callback method

Definition at line 520 of file prop.c.

References assert(), SCIP_Prop::exact, 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, NULL, SCIP_Prop::nupgdconss, SCIP_Prop::presoltime, SCIP_Prop::presoltiming, result, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_SUCCESS, SCIP_UNBOUNDED, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPpropPresol(), and SCIPsetDebugMsg.

Referenced by presolveRound(), and SCIPpropPresol().

◆ SCIPpropExec()

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

Parameters
proppropagator
setglobal SCIP settings
statdynamic problem statistics
depthdepth of current node
execdelayedexecute propagator even if it is marked to be delayed
instrongbranchingare we currently doing strong branching?
proptimingcurrent point in the node solving process
resultpointer to store the result of the callback method

Definition at line 646 of file prop.c.

References assert(), SCIP_Prop::delay, depth, SCIP_Prop::exact, 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, NULL, SCIP_Prop::proptime, result, SCIP_Prop::sbproptime, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DELAYNODE, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPpropExec(), SCIPsetDebugMsg, and SCIP_Prop::wasdelayed.

Referenced by propagationRound(), and SCIPpropExec().

◆ SCIPpropResolvePropagation()

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();

Note
it is sufficient to explain the relaxed bound change
Parameters
proppropagator
setglobal SCIP settings
infervarvariable whose bound was deduced by the constraint
inferinfouser inference information attached to the bound change
inferboundtypebound that was deduced (lower or upper bound)
bdchgidxbound change index, representing the point of time where change took place
relaxedbdthe relaxed bound
resultpointer to store the result of the callback method

Definition at line 739 of file prop.c.

References assert(), SCIP_Prop::name, SCIP_Prop::nrespropcalls, NULL, SCIP_Prop::resproptime, result, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_SUCCESS, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPpropResolvePropagation(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.

Referenced by conflictResolveBound(), and SCIPpropResolvePropagation().

◆ SCIPpropSetPriority()

void SCIPpropSetPriority ( SCIP_PROP * prop,
SCIP_SET * set,
int priority )

sets priority of propagator

Parameters
proppropagator
setglobal SCIP settings
prioritynew priority of the propagator

Definition at line 991 of file prop.c.

References assert(), FALSE, NULL, SCIP_Prop::priority, and SCIPpropSetPriority().

Referenced by SCIPpropSetPriority(), and SCIPsetPropPriority().

◆ SCIPpropSetPresolPriority()

void SCIPpropSetPresolPriority ( SCIP_PROP * prop,
SCIP_SET * set,
int presolpriority )

sets presolving priority of propagator

Parameters
proppropagator
setglobal SCIP settings
presolprioritynew priority of the propagator

Definition at line 1005 of file prop.c.

References assert(), FALSE, NULL, SCIP_Prop::presolpriority, and SCIPpropSetPresolPriority().

Referenced by SCIPpropSetPresolPriority(), and SCIPsetPropPresolPriority().

◆ SCIPpropSetCopy()

void SCIPpropSetCopy ( SCIP_PROP * prop)

sets copy method of propagator

Parameters
proppropagator copy method of propagator or NULL if you don't want to copy your plugin into sub-SCIPs

Definition at line 812 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPCOPY, and SCIPpropSetCopy().

Referenced by SCIPpropSetCopy(), and SCIPsetPropCopy().

◆ SCIPpropSetFree()

void SCIPpropSetFree ( SCIP_PROP * prop)

sets destructor method of propagator

Parameters
proppropagator destructor of propagator

Definition at line 823 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPFREE, and SCIPpropSetFree().

Referenced by SCIPpropSetFree(), and SCIPsetPropFree().

◆ SCIPpropSetInit()

void SCIPpropSetInit ( SCIP_PROP * prop)

sets initialization method of propagator

Parameters
proppropagator initialize propagator

Definition at line 834 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPINIT, and SCIPpropSetInit().

Referenced by SCIPpropSetInit(), and SCIPsetPropInit().

◆ SCIPpropSetExit()

void SCIPpropSetExit ( SCIP_PROP * prop)

sets deinitialization method of propagator

Parameters
proppropagator deinitialize propagator

Definition at line 845 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPEXIT, and SCIPpropSetExit().

Referenced by SCIPpropSetExit(), and SCIPsetPropExit().

◆ SCIPpropSetInitsol()

void SCIPpropSetInitsol ( SCIP_PROP * prop)

sets solving process initialization method of propagator

Parameters
proppropagator solving process initialization method of propagator

Definition at line 856 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPINITSOL, and SCIPpropSetInitsol().

Referenced by SCIPpropSetInitsol(), and SCIPsetPropInitsol().

◆ SCIPpropSetExitsol()

void SCIPpropSetExitsol ( SCIP_PROP * prop)

sets solving process deinitialization method of propagator

Parameters
proppropagator solving process deinitialization method of propagator

Definition at line 867 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPEXITSOL, and SCIPpropSetExitsol().

Referenced by SCIPpropSetExitsol(), and SCIPsetPropExitsol().

◆ SCIPpropSetInitpre()

void SCIPpropSetInitpre ( SCIP_PROP * prop)

sets preprocessing initialization method of propagator

Parameters
proppropagator preprocessing initialization method of propagator

Definition at line 878 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPINITPRE, and SCIPpropSetInitpre().

Referenced by SCIPpropSetInitpre(), and SCIPsetPropInitpre().

◆ SCIPpropSetExitpre()

void SCIPpropSetExitpre ( SCIP_PROP * prop)

sets preprocessing deinitialization method of propagator

Parameters
proppropagator preprocessing deinitialization method of propagator

Definition at line 889 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPEXITPRE, and SCIPpropSetExitpre().

Referenced by SCIPpropSetExitpre(), and SCIPsetPropExitpre().

◆ SCIPpropSetPresol()

SCIP_RETCODE SCIPpropSetPresol ( SCIP_PROP * prop,
SCIP_DECL_PROPPRESOL((*proppresol)) ,
int presolpriority,
int presolmaxrounds,
SCIP_PRESOLTIMING presoltiming )

sets presolving method of propagator

Parameters
proppropagator
-presolving method
presolprioritypresolving priority of the propagator (>= 0: before, < 0: after constraint handlers)
presolmaxroundsmaximal number of presolving rounds the propagator participates in (-1: no limit)
presoltimingtiming mask of the propagator's presolving method

Definition at line 900 of file prop.c.

References assert(), SCIP_Prop::maxprerounds, SCIP_Prop::name, NULL, SCIP_Prop::presolpriority, SCIP_Prop::presoltiming, SCIP_DECL_PROPPRESOL, SCIP_OKAY, SCIP_PARAMETERWRONGVAL, SCIP_PRESOLTIMING_MAX, SCIPmessagePrintError(), and SCIPpropSetPresol().

Referenced by SCIPpropSetPresol(), and SCIPsetPropPresol().

◆ SCIPpropSetResprop()

void SCIPpropSetResprop ( SCIP_PROP * prop)

sets propagation conflict resolving callback of propagator

Parameters
proppropagator propagation conflict resolving callback

Definition at line 930 of file prop.c.

References assert(), NULL, SCIP_DECL_PROPRESPROP, and SCIPpropSetResprop().

Referenced by SCIPpropSetResprop(), and SCIPsetPropResprop().

◆ SCIPpropEnableOrDisableClocks()

void SCIPpropEnableOrDisableClocks ( SCIP_PROP * prop,
SCIP_Bool enable )

enables or disables all clocks of prop, depending on the value of the flag

Parameters
propthe propagator for which all clocks should be enabled or disabled
enableshould the clocks of the propagator be enabled?

Definition at line 1029 of file prop.c.

References assert(), NULL, SCIP_Prop::presoltime, SCIP_Prop::proptime, SCIP_Prop::resproptime, SCIP_Prop::sbproptime, SCIP_Bool, SCIPclockEnableOrDisable(), SCIPpropEnableOrDisableClocks(), and SCIP_Prop::setuptime.

Referenced by SCIPpropEnableOrDisableClocks().