[Clp] Help: Use Clp in Dev C++ and solve the infinity norm minimization

William H. Patton pattonwh at comcast.net
Wed Nov 30 12:11:05 EST 2011


I would start in any matlab clone first.
Then I would not try the api. rather look at the text file input forms 
like .lp  for rowise entry
or The harder  .MPS  for column oriented input.

I cannot understand your example. I assume that the M,N,X,K are 
expressed as row vectors.
   and parenthesis  go  (M-  (  (N*X) *K) ),   M is 4x4, N is 4x3  so X 
must be 3x?  and K is 2x4.
What is the ?;   It must be 2.  So you have 6 variables Xij { 
i=1..3,j=1..2}.
Then (M-  (  (N*X) *K) )  has 16 terms on these 6 variables.
The infinity norm is the Max of what? Presumably this form.
What are the constraints? the 6 vars positive? or free?

Lets look at a smaller case  M = {1} N = {3} K = { 2}  then the problem 
is MAX{x}( 1 - 3*x*2 );
This is not much like an LP.  I do not see it being much different in 2 
or 10  variables. It appears as just a form with no constraint equations.

Is it accidental that K is the first 2 rows of M?  If not then rewrite M 
as    {K,L} and look for a simplification.
 >>*very big size* - this could be trouble because LP usually likes 
sparse structures. Your formulation is initially dense
Start small and verify as in your example.
There really is no good reason to use C or the API as the generator for 
matrix posed problems.
I would try gnu *mathprog *or a matlab clone or something from the R 
statistics repository.
   http://www.cs.unb.ca/~bremner/docs/glpk/gmpl.pdf
Decision tree:  http://plato.asu.edu/guide.html

William

On 11/29/2011 9:53 PM, RiCo wrote:
> Hi,
>
> I have read the installation guide.  Since I am new in C/C++ and Clp, 
> I am sorry but I don' understand how and where to implement the "make" 
> instruction to tell the Dev C++ to link to Clp.  There are many 
> details which are complex to me.
>
> I wrote a C program using Dev C++  and want to call the API of Clp.
>
> What I want to do is to solve a problem like this (the minimization of 
> a Matrix equation):
>
> M=[1 0 2 3; 2 -1 3 5; 4 1 -1 2; 0 -3 4 3];
> N=[3 0 4; 1 5 2; 7 1 3; 2 2 1];
> K=[1 0 2 3; 2 -1 3 5];
> minimize( norm(M-N*X*K,Inf) )
> return X
>
> In real case, M, N, and K are all in very big size. My C program will 
> generate these three matrix. I hope to call Clp API to solve this 
> minimization problem.
>
> I wish someone could help me with this issue. Any advice is very 
> appreciated.
>
> Thank you so much.
>
>
>
>
>
>
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20111130/65a7da7f/attachment.html>


More information about the Clp mailing list