[Cbc] lp file solve with missing variables
Luís Borges de Oliveira
lbo at siscog.pt
Wed Jan 18 07:30:00 EST 2017
Hello Andres,
On 18-01-2017 11:06, andres.botero at siemens.com wrote:
>
> Dear cbc List members,
>
> I am trying to solve the following problem (see lp string) with the
> precompiled binary implementation of cbc from command line with
>
> "cbc LPfile.lp solve solu result.txt"
>
> and save the results to result.txt.
>
> I have read the syntax conventions for the lp format and have tested
> them but there seems to be something I am missing.
>
> Namely for the problem at hand the solver computes a solution but some
> of the variables are omitted. See the result.txt string.
>
By default, CBC will only print non-zero variables. You may change this
behaviour using the printingOptions parameter:
cbc -import Always6.lp -solve -printingOptions all -solution result.txt
should do what you were expecting. Note that solutions will often have
many more zero variables than non-zero variables, so it's usually more
efficient to not print zeros and have your solution reader default to
zero for variables that are committed.
Cheers,
Luís
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20170118/ccb2607d/attachment.html>
More information about the Cbc
mailing list