I am using Pulp with Python 3.8 and Spyder 4.
I am able to run optimization problems without issues, but I am not able to change the parameters of the solvers. Indeed, no solver seems to be recognized by Pulp.
When I enter
my_lp_problem.solve(PULP_CBC_CMD())
I have the error :
name 'PULP_CBC_CMD' is not defined
How can I manage this problem?
Thank you!
If you get a
NameError
(i.e., name 'PULP_CBC_CMD' is not defined) it's because you have not imported thepulp.PULP_CBC_CMD
class.The solution is either to import it
or to specify the pulp module