## 3 Mixed Integer Linear Programming (MILP)/Mixed Integer Quadratic Programming (MIQP) Models
### High-Temperature Heat Pumps  
Similarly, the heat pump model considers maximum heat load \(\dot{Q}^{HP,max}\) as the cost driver for investment costs and the required power \(P_{el,t}^{HP}\) as a driver for operating costs. The relation between the momentary HTHP heat loads \(\dot{Q}_{t}^{HP}\) and its power demand is modelled using the Carnot equation and a heat pump efficiency \(\eta^{HP}\):  
\[\dot{Q}_{t}^{HP}=\frac{T_{h}}{T_{h}-T_{c}}\eta^{HP}P_{el,t}^{HP},\;\forall\;t \in\;NOP. \tag{5}\]The maximum heat load \(\dot{Q}^{HP,max}\) is obtained using inequality constraints that force \(\dot{Q}^{HP,max}\) to be greater than all momentary HTTP heat loads \(\dot{Q}^{HP}_{t}\).  
\[\dot{Q}^{HP,max}\geq\dot{Q}^{HP}_{t},\ \ \ \ \ \forall\ t\in\ NOP \tag{6}\]  
The heat pump uses excess heat from the industrial process \(\dot{Q}_{surplus,t}\) as a source. For simplicity reasons it is assumed that there is excess heat available only when there is a heat demand and that only a fraction of the process' heat demand is available as excess heat. It needs to be stated that this is generally not the case, especially for batch processing excess heat often occurs after heat is supplied to the batch. The proposed model can easily be modified if actual excess heat profiles are available to account for temporal differences between heat supply and excess heat availability. In addition, steam generation using HTTP is only feasibly if the required steam supply temperature \(T_{h}\) is lower than the HTTP's maximum supply temperature \(T_{h}^{max}\). Since HTTP do have limited sink temperatures, for this work, heat pumps are only considered up to a supply temperature \(T_{h}^{max}\) of 160 \({}^{\circ}\)C.  
\[\dot{Q}^{HP}_{t}-P^{HP}_{el,t}\leq\left\{\begin{array}{  
\[Q_{t+1}^{S}=Q_{t}^{S}+\left(\dot{Q}_{t}^{S,in}-\dot{Q}_{t}^{S,out}\right)\,\Delta t,\,\,\,\,\,\,\,\,\,\,\forall\,\,t\in\,\,NOP \tag{15}\]  
Bounds for capacity \(\Delta Q^{S}\) and heat loads \(\dot{Q}^{S,max}\) are necessary to constrain the domain in the optimization problem to the same domain used for calculation of the cost functions.  
\[\Delta Q^{S}\leq\Delta Q^{S,max} \tag{16}\]  
The heat load ratio \(r\) is used to constrain the maximum heat load with respect to the actual storage capacity \(\Delta Q^{S}\).  
\[\Delta Q^{S}\,r\geq\dot{Q}^{S,max} \tag{17}\]  
The binary variables \(z^{S}\) are used to decide whether the storage is integrated.  
\[\dot{Q}^{S,max}\leq\Delta Q^{S,max}\,r^{S}\,z^{S} \tag{18}\]  
For the LHTS, an appropriate PCM needs to be selected by the user. Since available PCMs have distinct melting temperatures, it might not be possible to use a PCM with equal temperature differences between the HTF and the melting temperature for charging and discharging. These potentially different charging and discharging behaviors are accounted for using charging and discharging efficiencies \(\eta_{c}^{S}\) and \(\eta_{d}^{S}\).  
\[\dot{Q}^{S,max}\geq\dot{Q}^{S,max,c}\,\eta_{c}^{S} \tag{19}\]  
\[\dot{Q}^{S,max}\geq\dot{Q}^{S,max,d}\,\eta_{d}^{S} \tag{20}\]  
Depending on the selected accuracy of the approximate cost function, either a linear or a quadratic function is used to model the investment costs of the individual storage technologies \(C_{\textit{invest}}^{S}\) as a function of capacity and load. Usually, the cost functions somehow exhibit decreasing specific costs with the storage size and thus form non-convex functions.  
\[C_{\textit{invest}}^{S}=z^{S}*c_{0}^{S}+c_{1}^{S}\,\Delta Q^{S}+c_{2}^{S}\, \dot{Q}^{S,max}+c_{3}^{S}\,\Delta Q^{S}\dot{Q}^{S,max}+c_{4}^{S}\,\Delta Q^{ S2}+c_{5}^{S}\dot{Q}^{S,max^{2}} \tag{21}\]