internal methods for relaxators
Definition in file relax.h.
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_primal.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_sol.h"
#include "scip/type_stat.h"
#include "scip/type_tree.h"
#include "scip/type_relax.h"
#include "scip/pub_relax.h"
Go to the source code of this file.
SCIP_RETCODE SCIPrelaxCopyInclude | ( | SCIP_RELAX * | relax, |
SCIP_SET * | set | ||
) |
copies the given relaxator to a new scip
copies the given relaxation handler to a new scip
relax | relaxation handler |
set | SCIP_SET of SCIP to copy to |
Definition at line 71 of file relax.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPrelaxGetName(), and SCIPsetDebugMsg.
Referenced by SCIPsetCopyPlugins().
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 | ||
) |
creates a relaxator
creates a relaxation handler
relax | pointer to relaxation handler data structure |
set | global SCIP settings |
messagehdlr | message handler |
blkmem | block memory for parameter settings |
name | name of relaxation handler |
desc | description of relaxation handler |
priority | priority of the relaxation handler (negative: after LP, non-negative: before LP) |
freq | frequency for calling relaxation handler |
includeslp | Does the relaxator contain all cuts in the LP? |
relaxdata | relaxation handler data |
Definition at line 89 of file relax.c.
References BMSallocMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_MAXTREEDEPTH, SCIP_OKAY, SCIPclockCreate(), SCIPsetAddIntParam(), and SCIPsnprintf().
Referenced by SCIPincludeRelax(), and SCIPincludeRelaxBasic().
SCIP_RETCODE SCIPrelaxFree | ( | SCIP_RELAX ** | relax, |
SCIP_SET * | set | ||
) |
calls destructor and frees memory of relaxator
calls destructor and frees memory of relaxation handler
relax | pointer to relaxation handler data structure |
set | global SCIP settings |
Definition at line 153 of file relax.c.
References BMSfreeMemory, BMSfreeMemoryArray, NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().
SCIP_RETCODE SCIPrelaxInit | ( | SCIP_RELAX * | relax, |
SCIP_SET * | set | ||
) |
initializes relaxator
initializes relaxation handler
relax | relaxation handler |
set | global SCIP settings |
Definition at line 179 of file relax.c.
References SCIP_Relax::initialized, SCIP_Relax::lastsolvednode, SCIP_Relax::name, SCIP_Relax::ncalls, NULL, SCIP_Relax::relaxclock, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIP_Relax::setuptime, and TRUE.
Referenced by SCIPsetSetPriorityNlpi().
SCIP_RETCODE SCIPrelaxExit | ( | SCIP_RELAX * | relax, |
SCIP_SET * | set | ||
) |
calls exit method of relaxator
calls exit method of relaxation handler
relax | relaxation handler |
set | global SCIP settings |
Definition at line 217 of file relax.c.
References FALSE, SCIP_Relax::initialized, SCIP_Relax::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Relax::setuptime.
SCIP_RETCODE SCIPrelaxInitsol | ( | SCIP_RELAX * | relax, |
SCIP_SET * | set | ||
) |
informs relaxator that the branch and bound process is being started
informs relaxation handler that the branch and bound process is being started
relax | relaxation handler |
set | global SCIP settings |
Definition at line 247 of file relax.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Relax::setuptime.
SCIP_RETCODE SCIPrelaxExitsol | ( | SCIP_RELAX * | relax, |
SCIP_SET * | set | ||
) |
informs relaxator that the branch and bound process data is being freed
informs relaxation handler that the branch and bound process data is being freed
relax | relaxation handler |
set | global SCIP settings |
Definition at line 271 of file relax.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Relax::setuptime.
SCIP_RETCODE SCIPrelaxExec | ( | SCIP_RELAX * | relax, |
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
int | depth, | ||
SCIP_Real * | lowerbound, | ||
SCIP_RESULT * | result | ||
) |
calls execution method of relaxator
calls execution method of relaxation handler
relax | relaxation handler |
set | global SCIP settings |
stat | dynamic problem statistics |
depth | depth of current node |
lowerbound | pointer to lower bound computed by the relaxation handler |
result | pointer to store the result of the callback method |
Definition at line 295 of file relax.c.
References SCIP_Relax::freq, SCIP_Relax::lastsolvednode, SCIP_Relax::name, SCIP_Relax::ncalls, SCIP_Stat::ntotalnodes, NULL, SCIP_Relax::relaxclock, SCIP_Stat::relaxcount, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIP_SUCCESS, SCIP_SUSPENDED, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPinProbing(), SCIPrelaxMarkUnsolved(), and SCIPsetDebugMsg.
Referenced by SCIPsolveProbingRelax(), and solveNodeRelax().
void SCIPrelaxSetPriority | ( | SCIP_RELAX * | relax, |
SCIP_SET * | set, | ||
int | priority | ||
) |
sets priority of relaxator
sets priority of relaxation handler
relax | relaxation handler |
set | global SCIP settings |
priority | new priority of the relaxation handler |
Definition at line 476 of file relax.c.
References FALSE, NULL, and SCIP_Relax::priority.
Referenced by SCIPsetRelaxPriority().
void SCIPrelaxSetCopy | ( | SCIP_RELAX * | relax, |
SCIP_DECL_RELAXCOPY((*relaxcopy)) | |||
) |
set copy callback of relaxation handler
set copy method of relaxation handler
relax | relaxation handler |
Definition at line 380 of file relax.c.
References NULL.
Referenced by SCIPsetRelaxCopy().
void SCIPrelaxSetFree | ( | SCIP_RELAX * | relax, |
SCIP_DECL_RELAXFREE((*relaxfree)) | |||
) |
set destructor callback of relaxation handler
set destructor of relaxation handler
relax | relaxation handler |
Definition at line 391 of file relax.c.
References NULL.
Referenced by SCIPsetRelaxFree().
void SCIPrelaxSetInit | ( | SCIP_RELAX * | relax, |
SCIP_DECL_RELAXINIT((*relaxinit)) | |||
) |
set initialization callback of relaxation handler
set initialization method of relaxation handler
relax | relaxation handler |
Definition at line 402 of file relax.c.
References NULL.
Referenced by SCIPsetRelaxInit().
void SCIPrelaxSetExit | ( | SCIP_RELAX * | relax, |
SCIP_DECL_RELAXEXIT((*relaxexit)) | |||
) |
set deinitialization callback of relaxation handler
set deinitialization method of relaxation handler
relax | relaxation handler |
Definition at line 413 of file relax.c.
References NULL.
Referenced by SCIPsetRelaxExit().
void SCIPrelaxSetInitsol | ( | SCIP_RELAX * | relax, |
SCIP_DECL_RELAXINITSOL((*relaxinitsol)) | |||
) |
set solving process initialization callback of relaxation handler
set solving process initialization method of relaxation handler
relax | relaxation handler |
Definition at line 424 of file relax.c.
References NULL.
Referenced by SCIPsetRelaxInitsol().
void SCIPrelaxSetExitsol | ( | SCIP_RELAX * | relax, |
SCIP_DECL_RELAXEXITSOL((*relaxexitsol)) | |||
) |
set solving process deinitialization callback of relaxation handler
set solving process deinitialization method of relaxation handler
relax | relaxation handler |
Definition at line 435 of file relax.c.
References NULL.
Referenced by SCIPsetRelaxExitsol().
SCIP_Bool SCIPrelaxIsSolved | ( | SCIP_RELAX * | relax, |
SCIP_STAT * | stat | ||
) |
returns whether the relaxation was completely solved at the current node
relax | relaxation handler |
stat | dynamic problem statistics |
Definition at line 573 of file relax.c.
References SCIP_Relax::lastsolvednode, SCIP_Stat::ntotalnodes, and NULL.
Referenced by updateLoopStatus().
void SCIPrelaxEnableOrDisableClocks | ( | SCIP_RELAX * | relax, |
SCIP_Bool | enable | ||
) |
enables or disables all clocks of relax
, depending on the value of the flag
relax | the relaxation handler for which all clocks should be enabled or disabled |
enable | should the clocks of the relaxation handler be enabled? |
Definition at line 510 of file relax.c.
References NULL, SCIP_Relax::relaxclock, SCIPclockEnableOrDisable(), and SCIP_Relax::setuptime.
SCIP_RETCODE SCIPrelaxationCreate | ( | SCIP_RELAXATION ** | relaxation, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_TREE * | tree | ||
) |
creates global relaxation data
relaxation | global relaxation data |
blkmem | block memory |
set | global SCIP settings |
stat | problem statistics data |
primal | primal data |
tree | branch and bound tree |
Definition at line 599 of file relax.c.
References BMSallocMemory, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPsetInfinity(), SCIPsolCreateUnknown(), and TRUE.
Referenced by prepareReoptimization(), and SCIPtransformProb().
SCIP_RETCODE SCIPrelaxationFree | ( | SCIP_RELAXATION ** | relaxation, |
BMS_BLKMEM * | blkmem, | ||
SCIP_PRIMAL * | primal | ||
) |
frees global relaxation data
relaxation | global relaxation data |
blkmem | block memory |
primal | primal data |
Definition at line 627 of file relax.c.
References BMSfreeMemory, NULL, SCIP_CALL, SCIP_OKAY, and SCIPsolFree().
Referenced by freeReoptSolve(), and freeTransform().
void SCIPrelaxationSetSolZero | ( | SCIP_RELAXATION * | relaxation, |
SCIP_Bool | iszero | ||
) |
sets the relaxsolzero flag in the relaxation data to the given value
relaxation | global relaxation data |
iszero | are all values of the relaxation solution set to zero? |
Definition at line 643 of file relax.c.
References NULL, and SCIP_Relaxation::relaxsolzero.
Referenced by SCIPclearRelaxSolVals(), SCIPsetRelaxSolVal(), SCIPsetRelaxSolVals(), and SCIPsetRelaxSolValsSol().
SCIP_Bool SCIPrelaxationIsSolZero | ( | SCIP_RELAXATION * | relaxation | ) |
returns whether the global relaxation solution is cleared and all values are set to zero
relaxation | global relaxation data |
Definition at line 654 of file relax.c.
References NULL, and SCIP_Relaxation::relaxsolzero.
Referenced by SCIPclearRelaxSolVals().
void SCIPrelaxationSetSolValid | ( | SCIP_RELAXATION * | relaxation, |
SCIP_Bool | isvalid | ||
) |
sets the relaxsolvalid flag in the relaxation data to the given value
relaxation | global relaxation data |
isvalid | is the stored solution valid? |
Definition at line 664 of file relax.c.
References NULL, and SCIP_Relaxation::relaxsolvalid.
Referenced by markRelaxsUnsolved(), SCIPmarkRelaxSolInvalid(), SCIPmarkRelaxSolValid(), SCIPsetRelaxSolVal(), SCIPsetRelaxSolVals(), SCIPsetRelaxSolValsSol(), solveNode(), and solveNodeRelax().
SCIP_Bool SCIPrelaxationIsSolValid | ( | SCIP_RELAXATION * | relaxation | ) |
returns whether the global relaxation solution is valid
relaxation | global relaxation data |
Definition at line 675 of file relax.c.
References NULL, and SCIP_Relaxation::relaxsolvalid.
Referenced by SCIPcreateRelaxSol(), SCIPgetRelaxSolObj(), SCIPgetRelaxSolVal(), SCIPisRelaxSolValid(), SCIPlinkRelaxSol(), SCIPsolCreateRelaxSol(), SCIPsolLinkRelaxSol(), and solveNodeRelax().
void SCIPrelaxationSetSolObj | ( | SCIP_RELAXATION * | relaxation, |
SCIP_Real | obj | ||
) |
sets the objective value of the global relaxation solution
relaxation | global relaxation data |
obj | objective value |
Definition at line 685 of file relax.c.
References NULL, and SCIP_Relaxation::relaxsolobjval.
Referenced by SCIPclearRelaxSolVals(), and SCIPsetRelaxSolValsSol().
SCIP_Real SCIPrelaxationGetSolObj | ( | SCIP_RELAXATION * | relaxation | ) |
returns the objective value of the global relaxation solution w.r.t. the transformed problem
relaxation | global relaxation data |
Definition at line 696 of file relax.c.
References NULL, and SCIP_Relaxation::relaxsolobjval.
Referenced by SCIPgetRelaxSolObj(), and SCIPsolLinkRelaxSol().
void SCIPrelaxationSolObjAdd | ( | SCIP_RELAXATION * | relaxation, |
SCIP_Real | val | ||
) |
adds the given value to the global relaxation solution's objective value
relaxation | global relaxation data |
val | value to add to the objective value |
Definition at line 706 of file relax.c.
References NULL, and SCIP_Relaxation::relaxsolobjval.
Referenced by SCIPvarSetRelaxSol().
SCIP_SOL* SCIPrelaxationGetBestRelaxSol | ( | SCIP_RELAXATION * | relaxation | ) |
gets pointer to best relaxation solution
relaxation | global relaxation data |
Definition at line 717 of file relax.c.
References SCIP_Relaxation::bestrelaxsol, and NULL.
Referenced by addCurrentSolution(), enforceConstraints(), SCIPsolveCIP(), solveNode(), and solveNodeRelax().
void SCIPrelaxationSetBestRelaxSolObj | ( | SCIP_RELAXATION * | relaxation, |
SCIP_Real | obj | ||
) |
sets the objective value of the best relaxation solution
relaxation | global relaxation data |
obj | objective value of best relaxation solution |
Definition at line 727 of file relax.c.
References SCIP_Relaxation::bestrelaxsolobj, and NULL.
Referenced by propAndSolve(), solveNode(), and solveNodeRelax().
SCIP_Real SCIPrelaxationGetBestRelaxSolObj | ( | SCIP_RELAXATION * | relaxation | ) |
returns the objective value of the best relaxation solution
returns the objective value of the best relaxation solution (or minus infinity if it should not be enforced)
relaxation | global relaxation data |
Definition at line 738 of file relax.c.
References SCIP_Relaxation::bestrelaxsolobj, and NULL.
Referenced by addCurrentSolution(), enforceConstraints(), SCIPsolveCIP(), solveNode(), and solveNodeRelax().
void SCIPrelaxationUpdateVarObj | ( | SCIP_RELAXATION * | relaxation, |
SCIP_SET * | set, | ||
SCIP_VAR * | var, | ||
SCIP_Real | oldobj, | ||
SCIP_Real | newobj | ||
) |
updates objective value of current relaxation solution after change of objective coefficient
relaxation | global relaxation data |
set | global SCIP settings |
var | variable with changed objective coefficient |
oldobj | old objective coefficient |
newobj | new objective coefficient |
Definition at line 748 of file relax.c.
References NULL, SCIP_Relaxation::relaxsolobjval, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPvarGetRelaxSol(), and SCIPvarGetStatus().
Referenced by SCIPchgVarObjProbing(), and treeBacktrackProbing().