4 cdef public Model model
7 '''frees memory of node selector'''
11 ''' executed after the problem is transformed. use this call to initialize node selector data.'''
15 '''executed before the transformed problem is freed'''
19 '''executed when the presolving is finished and the branch-and-bound process is about to begin'''
23 '''executed before the branch-and-bound process is freed'''
27 '''first method called in each iteration in the main solving loop. '''
33 compare two leaves of the current branching tree
35 It should return the following values:
37 value < 0, if node 1 comes before (is better than) node 2
38 value = 0, if both nodes are equally good
39 value > 0, if node 1 comes after (is worse than) node 2.
45 cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel) noexcept
with gil:
48 cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) noexcept
with gil:
49 cdef SCIP_NODESELDATA* nodeseldata
51 PyNodesel = <Nodesel>nodeseldata
56 cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept
with gil:
57 cdef SCIP_NODESELDATA* nodeseldata
59 PyNodesel = <Nodesel>nodeseldata
64 cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept
with gil:
65 cdef SCIP_NODESELDATA* nodeseldata
67 PyNodesel = <Nodesel>nodeseldata
71 cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept
with gil:
72 cdef SCIP_NODESELDATA* nodeseldata
74 PyNodesel = <Nodesel>nodeseldata
75 PyNodesel.nodeinitsol()
78 cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept
with gil:
79 cdef SCIP_NODESELDATA* nodeseldata
81 PyNodesel = <Nodesel>nodeseldata
82 PyNodesel.nodeexitsol()
85 cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode) noexcept
with gil:
86 cdef SCIP_NODESELDATA* nodeseldata
88 PyNodesel = <Nodesel>nodeseldata
89 result_dict = PyNodesel.nodeselect()
90 selected_node = <Node>(result_dict.get(
"selnode",
None))
91 selnode[0] = selected_node.scip_node
94 cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2) noexcept
with gil:
95 cdef SCIP_NODESELDATA* nodeseldata
97 PyNodesel = <Nodesel>nodeseldata
98 n1 = Node.create(node1)
99 n2 = Node.create(node2)
100 result = PyNodesel.nodecomp(n1, n2)