A water tank needs to be refilled with an electric pump when the water level gets below a certain level. The pump can operate at variable flow rates. Further, there is a time-variant electric billing during different times of the day. We need to quickly fill the tank with the minimum electricity bill.
I've devised the following solution \begin{align}\min&\quad\sum_{t=1}^{24}\gamma \cdot Q_p(\alpha)\cdot t\cdot C_t\cdot U_i(s)\\\text{s.t}&\quad p_{\min} \le P_{t} \le p_{\max}\\&\quad l_{\min} \le l_{t} \le l_{\max}\end{align} where
$\gamma$ is a coefficient to demonstrate that the power consumption is proportional to flow rate $Q_p(\alpha)$;
energy cost is represented as $t\cdot C_t$ where $C_t$ is cost of electricity at time $t$;
$U_i(s)$ is the status of the pump where $U_i(s)\in[0,1] $ such that $0$ means inactive and $1$ means active;
$p_{\min}$ and $p_{\max}$ are the minimum and maximum pressure levels respectively;
$l_{\min}$ and $l_{\max}$ are the minimum and maximum threshold levels respectively.
So far I've achieved the above mathematical formulation as per my understanding.
I am unable to add a constraint where the problem states that if the tank level drops below a threshold, then it is compulsory to refill the tank and I'd want to then change the pump status represented by $U_i(s)$ to be equal to $1$. How can a add that constraint?
Is my above problem formulation correct or is there any other error?
Task
Formulate the given problem and suggest an optimisation problem (No implementation required)
Problem Description: Consider a water tank on a roof top that needs to be refilled with an electric pump when water level in the tank gets below certain threshold. The electric pump can operate with variable flow rate and its power consumption is directly promotional to flow rates. Furthermore, we also consider time variant pricing for electricity billing i.e. same power consumption during different day time will be charged differently. Assume peak pricing policy around mid-day time and gradual decrease in pricing near morning and evening.
The home user need is to quickly refill the tank with minimum electricity bill. Your task is to formulate the given problem and suggest an optimisation formula to full-fill given user requirements. You need to consider three parameters (a) tank water level (b) pump flow rate (c) pricing rate at current time.
Consider any further relevant assumptions or constraints if needed. Your assumptions or constraints must be valid in given problem scenario.
2nd Attempt
After looking at answer and comments I've tried to improve my objective function.
$in_t = Q_p(t,\alpha)$ will make inflow dependent on both time $t$ and pressure $\alpha$.
$power = \gamma . Q_p(t,\alpha)$ Since power consumption is proportional to inflow rate $Q_p(t,\alpha)$ I've multiplied it with factor $\gamma$.
$U(t)$ is status of pump at time $t$. It would be $0$ or $1$ if inactive or active respectively.
Since electricity cost is time variant therefore $C(t)$ would represent cost of electricity at time $t$.
Factoring all the above cost I've developed the following cost function:
\begin{align}\min&\quad\sum_{t=1}^{24} Min: \gamma \cdot Q_p(t,\alpha) \cdot C(t) \cdot U(t)\end{align} $ s.t.$ \begin{align}l_{min} \le l_t - out_t - Q_p(t, \alpha) \le l_{max} \end{align} \begin{align} P_{min} \le \alpha \le P_{max} \end{align} I am not sure but I think if $\alpha$ represent the pressure then limiting it from $0$ to $p_{max}$ would help us get rid of incorporating pump status $U(t)$ since if pump is not operational pressure would be $0$ and $Q_p(t,\alpha)$ would eventually equate to $0$.
I believe the above constraint do take into account the tracking of tank level. However, the question states "refilling takes place if the level drops below a certain threshold" & I believe that I haven't taken that into account and there should be constraint for that as well. I believe it should be that $\alpha \ge 0$ if $l_t \le l_{thres}$. Where $\alpha$ represents pressure and $l_{thres}$ is the level threshold after which the filling starts. If this is correct how would I write a constraint for it?