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) );
111 assert(relax != NULL);
112 assert(name != NULL);
113 assert(desc != NULL);
115 assert(relaxexec != NULL);
120 (*relax)->priority = priority;
121 (*relax)->freq = freq;
122 (*relax)->relaxcopy = relaxcopy;
123 (*relax)->relaxfree = relaxfree;
124 (*relax)->relaxinit = relaxinit;
125 (*relax)->relaxexit = relaxexit;
126 (*relax)->relaxinitsol = relaxinitsol;
127 (*relax)->relaxexitsol = relaxexitsol;
128 (*relax)->relaxexec = relaxexec;
129 (*relax)->relaxdata = relaxdata;
132 (*relax)->ncalls = 0;
133 (*relax)->lastsolvednode = -1;
134 (*relax)->initialized =
FALSE;
140 &(*relax)->priority,
FALSE, priority, INT_MIN/4, INT_MAX/4,
143 (void)
SCIPsnprintf(paramdesc,
SCIP_MAXSTRLEN,
"frequency for calling relaxation handler <%s> (-1: never, 0: only in root node)", name);
156 assert(relax != NULL);
157 assert(*relax != NULL);
158 assert(!(*relax)->initialized);
162 if( (*relax)->relaxfree != NULL )
164 SCIP_CALL( (*relax)->relaxfree(set->scip, *relax) );
182 assert(relax != NULL);
191 if( set->misc_resetstat )
199 if( relax->relaxinit != NULL )
204 SCIP_CALL( relax->relaxinit(set->scip, relax) );
220 assert(relax != NULL);
229 if( relax->relaxexit != NULL )
234 SCIP_CALL( relax->relaxexit(set->scip, relax) );
250 assert(relax != NULL);
254 if( relax->relaxinitsol != NULL )
259 SCIP_CALL( relax->relaxinitsol(set->scip, relax) );
274 assert(relax != NULL);
278 if( relax->relaxexitsol != NULL )
283 SCIP_CALL( relax->relaxexitsol(set->scip, relax) );
302 assert(relax != NULL);
303 assert(relax->relaxexec != NULL);
304 assert(relax->
freq >= -1);
306 assert(set->scip != NULL);
308 assert(result != NULL);
318 if( (depth == 0 && relax->
freq == 0) || (relax->
freq > 0 && depth % relax->
freq == 0) )
326 SCIP_CALL( relax->relaxexec(set->scip, relax, lowerbound, result) );
340 SCIPerrorMessage(
"execution method of relaxation handler <%s> returned invalid result <%d>\n",
341 relax->
name, *result);
361 assert(relax != NULL);
372 assert(relax != NULL);
383 assert(relax != NULL);
385 relax->relaxcopy = relaxcopy;
394 assert(relax != NULL);
396 relax->relaxfree = relaxfree;
405 assert(relax != NULL);
407 relax->relaxinit = relaxinit;
416 assert(relax != NULL);
418 relax->relaxexit = relaxexit;
427 assert(relax != NULL);
429 relax->relaxinitsol = relaxinitsol;
438 assert(relax != NULL);
440 relax->relaxexitsol = relaxexitsol;
448 assert(relax != NULL);
458 assert(relax != NULL);
468 assert(relax != NULL);
480 assert(relax != NULL);
484 set->relaxssorted =
FALSE;
492 assert(relax != NULL);
502 assert(relax != NULL);
513 assert(relax != NULL);
524 assert(relax != NULL);
534 assert(relax != NULL);
544 assert(relax != NULL);
555 assert(relax != NULL);
556 assert(stat != NULL);
566 assert(relax != NULL);
585 assert(relaxation != NULL);
586 assert(blkmem != NULL);
588 assert(stat != NULL);
589 assert(primal != NULL);
590 assert(tree != NULL);
594 (*relaxation)->relaxsolobjval = 0.0;
595 (*relaxation)->relaxsolvalid =
FALSE;
596 (*relaxation)->relaxsolincludeslp =
FALSE;
597 (*relaxation)->relaxsolzero =
TRUE;
607 assert(relaxation != NULL);
620 assert(relaxation != NULL);
630 assert(relaxation != NULL);
642 assert(relaxation != NULL);
653 assert(relaxation != NULL);
663 assert(relaxation != NULL);
674 assert(relaxation != NULL);
684 assert(relaxation != NULL);
695 assert(relaxation != NULL);
711 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)
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
struct SCIP_ParamData SCIP_PARAMDATA
void SCIPrelaxSetPriority(SCIP_RELAX *relax, SCIP_SET *set, int priority)
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)
void SCIPrelaxationSetSolValid(SCIP_RELAXATION *relaxation, SCIP_Bool isvalid, SCIP_Bool includeslp)
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)
#define SCIP_DECL_RELAXEXIT(x)
SCIP_RELAXDATA * relaxdata
void SCIPrelaxSetFree(SCIP_RELAX *relax, SCIP_DECL_RELAXFREE((*relaxfree)))
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_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 BMSfreeMemoryArray(ptr)
SCIP_RETCODE SCIPrelaxExit(SCIP_RELAX *relax, SCIP_SET *set)
SCIP_Bool relaxsolincludeslp
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_RETCODE SCIPrelaxationFree(SCIP_RELAXATION **relaxation)
SCIP_Bool SCIPrelaxIsSolved(SCIP_RELAX *relax, SCIP_STAT *stat)
SCIP_RETCODE SCIPrelaxInitsol(SCIP_RELAX *relax, SCIP_SET *set)
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
#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)
SCIP_Bool SCIPrelaxationIsLpIncludedForSol(SCIP_RELAXATION *relaxation)
void SCIPrelaxSetInit(SCIP_RELAX *relax, SCIP_DECL_RELAXINIT((*relaxinit)))
SCIP_RETCODE SCIPrelaxExitsol(SCIP_RELAX *relax, SCIP_SET *set)