Hello GLPK List,
Is there a method to pick an arbitrary single item from a set? I don't
care which one, but I need to have a single element from a set such that
I can uniquely and consistently identify it.
There is no order to the set, but /if/ there were an ordering to this
set, I might re
At 3:11am -0400 Sun, 01 Jul 2012, Kevin Hunter wrote:
Is there a method to pick an arbitrary single item from a set? I
don't care which one, but I need to have a single element from a set
such that I can uniquely and consistently identify it.
Gah, should have mentioned "In GMPL, is there a met
Hello Kevin,
there is no function that will return an element of a set (except for
one-dimensional numeric sets).
You can create subsets.
e.g.
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);
see
ht
Hello Kevin,
either you can use the GLPK library from another programming language (C, Java,
...) or you can use scripting around glpsol, cf.
http://en.wikibooks.org/wiki/GLPK/Scripting_plus_MathProg
Best regards
Xypron
Original-Nachricht
> Datum: Sat, 30 Jun 2012 19:52:41 -0