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
Mutual exclusive variables in a LP model Topic is solved
Re: Mutual exclusive variables in a LP model
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 bigM 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
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 bigM 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

 User
 Posts: 11
 Joined: 6 months ago
Re: Mutual exclusive variables in a LP model
Thanks Atharv