Skip to content
Advertisement

Print linear constraints of CPLEX LP on Python

I need to print all my linear constraints to verify the correctness of what I wrote but not knowing the CPLEX library for Python well I would not know how to do it.

That’s my part of LP:

JavaScript

I want to print out these 22 linear constraints. I’m working with CPLEX 12.9 on Python 3.7.9

Advertisement

Answer

This will write the Model in prob.lp:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement