Detailed Description
public methods for relaxation handlers
Function Documentation
◆ SCIP_DECL_SORTPTRCOMP() [1/2]
SCIP_EXPORT SCIP_DECL_SORTPTRCOMP | ( | SCIPrelaxComp | ) |
◆ SCIP_DECL_SORTPTRCOMP() [2/2]
SCIP_EXPORT SCIP_DECL_SORTPTRCOMP | ( | SCIPrelaxCompName | ) |
comparison method for sorting relaxators w.r.t. to their name
Definition at line 50 of file relax.c.
References SCIPrelaxGetName().
◆ SCIPrelaxGetData()
SCIP_EXPORT SCIP_RELAXDATA* SCIPrelaxGetData | ( | SCIP_RELAX * | relax | ) |
gets user data of relaxation handler
- Parameters
-
relax relaxation handler
Definition at line 393 of file relax.c.
References NULL, and SCIP_Relax::relaxdata.
Referenced by SCIP_DECL_RELAXCOPY(), SCIP_DECL_RELAXEXEC(), SCIP_DECL_RELAXEXIT(), SCIP_DECL_RELAXEXITSOL(), SCIP_DECL_RELAXFREE(), SCIP_DECL_RELAXINIT(), SCIP_DECL_RELAXINITSOL(), SCIPfindObjRelax(), and SCIPgetObjRelax().
◆ SCIPrelaxSetData()
SCIP_EXPORT void SCIPrelaxSetData | ( | SCIP_RELAX * | relax, |
SCIP_RELAXDATA * | relaxdata | ||
) |
sets user data of relaxation handler; user has to free old data in advance!
- Parameters
-
relax relaxation handler relaxdata new relaxation handler user data
Definition at line 403 of file relax.c.
References NULL, and SCIP_Relax::relaxdata.
Referenced by SCIP_DECL_RELAXFREE().
◆ SCIPrelaxGetName()
SCIP_EXPORT const char* SCIPrelaxGetName | ( | SCIP_RELAX * | relax | ) |
gets name of relaxation handler
- Parameters
-
relax relaxation handler
Definition at line 480 of file relax.c.
References SCIP_Relax::name, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_SORTPTRCOMP(), SCIPprintRelaxatorStatistics(), SCIPrelaxCopyInclude(), SCIPsetFindPresol(), SCIPsolveProbingRelax(), and solveNodeRelax().
◆ SCIPrelaxGetDesc()
SCIP_EXPORT const char* SCIPrelaxGetDesc | ( | SCIP_RELAX * | relax | ) |
gets description of relaxation handler
- Parameters
-
relax relaxation handler
Definition at line 490 of file relax.c.
References SCIP_Relax::desc, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPrelaxGetPriority()
SCIP_EXPORT int SCIPrelaxGetPriority | ( | SCIP_RELAX * | relax | ) |
gets priority of relaxation handler
- Parameters
-
relax relaxation handler
Definition at line 500 of file relax.c.
References NULL, and SCIP_Relax::priority.
Referenced by SCIP_DECL_DIALOGEXEC(), and solveNodeRelax().
◆ SCIPrelaxGetFreq()
SCIP_EXPORT int SCIPrelaxGetFreq | ( | SCIP_RELAX * | relax | ) |
gets frequency of relaxation handler
- Parameters
-
relax relaxation handler
Definition at line 524 of file relax.c.
References SCIP_Relax::freq, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPrelaxGetSetupTime()
SCIP_EXPORT SCIP_Real SCIPrelaxGetSetupTime | ( | SCIP_RELAX * | relax | ) |
gets time in seconds used in this relaxator for setting up for next stages
- Parameters
-
relax relaxator
Definition at line 534 of file relax.c.
References NULL, SCIPclockGetTime(), and SCIP_Relax::setuptime.
◆ SCIPrelaxGetTime()
SCIP_EXPORT SCIP_Real SCIPrelaxGetTime | ( | SCIP_RELAX * | relax | ) |
gets time in seconds used in this relaxation handler
- Parameters
-
relax relaxation handler
Definition at line 556 of file relax.c.
References NULL, SCIP_Relax::relaxclock, and SCIPclockGetTime().
Referenced by SCIPprintRelaxatorStatistics().
◆ SCIPrelaxGetNCalls()
SCIP_EXPORT SCIP_Longint SCIPrelaxGetNCalls | ( | SCIP_RELAX * | relax | ) |
gets the total number of times, the relaxation handler was called
- Parameters
-
relax relaxation handler
Definition at line 566 of file relax.c.
References SCIP_Relax::ncalls, and NULL.
Referenced by SCIPprintRelaxatorStatistics().
◆ SCIPrelaxIsInitialized()
SCIP_EXPORT SCIP_Bool SCIPrelaxIsInitialized | ( | SCIP_RELAX * | relax | ) |
is relaxation handler initialized?
- Parameters
-
relax relaxation handler
Definition at line 576 of file relax.c.
References SCIP_Relax::initialized, and NULL.
Referenced by SCIPsetIncludePresol().
◆ SCIPrelaxMarkUnsolved()
SCIP_EXPORT void SCIPrelaxMarkUnsolved | ( | SCIP_RELAX * | relax | ) |
marks the current relaxation unsolved, s.t. the relaxation handler is called again in the next solving round
- Parameters
-
relax relaxation handler
Definition at line 598 of file relax.c.
References SCIP_Relax::lastsolvednode, and NULL.
Referenced by markRelaxsUnsolved(), and SCIPrelaxExec().
◆ SCIPincludeRelax()
SCIP_EXPORT SCIP_RETCODE SCIPincludeRelax | ( | SCIP * | scip, |
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 | ||
) |
creates a relaxation handler and includes it in SCIP
- Note
- method has all relaxation handler callbacks as arguments and is thus changed every time a new callback is added in future releases; consider using SCIPincludeRelaxBasic() and setter functions if you seek for a method which is less likely to change in future releases
- Parameters
-
scip SCIP data structure 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 relaxdata relaxation handler data
Definition at line 51 of file scip_relax.c.
References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPfindRelax(), SCIPrelaxCreate(), SCIPsetIncludeRelax(), Scip::set, SCIP_Mem::setmem, and TRUE.
Referenced by SCIPincludeObjRelax().
◆ SCIPincludeRelaxBasic()
SCIP_EXPORT SCIP_RETCODE SCIPincludeRelaxBasic | ( | SCIP * | scip, |
SCIP_RELAX ** | relaxptr, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
int | freq, | ||
SCIP_DECL_RELAXEXEC((*relaxexec)) | , | ||
SCIP_RELAXDATA * | relaxdata | ||
) |
creates a relaxation handler and includes it in SCIP. All non fundamental (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL. Optional callbacks can be set via specific setter functions, see SCIPsetRelaxInit(), SCIPsetRelaxExit(), SCIPsetRelaxCopy(), SCIPsetRelaxFree(), SCIPsetRelaxInitsol(), and SCIPsetRelaxExitsol()
- Note
- if you want to set all callbacks with a single method call, consider using SCIPincludeRelax() instead
- Parameters
-
scip SCIP data structure relaxptr reference to relaxation pointer, or NULL 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 relaxdata relaxation handler data
Definition at line 93 of file scip_relax.c.
References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPfindRelax(), SCIPrelaxCreate(), SCIPsetIncludeRelax(), Scip::set, SCIP_Mem::setmem, and TRUE.
Referenced by SCIPincludeRelaxLp(), and SCIPincludeRelaxNlp().
◆ SCIPsetRelaxCopy()
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxCopy | ( | SCIP * | scip, |
SCIP_RELAX * | relax, | ||
SCIP_DECL_RELAXCOPY((*relaxcopy)) | |||
) |
sets copy method of relaxation handler
- Parameters
-
scip SCIP data structure relax relaxation handler
Definition at line 127 of file scip_relax.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPrelaxSetCopy(), and TRUE.
◆ SCIPsetRelaxFree()
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxFree | ( | SCIP * | scip, |
SCIP_RELAX * | relax, | ||
SCIP_DECL_RELAXFREE((*relaxfree)) | |||
) |
sets destructor method of relaxation handler
- Parameters
-
scip SCIP data structure relax relaxation handler
Definition at line 143 of file scip_relax.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPrelaxSetFree(), and TRUE.
◆ SCIPsetRelaxInit()
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxInit | ( | SCIP * | scip, |
SCIP_RELAX * | relax, | ||
SCIP_DECL_RELAXINIT((*relaxinit)) | |||
) |
sets initialization method of relaxation handler
- Parameters
-
scip SCIP data structure relax relaxation handler
Definition at line 159 of file scip_relax.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPrelaxSetInit(), and TRUE.
◆ SCIPsetRelaxExit()
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxExit | ( | SCIP * | scip, |
SCIP_RELAX * | relax, | ||
SCIP_DECL_RELAXEXIT((*relaxexit)) | |||
) |
sets deinitialization method of relaxation handler
- Parameters
-
scip SCIP data structure relax relaxation handler
Definition at line 175 of file scip_relax.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPrelaxSetExit(), and TRUE.
◆ SCIPsetRelaxInitsol()
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxInitsol | ( | SCIP * | scip, |
SCIP_RELAX * | relax, | ||
SCIP_DECL_RELAXINITSOL((*relaxinitsol)) | |||
) |
sets solving process initialization method of relaxation handler
- Parameters
-
scip SCIP data structure relax relaxation handler
Definition at line 191 of file scip_relax.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPrelaxSetInitsol(), and TRUE.
Referenced by SCIPincludeRelaxNlp().
◆ SCIPsetRelaxExitsol()
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxExitsol | ( | SCIP * | scip, |
SCIP_RELAX * | relax, | ||
SCIP_DECL_RELAXEXITSOL((*relaxexitsol)) | |||
) |
sets solving process deinitialization method of relaxation handler
- Parameters
-
scip SCIP data structure relax relaxation handler
Definition at line 207 of file scip_relax.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPrelaxSetExitsol(), and TRUE.
Referenced by SCIPincludeRelaxNlp().
◆ SCIPfindRelax()
SCIP_EXPORT SCIP_RELAX* SCIPfindRelax | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the relaxation handler of the given name, or NULL if not existing
- Parameters
-
scip SCIP data structure name name of relaxation handler
Definition at line 224 of file scip_relax.c.
References NULL, SCIPsetFindRelax(), and Scip::set.
Referenced by SCIPfindObjRelax(), SCIPincludeRelax(), and SCIPincludeRelaxBasic().
◆ SCIPgetRelaxs()
SCIP_EXPORT SCIP_RELAX** SCIPgetRelaxs | ( | SCIP * | scip | ) |
returns the array of currently available relaxation handlers
- Parameters
-
scip SCIP data structure
Definition at line 237 of file scip_relax.c.
References NULL, SCIP_Set::relaxs, SCIPsetSortRelaxs(), and Scip::set.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPgetNRelaxs()
SCIP_EXPORT int SCIPgetNRelaxs | ( | SCIP * | scip | ) |
returns the number of currently available relaxation handlers
- Parameters
-
scip SCIP data structure
Definition at line 250 of file scip_relax.c.
References SCIP_Set::nrelaxs, NULL, and Scip::set.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPsetRelaxPriority()
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxPriority | ( | SCIP * | scip, |
SCIP_RELAX * | relax, | ||
int | priority | ||
) |
sets the priority of a relaxation handler
- Parameters
-
scip SCIP data structure relax relaxation handler priority new priority of the relaxation handler
Definition at line 261 of file scip_relax.c.
References NULL, SCIP_OKAY, SCIPrelaxSetPriority(), and Scip::set.
Referenced by SCIP_DECL_PARAMCHGD().