## 2 System Configuration and Operation  
The configuration of the solar-assist co-generation energy hub is shown in Figure 1. A gas-fired CHP unit is the main supply facility, which produces electricity and heat at the same time. PV panels and the solar thermal collector (STC) are equipped to harness solar energy. The excessive electricity and heat can be stored in the electric energy storage (EES) unit and thermal energy storage (TES) unit. The electric and thermal demands must be fully satisfied. Load shedding is not allowed. In the current operating practice of many distribution systems, reverse power flow is prohibited due to relaying protection-related considerations. So we do not consider selling excessive solar energy to the power grid. This problem is expected to be solved in modern active distribution systems. Figure 1: Configuration of the solar-assist co-generation energy hub. Given the generation profiles of PV panel (\(p_{t}^{s}\)) and STC (\(h_{t}^{s}\)), as well as load curves \(p_{t}^{d}\) and \(h_{t}^{d}\), the daily operation problem of the energy hub can be cast as:  
\[\min\sum_{t}C(p_{t}^{g},h_{t}^{g})\Delta t \tag{1}\]  
\[\text{s.t.}\ p_{t}^{g}\geq 0,\ 0\leq h_{t}^{g}\leq\alpha_{h}^{g}C_{g},\ \frac{p_{t}^{g}}{\eta_{p}^{g}}+\frac{h_{t}^{g}}{\eta_{h}^{g}}\leq C_{g},\ \forall t \tag{2}\]  
\[p_{t}^{g}+p_{t}^{s}-p_{t}^{sc}+p_{t}^{sd}\geq p_{t}^{d},\ \forall t \tag{3}\]  
\[h_{t}^{g}+h_{t}^{s}-h_{t}^{sc}+h_{t}^{sd}\geq h_{t}^{d},\ \forall t \tag{4}\]  
\[\beta_{t}^{e}E_{S}\leq E_{0}+\sum_{j=1}^{t}\left(\eta_{t}^{e}p_{j}^{sc}-\frac{ p_{j}^{sd}}{\eta_{d}^{e}}\right)\Delta t\leq\beta_{m}^{e}E_{S},\ \forall t \tag{5}\]  
\[\beta_{t}^{h}H_{S}\leq H_{0}+\sum_{j=1}^{t}\left(\eta_{t}^{h}h_{t}^{sc}-\frac{ h_{t}^{sd}}{\eta_{d}^{h}}\right)\Delta t\leq\beta_{m}^{h}H_{S},\ \forall t \tag{6}\]  
\[0\leq p_{j}^{sc},p_{j}^{sd}\leq p_{em}^{sd}E_{S},\ 0\leq h_{j}^{sc},h_{j}^{sd} \leq\beta_{hm}^{cd}H_{S},\ \forall t \tag{7}\]  
where \(p_{t}^{g}\) and \(h_{t}^{g}\) are electric and thermal output of CHP unit, and the fuel cost of CHP unit is [51]. \[C(p,h)=\alpha_{0}+\alpha_{1}p+\alpha_{2}h+\alpha_{3}p^{2}+\alpha_{4}h^{2}+ \alpha_{5}ph \tag{8}\]  
Objective function (1) aims to minimize the daily fuel cost of the CHP unit. Because C(\(p,h\)) is a convex function [51], it can be approximated via a piecewise linear function using the convex combination method in Appendix B of [52], and we can assume the objective function is linear without loss of generality. \(C_{g}\) is the capacity of CHP unit, and \(\alpha_{h}^{g}\) is a constant; \(\eta_{p}^{g}/\eta_{h}^{g}\) is the efficiency of electricity/heat conversion; (1) defines the operating region of the CHP unit [46]. (3) and (4) are supply adequacy constraints, where power flow variables are clarified in Figure 1, and inequality means that excessive renewable production can be curtailed. (5) and (6) describe the feasible ranges of the state-of-charges (SoCs) of EES and TES units, where \(E_{S}/H_{S}\) and \(E_{0}/H_{0}\) are the capacity and initial SoC of the EES/TES unit; \(\eta_{t}^{e}/\eta_{d}^{e}\) and \(\eta_{t}^{h}/\eta_{d}^{h}\) are charging/dispatching efficiency of the EES/TES unit; \(\beta_{t}^{e}/\beta_{m}^{e}\) and \(\beta_{l}^{h}/\beta_{m}^{h}\) are constant coefficients indicating the minimum and maximum storage level of EES and TES units. (7) restricts the maximum charging and discharging rates of the EES/TES unit, where \(\beta_{em}^{cd}\) and \(\beta_{hm}^{cd}\) are constant coefficients; their multiplicative inverse indicates how long it takes to charge the storage units from empty to full. In problem (1)-(7), decision variables include power flow variables of the CHP unit and energy storage units. This simulates daily operation with 24 periods. The first period is 0:00-1:00 a.m., shortly after the evening peak, so \(E_{0}/H_{0}\) is set to the minimum SoC. We can also relax the initial condition and let \(E_{0}/H_{0}\) be a decision variable.