help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] if...then...else


From: Ozgur Ican
Subject: [Help-glpk] if...then...else
Date: Fri, 25 Aug 2006 12:47:49 +0300
User-agent: KMail/1.7.2

Hi,

i have time sets below,
 
set W; #week
set D; #day
set H; #hour

and a binary decision variable.

var delta{w in W, d in D, h in H},binary;


My question is that;
if delta[w.d,h] = 0 for a specific hour, it has to be equal to zero for the 
following 23 hours too.
That is if delta is 0 it has to be 0 for a day-time. How can i model this 
situation with "if...then...else".
Also should i put this expression into variable definition part or s.t. part 
or anywhere in the .mod file.

I think if i had only one time indice say "t" there is not any problem at all 
but in my situation time index has three sub indices

Thanks.  
 

-- 
o.ican




reply via email to

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