5

I am trying to solve a massive linear integer optimisation problem (MILP) having more than 45.000 binary variables and ~350.000 constraints.

I am using Pulp for solving the problem, but I cannot find the solution in a reasonable amount of time.

Are there any ways for drastically speeding up the optimisation process? For example:

  • Can Pulp be parallelised somehow?
  • Any other packages/solver out there to use?
  • Any other suggestion?
aprospero
  • 529
  • 3
  • 14
  • 1
    Wow! Do you happen to have any code or concrete i/o examples illustrating the situation? Perhaps some details about your particular use case could shed some light on optimization opportunities that might not be mentioned generically. – ggorlen Dec 21 '18 at 00:27
  • Can you cache the results? Take a look at lru.cache decorator. – Kevin S Dec 21 '18 at 00:31
  • 1
    First make sure that the solver is the bottleneck and not Pulp itself. You do not say what solver you are using, but there are high-performance parallel MIP solvers available (e.g. Cplex and Gurobi). Pulp itself is serial. @KevinS: I have no idea where caching can be used here. – Erwin Kalvelagen Dec 21 '18 at 01:14
  • 2
    As Erwin said, profile your code to check whether it is passing the model to the solver or the solver itself consuming the time. I suspect it is the later, in which case the easiest way is to resort to a commercial solver. If this is not possible, you may be able to take advantage of problem structure via e.g., reformulations, clever branching, cutting planes, but it is hard to say anything more without having the formulation. – Ioannis Dec 21 '18 at 08:25
  • I'd second the comment about using a commercial solver. One of the nice things about PuLP is you can save your problem to a number of "standard" formats which can then be easily run my other solvers. Commercial solvers are very expensive but on large problems they can be several orders of magnitude faster. If you save your model in a standard format I think you can submit it to solve for free here: https://neos-server.org/neos/solvers/lp:CPLEX/LP.html – kabdulla Dec 21 '18 at 15:08
  • 1
    Voting to close since OP hasn't clarified question based on questions in comments. – Richard Dec 28 '18 at 03:10

1 Answers1

1

Some are the options you can try

  1. You can cache some of the parameters for your model.
  2. You can explore some other solvers like CPLEX, Gurobi, etc
  3. In modelling language, try Pyomo.
  4. You can do experiment on NEOS server there are many solvers available for academic purpose.

In last, you can improve your formulation.

  • Could you provide a link to a benchmark that compares performances of CPLEX, Gurobi vs Pulp? It's fundamental before even considering point 2 – HAL9000 Mar 12 '20 at 15:28