coin-or / Cbc.old

This is a mirror of the subversion repository on COIN-OR
https://projects.coin-or.org/Cbc
Other
89 stars 30 forks source link

[Trac #108] add support for output from GMPL models #96

Open s-c-e opened 5 years ago

s-c-e commented 5 years ago

image

At the moment, Cbc can parse an GMPL (GNU MathProg?) model and report the optimal objective function and the values of the columns. However, GMPL includes commands for formatted output, which greatly increases the usability of the Cbc+GMPL combination - one can easily reports many different aspects of the solution. (It does not really help me to know what the optimal value of column 1234 is.)

The commands in question are: 'display', 'printf', and 'for'.

=====

This works now, with

cbc model.mod%model.dat -solve -gsolu glpk.sol

Note that the last part is needed, even if one does not use the file for anything. (To save the solution in a more readable format, one can use -solu gmpl-cbc.sol.)

It would be nice to have this information readily available somewhere, though.