[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] set intersection syntax problem
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] set intersection syntax problem |
Date: |
Mon, 3 Mar 2008 17:37:47 +0300 |
> I have a little syntax problem:
> set Sl{l in L} within S;
> set Sg{g in G} within S;
> set Sr{r in R} within S;
> set Sglr{g in G, l in L, r in R} within S;
> Sglr{g in G, l in L, r in R} := Sg[g] inter Sl[l] inter Sr[r];
> # glpsol complains that there are problems for the last two lines, how
> do I correct this please?
In MathProg there is no assignment statement. You should specify
a set expression to be evaluated and assigned to set members directly
in the set statement as follows:
set Sglr{g in G, l in L, r in R}, within S, := Sg[g] inter Sl[l]
inter Sr[r];
(Commae are optional and can be omitted.)