[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] syntax error in literal set
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] syntax error in literal set |
Date: |
Mon, 21 Nov 2011 10:47:31 +0300 |
> I'm just getting into GLPK....I can't get past the syntax error in literal
> set
> idetnified in line 25 where the constraint is defined....any help would be
> much appreciated....I'm sure I have problems after getting over that issue
> too:)
[...]
>
> /* Constraints */
> s.t. WORKDAYCONSTRAINT{j in SITES}:sum{i in TECHNICIANS, j in SITES, k in
> GOODWEATHERDAYS} y[i,j,k] <= sum{j in SITES} DAYSOFSITEWORK[j];
Dummy index j is already defined in the scope following the colon (:),
so you should not duplicate it in the sum operator; otherwise it is
considered as a literal set { j } that leads to the error. You need to
remove 'j in SITES' either from the contraint header or from the sum
operator.