Dear All,

is it somehow possible to use a single index symbol for addressing an
n-tuple? In one of my problems I have a 3 dimensional set, that is used
as a basis for other sets, etc. I'm trying to do something like this:

set S1;
set S2;
set S3 := setof {s1 in S1, s2 in S2: s1!=s2} (s1,s2);

param p{s1 in S1, s2 in S2}, default 3;

var x{s3 in S3}; # this is, that should be (s1,s2) in S3

s.t. constraint1 {s3 in S3}: # similar here
  x[s3]>=p[s3];

s.t. constraint2{s1 in S1, s2 in S2: s1<s2}:
  x[s1,s2] >= 2 * p[s1,s2];

It is not working, and according to the manual, an index should match
the dimension of the set. Is it somehow possible to avoid writing
(s1,s2) everywhere?

Thank You very much in advance, best regards,

Mate Hegyhati

<<attachment: hegyhati.vcf>>

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to