[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] help to formulate problem in terms of LP
From: |
Michael Hennebry |
Subject: |
Re: [Help-glpk] help to formulate problem in terms of LP |
Date: |
Tue, 22 Apr 2008 10:19:09 -0500 (CDT) |
On Tue, 22 Apr 2008, Dima Ry wrote:
>
> I tried to simulate following scenario :
> http://www.nabble.com/file/p16823521/mip_question.gif
>
> (X<=1 or X>=4) and (X>=2 and X<=3)
> (Y<=1 or Y>=4) and (Y>=2 and Y<=3)
> (Z<=1 or Z>=4) and (Z>=2 and Z<=3)
>
> expressed in terms of MIP
>
> \* Problem: bubble *\
>
> Maximize
> obj: + X + Y + Z
>
> Subject To
> r_1: - 10000000000 b1 + 3 X <= 3
> r_2: + 10000000000 b1 - 3 X <= 9999999988
> r_3: - 10000000000 b2 + 3 Y <= 3
> r_4: + 10000000000 b2 - 3 Y <= 9999999988
> r_5: - 10000000000 b3 + 3 Z <= 3
> r_6: + 10000000000 b3 - 3 Z <= 9999999988
As another noted, your big M is too big to work.
Big M works, but one needs to do the math
to figure out how small each big M can be.
In this case, I suspect 3 is big enough.
--
Michael address@hidden
"Those parts of the system that you can hit with a hammer (not advised)
are called Hardware; those program instructions that you can only
curse at are called Software."