Hello Ioannis.

If I understand your problem correctly, you can achieve the result you need using the "Big M" method, though I think you may need to introduce some new integer variables

Let E in {0, 1} binary
M*E >= U
M*E> = K

Where M is some "large" positive constant, though in this particular case it just needs to be greater than 6. This will force E to be positive if either U or K is positive.

D >= A + E - 1

This will require D to be positive if both A and E are positive. Note that for this to work the objective must prefer to drive D to zero if possible, which typically turns out to be the case. If not then you will need to add complementary constraints to drive D to zero if the conditions are not met.

On 28/03/2015 3:00 am, [email protected] wrote:
Good evening to every one,
I have a problem in modelling the following situation:
Let U, K in {-6, .. , 6} integers
Let A in {0, 1} binary
Let D in {0, 1} binary
What I want to do  is to model the condition:
D = 1, iff (U > 0 OR K > 0) AND A = 1
Otherwise, D should equal 0.
I can not figure out how to model this situation.
Can any one give me an answear or even a hint? It would be very welcome.
Thanks a lot

--
Norman Jessup

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to