3
$\begingroup$

there is an inbuilt preprocessing in CBC solver , which affects the optimality of my solution , I get the optimal output by turning this off in command prompt . How do I turn this off using pulp ?

$\endgroup$
1
  • $\begingroup$ See my comment on anjikum's answer $\endgroup$
    – Milind R
    Sep 22, 2023 at 18:47

1 Answer 1

6
$\begingroup$

You can use presolve parameter and can pass it to solver(CBC) using following statement (model is your problem object)

model.solve(pulp.PULP_CBC_CMD(presolve=False))
$\endgroup$
3
  • 1
    $\begingroup$ coin-or.github.io/pulp/technical/solvers.html $\endgroup$
    – Kuifje
    Apr 22, 2022 at 11:43
  • $\begingroup$ This did not work for me. The presolve is still being conducted, and it led my LP to be 'infeasible.' $\endgroup$
    – ghjk
    Jul 11, 2023 at 20:36
  • 1
    $\begingroup$ @ghjk Use presolve=off $\endgroup$
    – Milind R
    Sep 22, 2023 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.