Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Indicator Constraints

0 views
Skip to first unread message

arush

unread,
Aug 2, 2008, 7:51:46 PM8/2/08
to
I need to impose the following constraints :

over(i) = 1 --------> y(i) >= 1
over(i) = 0 --------> y(i) <= 0
under(i) = 1 ------> y(i) <= -1
under(i) = 0 -------> y(i) >= 0

over(i) , under(i) are binary variables. y(i) is a integer variable.

Thanks
Arush.

Rob Pratt

unread,
Aug 2, 2008, 8:54:14 PM8/2/08
to
"arush" <arush...@gmail.com> wrote in message
news:7d9032c0-b4a6-42f7...@l42g2000hsc.googlegroups.com...

If y has bounds ymin and ymax, then the following will work:

1 - y <= M_1 * (1 - over)
y - 0 <= M_2 * over
y + 1 <= M_3 * (1 - under)
0 - y <= M_4 * under

where

M_1 = 1 - ymin
M_2 = ymax
M_3 = ymax + 1
M_4 = -ymin

Rob Pratt


0 new messages