[Cbc] Newbie question about use of CBC and how to specify integraly constraints?

Haroldo Gambini Santos haroldo.santos at gmail.com
Thu Mar 17 10:49:40 EDT 2016


Hi Jonatan,

CBC also loads problems in the CPLEX LP file format, which is much 
simpler in my opinion. (http://lpsolve.sourceforge.net/5.0/CPLEX-format.htm)

To load a problem in LP format and save a solution in a TXT file just call:

cbc  problem.lp  solve  solu  solution.txt

Cheers,

Haroldo

On 17-03-2016 10:31, Jonatan Knud Lauritsen wrote:
> Regarding use of cbc. I understand that problem can be loaded and 
> saved from and to MPS file using commands import and export. But what 
> are commands for displaying and exporting to file the results of 
> optimization, specifically - the values of variables?
>
>
> Den 15:25 torsdag den 17. marts 2016 skrev Jonatan Knud Lauritsen 
> <jonatan.lauritsen at yahoo.dk>:
>
>
>
>
>
> Hi!
>
> I am starting to use CBC. I need integer linear programming solver and 
> apparently CBC is the right software from the COIN-OR projects (I am 
> not sure about Symphony project, maybe it can solve integer linear 
> programs as well). I am confused how to use CBC. I expected cbc.dll, 
> but there is only cbc.exe available. I am trying to use cbc.exe, I 
> managed to import and solve problem but I don't understand how to get 
> results back - e.g. how to see (and save to file) values of the 
> variables? That is the first question.
>
> The second question is - is there cbc.dll available? I found 
> CoinMP.dll and tried to use it, but it seems to me an completely 
> incomplete project. E.g. after importing and preparing problems, the 
> getColCount and getRowCount returns zero values. One can see in the 
> source code that lot of methodes simply return dummy value and does 
> nothing. So - how CBC is intended to use? My impression is that CBC is 
> simple collection of source files and one should combine, integrate 
> them and build them as one needes, there is no ready dll (apart from 
> cbc.exe, which is not quite suitable to be embedded in other software 
> as it works as interactive session and not as input-output program).
>
> The third question is about mps file format which I am using. How to 
> specify integrality constraints on variables in this file format? 
> Maybe cbc automatically assumes that all the unkown variables will be 
> integers? wikipedia mentions that MPS extensions are suitable for 
> specifying integrality constraints but do CBC supports such extensions 
> and where they ar documented?
>
> Thanks in advance!
>
>
>
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc

-- 
==================================================
Haroldo Gambini Santos
D.Sc, Computer Science
Universidade Federal de Ouro Preto
http://www.decom.ufop.br/haroldo/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20160317/a2125bea/attachment.html>


More information about the Cbc mailing list