I am working on an Energy Management problem. The objective is to minimize the electricity bill for the customer.
I have a time-series data with 15 min. intervals spanning the course of 1 year. The main controllable system is a hot water boiler which can be switched $ON$ or $OFF$, $1$ or $0$ respectively.
These are the requirements:
- The boiler can only be switched (either $ON \rightarrow OFF$ or $OFF \rightarrow ON$) max. $n$ times a "day"
- The "day" is not necessarily considered from 12:00AM to 12:00AM but it can be from 06:00AM to 06:00AM or any other 24 hour duration, it depends on the customer
I understand that there is a way to generate this constraint for 1 day using:
$\sum_{t=0}^{95} abs(b_{t+1} - b_t) \leq n$
where, $b_t$: boiler status at time $t$
But this uses $abs()$ which makes the problem non-linear. The entire problem, constraints and objective function are linear and hence, this constraint must also be linear. Any suggestions would be appreciated.
I am using Pyomo for optimization and the data is present as a Pandas Dataframe.