Commit 6e22153
Add callback and parameter configuration support to CPLEX_PY solver (#850)
* Update CPLEX_PYTest to use CPLEX_PY instead of CPLEX_CMD
* Add support for custom CPLEX solver parameters via arguments
Extended the CPLEX solver API to accept additional parameters through `solverParams`, enabling more granular configuration of the solver. Added utility methods for setting, getting, and managing solver parameters. Included corresponding unit tests to ensure functionality and correctness.
* Add support for registering CPLEX callbacks during solve
Introduced an optional `callback` parameter to allow registering CPLEX callback classes in the solving process. Updated the relevant methods in `cplex_api.py` and added a test case to validate the functionality.
* Add docstrings for parameter handling methods and tests
* Update type ignore comments for cplex imports
Extended type ignore comments to address additional linter issues, including untyped imports and unused ignores.
* Applying the black linter
---------
Co-authored-by: Franco Peschiera <[email protected]>1 parent 28ebbc3 commit 6e22153
2 files changed
+138
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| |||
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| 280 | + | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
| |||
285 | 287 | | |
286 | 288 | | |
287 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
288 | 299 | | |
289 | 300 | | |
290 | 301 | | |
| |||
297 | 308 | | |
298 | 309 | | |
299 | 310 | | |
| 311 | + | |
300 | 312 | | |
301 | 313 | | |
302 | 314 | | |
303 | 315 | | |
304 | 316 | | |
305 | | - | |
| 317 | + | |
306 | 318 | | |
307 | 319 | | |
308 | 320 | | |
309 | 321 | | |
310 | 322 | | |
| 323 | + | |
| 324 | + | |
311 | 325 | | |
312 | 326 | | |
313 | 327 | | |
314 | 328 | | |
315 | | - | |
| 329 | + | |
316 | 330 | | |
317 | 331 | | |
318 | 332 | | |
| |||
430 | 444 | | |
431 | 445 | | |
432 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
433 | 488 | | |
434 | 489 | | |
435 | 490 | | |
| |||
458 | 513 | | |
459 | 514 | | |
460 | 515 | | |
461 | | - | |
462 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
463 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
464 | 531 | | |
465 | 532 | | |
466 | 533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2073 | 2073 | | |
2074 | 2074 | | |
2075 | 2075 | | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
2076 | 2142 | | |
2077 | 2143 | | |
2078 | 2144 | | |
| |||
0 commit comments