how to model two positive variables without being positive at the same time

Problems with modeling
Post Reply
yanzhiping
User
User
Posts: 85
Joined: 2 years ago

how to model two positive variables without being positive at the same time

Post by yanzhiping » 2 years ago

I am trying to model the charging and discharging status of battery. it cannot charge or discharge at the same time. usually we introduce two binary variables
charging:
Qchg<=max_Qchg * x_Qchg
discharging:
Qdis<=max_Qdis * x_Qdis
status:
x_Qdis + x_Qdis<=1

Is there any alternative way to do this without introducing the binary variables but keep the problem linear at the same time?

cladelpino
User
User
Posts: 108
Joined: 2 years ago

Re: how to model two positive variables without being positive at the same time

Post by cladelpino » 2 years ago

A quick search turns up this reference, for some cases. https://minds.wisconsin.edu/handle/1793/57916 .

My gut tells me it will be very hard to stay in LP but I haven't really made a deep search.

Good luck !

Alireza.soroudi
User
User
Posts: 6
Joined: 2 years ago

Re: how to model two positive variables without being positive at the same time

Post by Alireza.soroudi » 1 year ago

you can add a cost for charging and discharging. In this way, the LP solver won't use them at the same time.
Especially when the charging/discharging of efficiency are not 1.

There is only one case that it might not be resolved: when you have some wind /solar resources and you have some kind of penalty for wind curtailment. The algorithm will use charging ad discharging at the same time to dissipate the excessive wind.

Post Reply