coin-or / python-mip

Python-MIP: collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Eclipse Public License 2.0
518 stars 92 forks source link

How to solve a max recursion error using python MIP? #183

Open MWMartley001 opened 3 years ago

MWMartley001 commented 3 years ago

While using Python MIP for an MIP problem, I get the following error:

RuntimeError: maximum recursion depth exceeded while calling a Python object

I'm using the same approach as with cvxpy, of course with mip for problem formulation and solving with CBC.

I've also tried increasing the recursion limit with no success. For background, I'm feeding data including supply, demand, and pricing multi-dimensional arrays that are of size ~290 x ~310, with supply as ~290x1. The allocation is solved for a 13 month timeframe, with each month being an iteration of a loop and new problem/model for each iteration. Another point to add is that the first period is solved successfully.

Any suggestions?

sebheger commented 2 years ago

Hi @MWMartley001 Can you try to provide us with a minimalistic example to reproduce the error?