[Clp] How to set and solve a LP in memory?

Daniel Grace danwgrace at gmail.com
Thu Oct 5 08:28:33 EDT 2017


Hi,

I am new to Coin OR CLP and I would like to use the C++ / API to solve a
linear relaxation of a multidimensional knapsack problem:

max T(c)x
subject to Ax <= b
0 <= xj <= 1 for j = 1, 2, ..., n

Where c is a n x 1 vector, T(c) is the transpose of c, x is a n x 1 vector,
A is a m x n matrix and b is a m x 1 vector.

Assuming c, A and b are all in memory, for example in C++:
int c[n], A[m][n], b[m];

I have looked online and I can't find an example of how to solve this or a
similar problem in this manner.  How do I set this up in memory and call
the CLP API appropriately?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20171005/a35b2128/attachment.html>


More information about the Clp mailing list