help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] How to make consecutive variables take a certain value?


From: Oscar Gustafsson
Subject: Re: [Help-glpk] How to make consecutive variables take a certain value?
Date: Fri, 30 Nov 2007 06:32:15 +0100 (MET)

On Thu, 29 Nov 2007, Michael Hennebry wrote:
Mathematically correct, but one should go for a tighter linear relaxation.
x[d,h]<=x[d,h+1]
x[d,h]<=x[d,h+2]
With this formulation, the latter constraint is redundant.
x[d,h]<=x[d,h+1] where d indexes a day and h and h+1 index hours.
Won't this force all the remaining hours of the day to be one?

On the other hand as the question is formulated it is supposedly what is going to happen.

My guess without knowing the context is that it might be better to imply the three our booking rule in the resource constraints instead of forcing the next two variables to be one, as this will lead to all preceeding variables to be one. An alternative might be to have two types of variables, one that considers the "original" one and one with variables that are one based on the original ones.

But considering it is 6:30 in the morning I may be really out of line here.

Regards

Oscar




reply via email to

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