In pages 5-6 this example solves a cube with Gurobi. I don't have Gurobi but I'd like to get .lp or .mps version for my own testing?


3 Answers 3


You can always use Google colab as Omidi has indicated that will have some limitation on capacity. Exporting to different format is through model.write() function as explained here and refer here


One possible way to use Gurobi is by invoking its library on Google Colab.

Google Colab provides an easy way to use Gurobi with Python + Jupyter notebooks, with no local software installation required. The Gurobi solver can be used in Colab notebooks either with the free size-limited trial license that is installed by default or with a Web License Service (WLS) license which enables the full features of Gurobi.

Also, as far as I know, Gurobi offers a community license to run the optimization problems, but with a limited size of the variables or constraints.


I answer this

I Installed gurobipy and pycuber with pip. I copied the python code to file.py I replaced the last line





Cbc cannot read those files but Scip can read .mps file.

Scip can read the exported .lp file after I deleted all [ and ] characters from the .lp file.



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.