[Clp] Hello and Help to start using clp.

Lacroix, Robert ralacroix at hydro.mb.ca
Thu Jul 21 20:54:36 EDT 2016


Robinson,

I can see why you are having a problem. The CLP user guide is falling apart. All the CLP example source code hosted on IBM’s web site is gone!
http://www.coin-or.org/Clp/userguide/ch04.html

Apart from this, I recommend using the COIN-OR Open Solver Interface (OSI) API. You can load the rows and columns of the LP into a CoinPackedMatrix then present it to the solver through the OSI API. First use Gurobi as the back-end solver to validate that you are correctly loading the LP into the matrix and getting back the answers you expect. Then after you are satisfied that your API usage is correct, switch the solver engine to CLP.

I do not recommend using MPS files when you can use an API. If you must use MPS files, try to use the printed IEEE format for values.

1)      MPS is a text file format. Most numbers printed as decimal differ in value and precision form the internal IEEE double precision representation - not a good way to transfer data between iterations, especially on sensitive problems where tiny changes can lead to different solutions.

2)      Writing MPS files takes several orders of magnitude more time, compared to copying arrays of data in memory. Would you wait 25 minutes to create the MPS file for an iteration that takes only 33 seconds to solve? (from our experience trying this with LPs considerably smaller than the sparse 38000 row and 96000 column problems we formulate these days).

3)      If you use the Gurobi API only to formulate the problem and send it to the MPS file, then you are still using Gurobi, just not as a solver.

Robert Lacroix
Manitoba Hydro

From: Clp [mailto:clp-bounces at coin-or.org] On Behalf Of Robinson Lemos
Sent: Monday, July 18, 2016 10:02 AM
To: clp at list.coin-or.org
Subject: [Clp] Hello and Help to start using clp.

Hello from Brazil.

I am Robinson Lemos.

First i want to apologize my English and I hope it all makes sense.

I have read the tutorials at https://projects.coin-or.org/Clp, but I did not understand a way to read a model from memory or construct it.

I want to leave gurobi and start using clp only.

My deal is the following:

I use an algorithm, and each iteration i need to change and solve a LP model some times. In the MPS way i will need to create, save and read about 30-600 MPS files per iteration.

Is there any tutorial showing how to use the loadProblem() variations?

Thank you.

Robinson Lemos.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20160722/48226f78/attachment.html>


More information about the Clp mailing list