help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Sum inside for


From: Nilo Cesar Teixeira
Subject: [Help-glpk] Sum inside for
Date: Tue, 1 Nov 2011 00:00:10 -0200

Hi again guys,

I am trying to model a loop in 4 dimensions, in which for each possible fixed tuple of the first 3 dimensions, the sum of the values of the 4 dimension must be at most 1.

Every cell is, again, a binary variable.

Something like this:

for {D1 in DIMENSION1, D2 in DIMENSION2, D3 in DIMENSION3} {
s.t. r: sum {D4 in DIMENSION4} H[D1, D2, D3, D4] <= 1;
}

But then I found that constraints are not permitted inside fors.

Why ? How to procede then ?

Thanks again.

--
Nilo Cesar Teixeira
address@hidden


reply via email to

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