I want to get some arbitrary element in a set and put it into a parameter.  How 
would I complete the below?

set := A, B, C;

param some_element_in_set, symbolic := ?????;


The closest I saw was in this old help-glpk email:  
https://lists.gnu.org/archive/html/help-glpk/2006-11/msg00059.html

Which says:

set S;

param ref{i in 1..card(S)}, symbolic, in S;

# ref[i] refers to i-th element of S;

param a{S};

... a[ref[i]]   ...  # means a[i-th element of S]

But I cannot get this to work.  If I could get it to work, then I would do 
something like: param some_element_in_set := ref[1];

BTW, I’m still hoping that someone will help solve how to work the 
sudoku_excel.mod example in the ‘examples\sql’ directory of the GLPK directory 
under Windows 10 64bit.  I still cannot get that to work.

-Marc

Reply via email to