Mutual exclusive variables in a LP model Topic is solved

Problems with modeling
Post Reply
pmgcs74@gmail.com
User
User
Posts: 11
Joined: 6 months ago

Mutual exclusive variables in a LP model

Post by pmgcs74@gmail.com » 1 week ago

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

abhosekar
Moderator
Moderator
Posts: 143
Joined: 7 months ago

Re: Mutual exclusive variables in a LP model

Post by abhosekar » 1 week ago

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

pmgcs74@gmail.com
User
User
Posts: 11
Joined: 6 months ago

Re: Mutual exclusive variables in a LP model

Post by pmgcs74@gmail.com » 1 week ago

Thanks Atharv

Post Reply