Re: [Help-glpk] Cardinality function in MathProg

2006-02-21 Thread Andrew Makhorin
Is there a build-in function that gets the cardinality of the set? I was unable to find it in the documentation. Unfortunately the function card() is not implemented yet. The equivalent expression sum{my_set}1 can be used instead. ___ Help-glpk

Re: [Help-glpk] Cardinality function in MathProg

2006-02-21 Thread Hua Ni
Thanks for your reply. In the set, a dummy index plus 1 points to the next element. Is it cyclic? 1..5, j=5, i=j+1, i=1? Hua --- Andrew Makhorin [EMAIL PROTECTED] wrote: Is there a build-in function that gets the cardinality of the set? I was unable to find it in the documentation.

Re: [Help-glpk] Cardinality function in MathProg

2006-02-21 Thread Andrew Makhorin
In the set, a dummy index plus 1 points to the next element. Is it cyclic? 1..5, j=5, i=j+1, i=1? No, it is not. You should write something like i = if j 5 then j + 1 else 1 or more intricate i = mod(j,5) + 1 ___ Help-glpk mailing list