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
527 stars 92 forks source link

Printing the Model #88

Open subratpp opened 4 years ago

subratpp commented 4 years ago

To print the objective function and constrains when print(model) is called. It will help to visualize the input model.

sebheger commented 2 years ago

@subratpp In my opinion the print function of python shouldn't be used to display the complete model. It should print the name and maybe some high-level indicators of the model, like number of vars, constrs ....

rschwarz commented 2 years ago

To see the complete model, you can also use model.write('filename.lp') and look at the file written in lp format.