62 assert(paramdata !=
NULL);
76 assert(relax !=
NULL);
78 assert(set->scip !=
NULL);
80 if( relax->relaxcopy !=
NULL )
83 SCIP_CALL( relax->relaxcopy(set->scip, relax) );
112 assert(relax !=
NULL);
113 assert(name !=
NULL);
114 assert(desc !=
NULL);
116 assert(relaxexec !=
NULL);
121 (*relax)->priority = priority;
122 (*relax)->freq = freq;
123 (*relax)->relaxcopy = relaxcopy;
124 (*relax)->relaxfree = relaxfree;
125 (*relax)->relaxinit = relaxinit;
126 (*relax)->relaxexit = relaxexit;
127 (*relax)->relaxinitsol = relaxinitsol;
128 (*relax)->relaxexitsol = relaxexitsol;
129 (*relax)->relaxexec = relaxexec;
130 (*relax)->relaxdata = relaxdata;
133 (*relax)->ncalls = 0;
134 (*relax)->lastsolvednode = -1;
135 (*relax)->initialized =
FALSE;
136 (*relax)->includeslp = includeslp;
142 &(*relax)->priority,
FALSE, priority, INT_MIN/4, INT_MAX/4,
145 (void)
SCIPsnprintf(paramdesc,
SCIP_MAXSTRLEN,
"frequency for calling relaxation handler <%s> (-1: never, 0: only in root node)", name);
158 assert(relax !=
NULL);
159 assert(*relax !=
NULL);
160 assert(!(*relax)->initialized);
164 if( (*relax)->relaxfree !=
NULL )
166 SCIP_CALL( (*relax)->relaxfree(set->scip, *relax) );
184 assert(relax !=
NULL);
193 if( set->misc_resetstat )
201 if( relax->relaxinit !=
NULL )
206 SCIP_CALL( relax->relaxinit(set->scip, relax) );
222 assert(relax !=
NULL);
231 if( relax->relaxexit !=
NULL )
236 SCIP_CALL( relax->relaxexit(set->scip, relax) );
252 assert(relax !=
NULL);
256 if( relax->relaxinitsol !=
NULL )
261 SCIP_CALL( relax->relaxinitsol(set->scip, relax) );
276 assert(relax !=
NULL);
280 if( relax->relaxexitsol !=
NULL )
285 SCIP_CALL( relax->relaxexitsol(set->scip, relax) );
304 assert(relax !=
NULL);
305 assert(relax->relaxexec !=
NULL);
306 assert(relax->
freq >= -1);
308 assert(set->scip !=
NULL);
310 assert(result !=
NULL);
320 if( (depth == 0 && relax->
freq == 0) || (relax->
freq > 0 && depth % relax->
freq == 0) )
328 SCIP_CALL( relax->relaxexec(set->scip, relax, lowerbound, result) );
342 SCIPerrorMessage(
"execution method of relaxation handler <%s> returned invalid result <%d>\n",
343 relax->
name, *result);
363 assert(relax !=
NULL);
374 assert(relax !=
NULL);
385 assert(relax !=
NULL);
387 relax->relaxcopy = relaxcopy;
396 assert(relax !=
NULL);
398 relax->relaxfree = relaxfree;
407 assert(relax !=
NULL);
409 relax->relaxinit = relaxinit;
418 assert(relax !=
NULL);
420 relax->relaxexit = relaxexit;
429 assert(relax !=
NULL);
431 relax->relaxinitsol = relaxinitsol;
440 assert(relax !=
NULL);
442 relax->relaxexitsol = relaxexitsol;
450 assert(relax !=
NULL);
460 assert(relax !=
NULL);
470 assert(relax !=
NULL);
482 assert(relax !=
NULL);
486 set->relaxssorted =
FALSE;
494 assert(relax !=
NULL);
504 assert(relax !=
NULL);
515 assert(relax !=
NULL);
526 assert(relax !=
NULL);
537 assert(relax !=
NULL);
547 assert(relax !=
NULL);
557 assert(relax !=
NULL);
567 assert(relax !=
NULL);
578 assert(relax !=
NULL);
579 assert(stat !=
NULL);
589 assert(relax !=
NULL);
608 assert(relaxation !=
NULL);
609 assert(blkmem !=
NULL);
611 assert(stat !=
NULL);
612 assert(primal !=
NULL);
613 assert(tree !=
NULL);
617 (*relaxation)->relaxsolobjval = 0.0;
618 (*relaxation)->relaxsolvalid =
FALSE;
619 (*relaxation)->relaxsolzero =
TRUE;
633 assert(relaxation !=
NULL);
648 assert(relaxation !=
NULL);
658 assert(relaxation !=
NULL);
669 assert(relaxation !=
NULL);
679 assert(relaxation !=
NULL);
690 assert(relaxation !=
NULL);
700 assert(relaxation !=
NULL);
711 assert(relaxation !=
NULL);
721 assert(relaxation !=
NULL);
732 assert(relaxation !=
NULL);
742 assert(relaxation !=
NULL);
758 assert(relaxation !=
NULL);
enum SCIP_Result SCIP_RESULT
#define SCIP_DECL_RELAXFREE(x)
void SCIPrelaxationUpdateVarObj(SCIP_RELAXATION *relaxation, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldobj, SCIP_Real newobj)
SCIP_Bool SCIPrelaxIncludesLp(SCIP_RELAX *relax)
void SCIPrelaxSetIncludesLp(SCIP_RELAX *relax, SCIP_Bool includeslp)
internal methods for storing primal CIP solutions
SCIP_Real SCIPrelaxationGetSolObj(SCIP_RELAXATION *relaxation)
SCIP_DECL_SORTPTRCOMP(SCIPrelaxComp)
SCIP_RETCODE SCIPrelaxInit(SCIP_RELAX *relax, SCIP_SET *set)
SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
internal methods for clocks and timing issues
SCIP_Real bestrelaxsolobj
struct SCIP_ParamData SCIP_PARAMDATA
void SCIPrelaxationSetSolValid(SCIP_RELAXATION *relaxation, SCIP_Bool isvalid)
void SCIPrelaxSetPriority(SCIP_RELAX *relax, SCIP_SET *set, int priority)
SCIP_RETCODE SCIPsolCreateUnknown(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_HEUR *heur)
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
SCIP_Real SCIPrelaxationGetBestRelaxSolObj(SCIP_RELAXATION *relaxation)
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
#define SCIP_DECL_RELAXINIT(x)
#define SCIP_DECL_RELAXINITSOL(x)
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
int SCIPsnprintf(char *t, int len, const char *s,...)
enum SCIP_Retcode SCIP_RETCODE
void SCIPrelaxSetCopy(SCIP_RELAX *relax, SCIP_DECL_RELAXCOPY((*relaxcopy)))
SCIP_RETCODE SCIPrelaxFree(SCIP_RELAX **relax, SCIP_SET *set)
SCIP_SOL * SCIPrelaxationGetBestRelaxSol(SCIP_RELAXATION *relaxation)
internal methods for handling parameter settings
SCIP_Bool SCIPrelaxationIsSolValid(SCIP_RELAXATION *relaxation)
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
#define BMSfreeMemory(ptr)
SCIP_Longint SCIPrelaxGetNCalls(SCIP_RELAX *relax)
SCIP_Real SCIPrelaxGetTime(SCIP_RELAX *relax)
void SCIPrelaxationSetBestRelaxSolObj(SCIP_RELAXATION *relaxation, SCIP_Real obj)
#define SCIP_DECL_RELAXEXIT(x)
SCIP_RELAXDATA * relaxdata
void SCIPrelaxSetFree(SCIP_RELAX *relax, SCIP_DECL_RELAXFREE((*relaxfree)))
#define BMSfreeMemoryArray(ptr)
SCIP_RETCODE SCIPrelaxExit(SCIP_RELAX *relax, SCIP_SET *set)
SCIP_RETCODE SCIPrelaxationFree(SCIP_RELAXATION **relaxation, BMS_BLKMEM *blkmem, SCIP_PRIMAL *primal)
SCIP_Bool SCIPrelaxationIsSolZero(SCIP_RELAXATION *relaxation)
void SCIPclockReset(SCIP_CLOCK *clck)
int SCIPrelaxGetPriority(SCIP_RELAX *relax)
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
#define SCIP_DECL_RELAXCOPY(x)
void SCIPrelaxSetInitsol(SCIP_RELAX *relax, SCIP_DECL_RELAXINITSOL((*relaxinitsol)))
void SCIPrelaxSetExitsol(SCIP_RELAX *relax, SCIP_DECL_RELAXEXITSOL((*relaxexitsol)))
const char * SCIPrelaxGetName(SCIP_RELAX *relax)
SCIP_RELAXDATA * SCIPrelaxGetData(SCIP_RELAX *relax)
internal methods for global SCIP settings
SCIP_RETCODE SCIPrelaxCopyInclude(SCIP_RELAX *relax, SCIP_SET *set)
void SCIPrelaxMarkUnsolved(SCIP_RELAX *relax)
SCIP_RETCODE SCIPrelaxationCreate(SCIP_RELAXATION **relaxation, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree)
internal methods for relaxators
SCIP_RETCODE SCIPsetAddIntParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
int SCIPrelaxGetFreq(SCIP_RELAX *relax)
SCIP_RETCODE SCIPsetRelaxPriority(SCIP *scip, SCIP_RELAX *relax, int priority)
SCIP_Real SCIPrelaxGetSetupTime(SCIP_RELAX *relax)
#define BMSduplicateMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
internal methods for problem variables
public data structures and miscellaneous methods
SCIP_Bool SCIPrelaxIsSolved(SCIP_RELAX *relax, SCIP_STAT *stat)
SCIP_RETCODE SCIPrelaxInitsol(SCIP_RELAX *relax, SCIP_SET *set)
static const char * paramname[]
void SCIPclockFree(SCIP_CLOCK **clck)
const char * SCIPrelaxGetDesc(SCIP_RELAX *relax)
static SCIP_DECL_PARAMCHGD(paramChgdRelaxPriority)
SCIP_Longint lastsolvednode
void SCIPrelaxEnableOrDisableClocks(SCIP_RELAX *relax, SCIP_Bool enable)
void SCIPrelaxSetData(SCIP_RELAX *relax, SCIP_RELAXDATA *relaxdata)
SCIP_Real SCIPvarGetRelaxSol(SCIP_VAR *var, SCIP_SET *set)
void SCIPrelaxationSetSolObj(SCIP_RELAXATION *relaxation, SCIP_Real obj)
#define SCIP_MAXTREEDEPTH
SCIP_Bool SCIPinProbing(SCIP *scip)
int SCIPparamGetInt(SCIP_PARAM *param)
void SCIPrelaxationSetSolZero(SCIP_RELAXATION *relaxation, SCIP_Bool iszero)
struct SCIP_RelaxData SCIP_RELAXDATA
#define SCIP_DECL_RELAXEXEC(x)
void SCIPrelaxationSolObjAdd(SCIP_RELAXATION *relaxation, SCIP_Real val)
public methods for message output
SCIP_Bool SCIPrelaxIsInitialized(SCIP_RELAX *relax)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
internal methods for problem statistics
#define BMSallocMemory(ptr)
data structures for relaxators
SCIP_RETCODE SCIPrelaxCreate(SCIP_RELAX **relax, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int freq, SCIP_Bool includeslp, SCIP_DECL_RELAXCOPY((*relaxcopy)), SCIP_DECL_RELAXFREE((*relaxfree)), SCIP_DECL_RELAXINIT((*relaxinit)), SCIP_DECL_RELAXEXIT((*relaxexit)), SCIP_DECL_RELAXINITSOL((*relaxinitsol)), SCIP_DECL_RELAXEXITSOL((*relaxexitsol)), SCIP_DECL_RELAXEXEC((*relaxexec)), SCIP_RELAXDATA *relaxdata)
#define SCIP_DECL_RELAXEXITSOL(x)
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
void SCIPrelaxSetExit(SCIP_RELAX *relax, SCIP_DECL_RELAXEXIT((*relaxexit)))
SCIP_RETCODE SCIPrelaxExec(SCIP_RELAX *relax, SCIP_SET *set, SCIP_STAT *stat, int depth, SCIP_Real *lowerbound, SCIP_RESULT *result)
void SCIPrelaxSetInit(SCIP_RELAX *relax, SCIP_DECL_RELAXINIT((*relaxinit)))
SCIP_RETCODE SCIPrelaxExitsol(SCIP_RELAX *relax, SCIP_SET *set)
SCIP_RETCODE SCIPsolFree(SCIP_SOL **sol, BMS_BLKMEM *blkmem, SCIP_PRIMAL *primal)