[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

next question - find some element of a set

From: Meketon, Marc
Subject: next question - find some element of a set
Date: Thu, 12 Dec 2019 00:24:48 +0000

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:


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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]