At 1:42am -0400 Mon, 02 Jul 2012, Glpk Xypron wrote:
there is no function that will return an element of a set (except for
one-dimensional numeric sets).

You can create subsets.

set X, dimen 2 := {(5, 7), (1, 10), (23, -3), ("y", "x"), ("a", "abc")};
set S := setof{(i,j) in X : forall{(k,l) in X} i <=k && j <= l} (i,j);

It is so very helpful to be answered in context of my question. Thank you! I have been doing a variant of this, but again, your's is much cleaner. Thank you for the snippet.

Kevin

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

Reply via email to