help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] multiplication of linear forms not allowed


From: Jorge Tavares
Subject: [Help-glpk] multiplication of linear forms not allowed
Date: Tue, 29 Nov 2005 18:41:19 +0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear GLPK users,

At the moment, I am working with the Multidimensional Knapsack problem and as such, I needed to calculate optimal solutions for some instances. So, I decided to use take a look at glpsol from the GLPK library, read the manual and the examples and all went well. I was able to write a model and obtain the solutions I needed. My problems arised on the next step. Right now, I need to calculate surrogate multipliers and for that I need to solve a relaxed version of the MKP. In the first model, my constraint was:

s.t. constraint{i in I}: sum{j in J} (r[i,j] * x[j]) <= c[i];

and now it must be:

s.t. constraint: sum{j in J} (sum{i in I} (a[i] * r[i,j]) * x[j]) <= sum{i in I} (a[i] * c[i]);

But when I run glpsol, it doesn't accept the following formulation because of the multiplication of x[j]. It gives the error: "multiplication of linear forms not allowed".

Is there a way to make it accept the multiplication? How can I solve this problem? Any pointers would be very gratefull.

My knowledge of glpk is still very limited. I've just needed to do these two tasks and thought glpk was the easy and fastest way to do it. From the examples, I think writing the models is straightforward (for solving the MKP was simply translating from math) so I guess my mistake should be something simple to solve.

Thanks in advance,
Jorge

- --
Jorge Tavares
University of Coimbra | http://eden.dei.uc.pt/~jast

"Sometimes the appropriate response to reality is to go insane."



-----BEGIN PGP SIGNATURE-----

iD8DBQFDjKDVKHEUoQoCFcIRAtSWAJ43TKvVekIsgWY0xJx5h+Wnx5bU3ACgjT29
DNlwlpdUBd4MQlIb2LZSMgo=
=EAeT
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]