31 #define PROP_NAME "sync" 32 #define PROP_DESC "propagator for synchronization of bound changes" 33 #define PROP_PRIORITY (INT_MAX/4) 35 #define PROP_DELAY FALSE 36 #define PROP_TIMING SCIP_PROPTIMING_ALWAYS 38 #define PROP_PRESOL_PRIORITY (INT_MAX/4) 39 #define PROP_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS 40 #define PROP_PRESOL_MAXROUNDS -1 78 assert(ntightened !=
NULL);
79 assert(ntightenedint !=
NULL);
87 for( i = 0; i < data->nbnds; ++i )
138 assert(scip !=
NULL);
139 assert(prop !=
NULL);
143 assert(propdata !=
NULL);
157 assert(prop !=
NULL);
161 assert(data !=
NULL);
167 data->bndtype =
NULL;
168 data->ntightened = 0;
169 data->ntightenedint = 0;
180 assert(prop !=
NULL);
184 assert(data !=
NULL);
200 assert(prop !=
NULL);
204 assert(data !=
NULL);
218 *nchgbds += ntightened;
219 data->ntightened += ntightened;
220 data->ntightenedint += ntightened;
238 assert(prop !=
NULL);
247 assert(data !=
NULL);
253 data->ntightened += ntightened;
254 data->ntightenedint += ntightenedint;
289 propExecSync, propdata) );
291 assert(prop !=
NULL);
314 assert(prop !=
NULL);
318 assert(data !=
NULL);
320 if( data->nbnds + 1 > data->bndsize )
327 data->bndsize = newsize;
330 data->bndvar[data->nbnds] = var;
331 data->bndval[data->nbnds] = val;
332 data->bndtype[data->nbnds] = bndtype;
334 if( data->nbnds == 0 )
350 assert(prop !=
NULL);
353 assert(data !=
NULL);
355 return data->ntightened;
365 assert(prop !=
NULL);
368 assert(data !=
NULL);
370 return data->ntightenedint;
#define PROP_PRESOLTIMING
enum SCIP_Result SCIP_RESULT
SCIP_RETCODE SCIPsetPropPresol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPPRESOL((*proppresol)), int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming)
enum SCIP_BoundType SCIP_BOUNDTYPE
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
SCIP_Longint SCIPpropSyncGetNTightenedBnds(SCIP_PROP *prop)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
enum SCIP_Retcode SCIP_RETCODE
#define PROP_PRESOL_MAXROUNDS
static SCIP_DECL_PROPFREE(propFreeSync)
static SCIP_DECL_PROPEXEC(propExecSync)
void SCIPdisableConcurrentBoundStorage(SCIP *scip)
#define SCIPallocMemory(scip, ptr)
the type definitions for the SCIP parallel interface
SCIP_RETCODE SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPincludePropSync(SCIP *scip)
SCIP_RETCODE SCIPpropSyncAddBndchg(SCIP *scip, SCIP_PROP *prop, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE bndtype)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPsetPropInit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINIT((*propinit)))
void SCIPenableConcurrentBoundStorage(SCIP *scip)
propagator for applying global bound changes that were communicated by other concurrent solvers ...
static SCIP_DECL_PROPEXIT(propExitSync)
helper functions for concurrent scip solvers
SCIP_Bool SCIPinProbing(SCIP *scip)
const char * SCIPpropGetName(SCIP_PROP *prop)
static SCIP_RETCODE applyBoundChanges(SCIP *scip, SCIP_PROPDATA *data, SCIP_RESULT *result, int *ntightened, int *ntightenedint)
static SCIP_DECL_PROPPRESOL(propPresolSync)
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
void SCIPpropSetFreq(SCIP_PROP *prop, int freq)
#define SCIPfreeMemory(scip, ptr)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Longint SCIPpropSyncGetNTightenedIntBnds(SCIP_PROP *prop)
static SCIP_DECL_PROPINIT(propInitSync)
struct SCIP_PropData SCIP_PROPDATA
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)
void SCIPpropSetData(SCIP_PROP *prop, SCIP_PROPDATA *propdata)
int SCIPtpiGetThreadNum(void)
#define PROP_PRESOL_PRIORITY
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPsetPropExit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXIT((*propexit)))
SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)