|
| From: | Michael Hennebry |
| Subject: | Re: [Help-glpk] Transport Problem advanced |
| Date: | Tue, 21 Apr 2009 09:09:10 -0500 (CDT) |
| User-agent: | Alpine 1.00 (DEB 882 2007-12-20) |
On Tue, 21 Apr 2009, SpaceRider wrote:
Now, I insert each combination into a table. If a combination isn't
possible, the value ist "-1". All possible combinations get positive values
("0.02","0.04", etc.).
Because of that I have to insert a special rule in model:
"s.t. positive_result {i in I, j in J}: varcost[i,j] * x[i,j] >= 0;"
Is there a easier way to insert only possible combinations into a table and
to drop the special rule.
A linear table with generic entry i, j, x[i,k] That is roughly how GLPK's API fills the constraint matrix. -- Michael address@hidden "Pessimist: The glass is half empty. Optimist: The glass is half full. Engineer: The glass is twice as big as it needs to be."
| [Prev in Thread] | Current Thread | [Next in Thread] |