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   [email protected]
"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."


_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to