4 cdef public Model model
7 '''calls destructor and frees memory of propagator''' 11 '''initializes propagator''' 15 '''calls exit method of propagator''' 18 def propinitsol(self):
19 '''informs propagator that the prop and bound process is being started''' 22 def propexitsol(self, restart):
23 '''informs propagator that the prop and bound process data is being freed''' 26 def propinitpre(self):
27 '''informs propagator that the presolving process is being started''' 30 def propexitpre(self):
31 '''informs propagator that the presolving process is finished''' 34 def proppresol(self, nrounds, presoltiming, result_dict):
35 '''executes presolving method of propagator''' 38 def propexec(self, proptiming):
39 '''calls execution method of propagator''' 40 print(
"python error in propexec: this method needs to be implemented")
43 def propresprop(self, confvar, inferinfo, bdtype, relaxedbd):
44 '''resolves the given conflicting bound, that was reduced by the given propagator''' 45 print(
"python error in propresprop: this method needs to be implemented")
50 cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop):
53 cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop):
54 cdef SCIP_PROPDATA* propdata
56 PyProp = <Prop>propdata
61 cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop):
62 cdef SCIP_PROPDATA* propdata
64 PyProp = <Prop>propdata
68 cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop):
69 cdef SCIP_PROPDATA* propdata
71 PyProp = <Prop>propdata
75 cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop):
76 cdef SCIP_PROPDATA* propdata
78 PyProp = <Prop>propdata
82 cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop):
83 cdef SCIP_PROPDATA* propdata
85 PyProp = <Prop>propdata
89 cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop):
90 cdef SCIP_PROPDATA* propdata
92 PyProp = <Prop>propdata
96 cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart):
97 cdef SCIP_PROPDATA* propdata
99 PyProp = <Prop>propdata
100 PyProp.propexitsol(restart)
103 cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_PRESOLTIMING presoltiming,
104 int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes,
105 int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides,
106 int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes,
107 int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result):
108 cdef SCIP_PROPDATA* propdata
110 PyProp = <Prop>propdata
113 result_dict[
"nfixedvars"] = nfixedvars[0]
114 result_dict[
"naggrvars"] = naggrvars[0]
115 result_dict[
"nchgvartypes"] = nchgvartypes[0]
116 result_dict[
"nchgbds"] = nchgbds[0]
117 result_dict[
"naddholes"] = naddholes[0]
118 result_dict[
"ndelconss"] = ndelconss[0]
119 result_dict[
"naddconss"] = naddconss[0]
120 result_dict[
"nupgdconss"] = nupgdconss[0]
121 result_dict[
"nchgcoefs"] = nchgcoefs[0]
122 result_dict[
"nchgsides"] = nchgsides[0]
123 result_dict[
"result"] = result[0]
124 PyProp.proppresol(nrounds, presoltiming,
125 nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes,
126 nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, result_dict)
127 result[0] = result_dict[
"result"]
128 nfixedvars[0] = result_dict[
"nfixedvars"]
129 naggrvars[0] = result_dict[
"naggrvars"]
130 nchgvartypes[0] = result_dict[
"nchgvartypes"]
131 nchgbds[0] = result_dict[
"nchgbds"]
132 naddholes[0] = result_dict[
"naddholes"]
133 ndelconss[0] = result_dict[
"ndelconss"]
134 naddconss[0] = result_dict[
"naddconss"]
135 nupgdconss[0] = result_dict[
"nupgdconss"]
136 nchgcoefs[0] = result_dict[
"nchgcoefs"]
137 nchgsides[0] = result_dict[
"nchgsides"]
140 cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result):
141 cdef SCIP_PROPDATA* propdata
143 PyProp = <Prop>propdata
144 returnvalues = PyProp.propexec(proptiming)
145 result_dict = returnvalues
146 result[0] = result_dict.get(
"result", <SCIP_RESULT>result[0])
149 cdef SCIP_RETCODE PyPropResProp (SCIP* scip, SCIP_PROP* prop, SCIP_VAR* infervar, int inferinfo,
150 SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result):
151 cdef SCIP_PROPDATA* propdata
155 confvar = Variable.create(tmp)
159 PyProp = <Prop>propdata
160 returnvalues = PyProp.propresprop(confvar, inferinfo, boundtype, relaxedbd)
161 result_dict = returnvalues
162 result[0] = result_dict.get(
"result", <SCIP_RESULT>result[0])
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)