3

I currently have a MIP model formulated in Gurobi's python API, but recently I've been looking into tools such as PuLP and OR-Tools that allow me to build a model and feed it to multiple different optimizers. One feature of Gurobi used extensively in my model is the ability to have constraints that use functions such as and, or, min, max, and abs. However it seems as if PuLP and OR-Tools do not support these. Are there any alternatives that do support these? Or would I have to reformulate my model if I want to use something like this?

jacob
  • 255
  • 3
  • 11

2 Answers2

2

For or-tools, we only provide the minimal API for the linear solver. If your problem is more structured (scheduling, routing, CP-like constraints), you can have a look at the CP-SAT interface:

Python examples are here:

Laurent Perron
  • 8,594
  • 1
  • 8
  • 22
1

You might also want to have a look at Pyomo. It supports a variety of modeling tools and can call different solvers.

mattmilten
  • 6,242
  • 3
  • 35
  • 65