C++ wrapper for primal heuristics.
This class defines the interface for primal heuristics implemented in C++. Note that there is a pure virtual function (this function has to be implemented). This function is: scip_exec().
#include <objheur.h>
Public Member Functions | |
ObjHeur (SCIP *scip, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip) | |
virtual | ~ObjHeur () |
virtual | SCIP_DECL_HEURFREE (scip_free) |
virtual | SCIP_DECL_HEURINIT (scip_init) |
virtual | SCIP_DECL_HEUREXIT (scip_exit) |
virtual | SCIP_DECL_HEURINITSOL (scip_initsol) |
virtual | SCIP_DECL_HEUREXITSOL (scip_exitsol) |
virtual | SCIP_DECL_HEUREXEC (scip_exec)=0 |
Public Member Functions inherited from scip::ObjCloneable | |
virtual | ~ObjCloneable () |
virtual | SCIP_DECL_OBJCLONEABLECLONE (ObjCloneable *clone) |
virtual | SCIP_DECL_OBJCLONEABLEISCLONEABLE (iscloneable) |
Data Fields | |
SCIP * | scip_ |
char * | scip_name_ |
char * | scip_desc_ |
const char | scip_dispchar_ |
const int | scip_priority_ |
const int | scip_freq_ |
const int | scip_freqofs_ |
const int | scip_maxdepth_ |
const SCIP_HEURTIMING | scip_timingmask_ |
const SCIP_Bool | scip_usessubscip_ |
|
inline |
default constructor
scip | SCIP data structure |
name | name of primal heuristic |
desc | description of primal heuristic |
dispchar | display character of primal heuristic |
priority | priority of the primal heuristic |
freq | frequency for calling primal heuristic |
freqofs | frequency offset for calling primal heuristic |
maxdepth | maximal depth level to call heuristic at (-1: no limit) |
timingmask | positions in the node solving loop where heuristic should be executed; see definition of SCIP_HEURTIMING for possible values |
usessubscip | does the heuristic use a secondary SCIP instance? |
Definition at line 79 of file objheur.h.
References SCIP_CALL_ABORT, and SCIPduplicateMemoryArray.
|
inlinevirtual |
|
inlinevirtual |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Reimplemented in tsp::Heur2opt, tsp::HeurFrats, and tsp::HeurFarthestInsert.
Definition at line 121 of file objheur.h.
References SCIP_OKAY.
|
inlinevirtual |
initialization method of primal heuristic (called after problem was transformed)
Reimplemented in tsp::Heur2opt, tsp::HeurFrats, and tsp::HeurFarthestInsert.
Definition at line 130 of file objheur.h.
References SCIP_OKAY.
|
inlinevirtual |
deinitialization method of primal heuristic (called before transformed problem is freed)
Reimplemented in tsp::Heur2opt, tsp::HeurFrats, and tsp::HeurFarthestInsert.
Definition at line 139 of file objheur.h.
References SCIP_OKAY.
|
inlinevirtual |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Reimplemented in tsp::Heur2opt, tsp::HeurFrats, and tsp::HeurFarthestInsert.
Definition at line 148 of file objheur.h.
References SCIP_OKAY.
|
inlinevirtual |
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
Reimplemented in tsp::Heur2opt, tsp::HeurFrats, and tsp::HeurFarthestInsert.
Definition at line 157 of file objheur.h.
References SCIP_Bool, SCIP_DECL_HEUREXEC(), SCIP_OKAY, SCIPfindObjHeur(), SCIPgetObjHeur(), and SCIPincludeObjHeur().
|
pure virtual |
execution method of primal heuristic
Implemented in tsp::Heur2opt, tsp::HeurFrats, and tsp::HeurFarthestInsert.
Referenced by SCIP_DECL_HEUREXITSOL().
char* scip::ObjHeur::scip_name_ |
name of the primal heuristic
Definition at line 52 of file objheur.h.
Referenced by SCIPincludeObjHeur().
char* scip::ObjHeur::scip_desc_ |
description of the primal heuristic
Definition at line 55 of file objheur.h.
Referenced by SCIPincludeObjHeur().
const char scip::ObjHeur::scip_dispchar_ |
display character of primal heuristic
Definition at line 58 of file objheur.h.
Referenced by SCIPincludeObjHeur().
const int scip::ObjHeur::scip_priority_ |
default priority of the primal heuristic
Definition at line 61 of file objheur.h.
Referenced by SCIPincludeObjHeur().
const int scip::ObjHeur::scip_freq_ |
frequency for calling primal heuristic
Definition at line 64 of file objheur.h.
Referenced by SCIPincludeObjHeur().
const int scip::ObjHeur::scip_freqofs_ |
frequency offset for calling primal heuristic
Definition at line 67 of file objheur.h.
Referenced by SCIPincludeObjHeur().
const int scip::ObjHeur::scip_maxdepth_ |
maximal depth level to call heuristic at (-1: no limit)
Definition at line 70 of file objheur.h.
Referenced by SCIPincludeObjHeur().
const SCIP_HEURTIMING scip::ObjHeur::scip_timingmask_ |
positions in the node solving loop where heuristic should be executed
Definition at line 73 of file objheur.h.
Referenced by SCIPincludeObjHeur().
const SCIP_Bool scip::ObjHeur::scip_usessubscip_ |
does the heuristic use a secondary SCIP instance?
Definition at line 76 of file objheur.h.
Referenced by SCIPincludeObjHeur().