@@ -168,48 +168,54 @@ cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr) noexcept with
168
168
return SCIP_OKAY
169
169
170
170
cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil:
171
+ cdef int i
171
172
PyConshdlr = getPyConshdlr(conshdlr)
172
- cdef constraints = []
173
+ constraints = []
173
174
for i in range (nconss):
174
175
constraints.append(getPyCons(conss[i]))
175
176
PyConshdlr.consinit(constraints)
176
177
return SCIP_OKAY
177
178
178
179
cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil:
180
+ cdef int i
179
181
PyConshdlr = getPyConshdlr(conshdlr)
180
- cdef constraints = []
182
+ constraints = []
181
183
for i in range (nconss):
182
184
constraints.append(getPyCons(conss[i]))
183
185
PyConshdlr.consexit(constraints)
184
186
return SCIP_OKAY
185
187
186
188
cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil:
189
+ cdef int i
187
190
PyConshdlr = getPyConshdlr(conshdlr)
188
- cdef constraints = []
191
+ constraints = []
189
192
for i in range (nconss):
190
193
constraints.append(getPyCons(conss[i]))
191
194
PyConshdlr.consinitpre(constraints)
192
195
return SCIP_OKAY
193
196
194
197
cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil:
198
+ cdef int i
195
199
PyConshdlr = getPyConshdlr(conshdlr)
196
- cdef constraints = []
200
+ constraints = []
197
201
for i in range (nconss):
198
202
constraints.append(getPyCons(conss[i]))
199
203
PyConshdlr.consexitpre(constraints)
200
204
return SCIP_OKAY
201
205
202
206
cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil:
207
+ cdef int i
203
208
PyConshdlr = getPyConshdlr(conshdlr)
204
- cdef constraints = []
209
+ constraints = []
205
210
for i in range (nconss):
206
211
constraints.append(getPyCons(conss[i]))
207
212
PyConshdlr.consinitsol(constraints)
208
213
return SCIP_OKAY
209
214
210
215
cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart) noexcept with gil:
216
+ cdef int i
211
217
PyConshdlr = getPyConshdlr(conshdlr)
212
- cdef constraints = []
218
+ constraints = []
213
219
for i in range (nconss):
214
220
constraints.append(getPyCons(conss[i]))
215
221
PyConshdlr.consexitsol(constraints, restart)
@@ -244,17 +250,19 @@ cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* s
244
250
return SCIP_OKAY
245
251
246
252
cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible) noexcept with gil:
253
+ cdef int i
247
254
PyConshdlr = getPyConshdlr(conshdlr)
248
- cdef constraints = []
255
+ constraints = []
249
256
for i in range (nconss):
250
257
constraints.append(getPyCons(conss[i]))
251
258
result_dict = PyConshdlr.consinitlp(constraints)
252
259
infeasible[0 ] = result_dict.get(" infeasible" , infeasible[0 ])
253
260
return SCIP_OKAY
254
261
255
262
cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result) noexcept with gil:
263
+ cdef int i
256
264
PyConshdlr = getPyConshdlr(conshdlr)
257
- cdef constraints = []
265
+ constraints = []
258
266
for i in range (nconss):
259
267
constraints.append(getPyCons(conss[i]))
260
268
result_dict = PyConshdlr.conssepalp(constraints, nusefulconss)
@@ -263,8 +271,9 @@ cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS**
263
271
264
272
cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss,
265
273
SCIP_SOL* sol, SCIP_RESULT* result) noexcept with gil:
274
+ cdef int i
266
275
PyConshdlr = getPyConshdlr(conshdlr)
267
- cdef constraints = []
276
+ constraints = []
268
277
for i in range (nconss):
269
278
constraints.append(getPyCons(conss[i]))
270
279
solution = Solution.create(scip, sol)
@@ -274,17 +283,19 @@ cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS*
274
283
275
284
cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss,
276
285
SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil:
286
+ cdef int i
277
287
PyConshdlr = getPyConshdlr(conshdlr)
278
- cdef constraints = []
288
+ constraints = []
279
289
for i in range (nconss):
280
290
constraints.append(getPyCons(conss[i]))
281
291
result_dict = PyConshdlr.consenfolp(constraints, nusefulconss, solinfeasible)
282
292
result[0 ] = result_dict.get(" result" , < SCIP_RESULT> result[0 ])
283
293
return SCIP_OKAY
284
294
285
295
cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil:
296
+ cdef int i
286
297
PyConshdlr = getPyConshdlr(conshdlr)
287
- cdef constraints = []
298
+ constraints = []
288
299
for i in range (nconss):
289
300
constraints.append(getPyCons(conss[i]))
290
301
solution = Solution.create(scip, sol)
@@ -294,8 +305,9 @@ cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* con
294
305
295
306
cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss,
296
307
SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result) noexcept with gil:
308
+ cdef int i
297
309
PyConshdlr = getPyConshdlr(conshdlr)
298
- cdef constraints = []
310
+ constraints = []
299
311
for i in range (nconss):
300
312
constraints.append(getPyCons(conss[i]))
301
313
result_dict = PyConshdlr.consenfops(constraints, nusefulconss, solinfeasible, objinfeasible)
@@ -304,8 +316,9 @@ cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS**
304
316
305
317
cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality,
306
318
SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result) noexcept with gil:
319
+ cdef int i
307
320
PyConshdlr = getPyConshdlr(conshdlr)
308
- cdef constraints = []
321
+ constraints = []
309
322
for i in range (nconss):
310
323
constraints.append(getPyCons(conss[i]))
311
324
solution = Solution.create(scip, sol)
@@ -315,8 +328,9 @@ cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS**
315
328
316
329
cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss,
317
330
SCIP_PROPTIMING proptiming, SCIP_RESULT* result) noexcept with gil:
331
+ cdef int i
318
332
PyConshdlr = getPyConshdlr(conshdlr)
319
- cdef constraints = []
333
+ constraints = []
320
334
for i in range (nconss):
321
335
constraints.append(getPyCons(conss[i]))
322
336
result_dict = PyConshdlr.consprop(constraints, nusefulconss, nmarkedconss, proptiming)
@@ -328,8 +342,9 @@ cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS**
328
342
int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides,
329
343
int * nfixedvars, int * naggrvars, int * nchgvartypes, int * nchgbds, int * naddholes,
330
344
int * ndelconss, int * naddconss, int * nupgdconss, int * nchgcoefs, int * nchgsides, SCIP_RESULT* result) noexcept with gil:
345
+ cdef int i
331
346
PyConshdlr = getPyConshdlr(conshdlr)
332
- cdef constraints = []
347
+ constraints = []
333
348
for i in range (nconss):
334
349
constraints.append(getPyCons(conss[i]))
335
350
# dictionary for input/output parameters
@@ -401,8 +416,9 @@ cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS*
401
416
return SCIP_OKAY
402
417
403
418
cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil:
419
+ cdef int i
404
420
PyConshdlr = getPyConshdlr(conshdlr)
405
- cdef constraints = []
421
+ constraints = []
406
422
for i in range (nconss):
407
423
constraints.append(getPyCons(conss[i]))
408
424
PyConshdlr.consdelvars(constraints)
0 commit comments