Page 1 of 1

Mutual exclusive variables in a LP model

Posted: Thu Apr 22, 2021 7:46 pm
by pmgcs74@gmail.com
Hi,

Hi have a battery operating in several markets and I want to ensure that the model don't charge ( charge(i) ) and discharge ( discharge(i) ) at the same time.
I use the solution charge(i) * discharge(i) = 0. The problem is this is a NLP model.

How can I change this, in order to transform this mutual exclusive condition into a LP model.
I've tried same binary variables but without success

Thanks
Paulo

Re: Mutual exclusive variables in a LP model

Posted: Thu Apr 22, 2021 10:37 pm
by abhosekar
Paulo,

are charge(i) and discharge(i) binary variables? If yes then charge(i) + discharge(i) =l= 1 should be enough.

If they are positive variables, then you need to define binary variables that are 1 if they are nonzero and 0 when they are 0. You have to use big-M condition to establish relation between binary and real variables. Let's say the binary variables are c(i) and d(i). You can then use c(i) + d(i) =l= 1; just like the above condition.

- Atharv

Re: Mutual exclusive variables in a LP model

Posted: Fri Apr 23, 2021 3:26 pm
by pmgcs74@gmail.com
Thanks Atharv