4 cdef public Model model
8 '''calls destructor and frees memory of primal heuristic'''
12 '''initializes primal heuristic'''
16 '''calls exit method of primal heuristic'''
20 '''informs primal heuristic that the branch and bound process is being started'''
24 '''informs primal heuristic that the branch and bound process data is being freed'''
27 def heurexec(self, heurtiming, nodeinfeasible):
28 '''should the heuristic the executed at the given depth, frequency, timing,...'''
29 print(
"python error in heurexec: this method needs to be implemented")
34 cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur) noexcept
with gil:
37 cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) noexcept
with gil:
38 cdef SCIP_HEURDATA* heurdata
40 PyHeur = <Heur>heurdata
45 cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur) noexcept
with gil:
46 cdef SCIP_HEURDATA* heurdata
48 PyHeur = <Heur>heurdata
52 cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur) noexcept
with gil:
53 cdef SCIP_HEURDATA* heurdata
55 PyHeur = <Heur>heurdata
59 cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur) noexcept
with gil:
60 cdef SCIP_HEURDATA* heurdata
62 PyHeur = <Heur>heurdata
66 cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur) noexcept
with gil:
67 cdef SCIP_HEURDATA* heurdata
69 PyHeur = <Heur>heurdata
73 cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result) noexcept
with gil:
74 cdef SCIP_HEURDATA* heurdata
76 PyHeur = <Heur>heurdata
77 result_dict = PyHeur.heurexec(heurtiming, nodeinfeasible)
78 result[0] = result_dict.get(
"result", <SCIP_RESULT>result[0])