help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Sum inside for


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

Ok I figured it out by the prod.mod in the examples =)

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

2011/11/1 Nilo Cesar Teixeira <address@hidden>
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




--
Nilo Cesar Teixeira
address@hidden
(55) (11) 8571-5314


reply via email to

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