## 2 Mathematical Modelling of ME Applications  
### Modelling of CCHP Plant  
A CCHP plant is composed of two sides of ME devices: cogeneration side and cooling power production side. Cogeneration side:  
* Combined heat and power units (CHP) are the core of CCHP plants, which generates both heat and electricity. \(\eta_{W}\) and \(\eta_{Q}\) are used to describe the ratio of electric power output and heat power output to the fuel thermal energy input respectively. * Combustion heat generators (CHG) are usually the thermal backup of the CHP. \(\eta_{t}\) is used to describe the ratio of heat power output to the fuel thermal energy input. * Cooling power production side:
* Compression electric refrigeration generators (CERG) are widely used for producing cooling power, both for air conditioning and industrial purposes. * Electrical heat pumps (EP) are a bimodal CCHP device which can produce heat and cooling power with electric power input. * Water adsorption refrigeration generators (WARG) are heat-driven cooling power producers. * Gas absorption refrigerator generators (GARC) are fuelled by natural gas, but are less widespread [27]. Figure 1 shows the inputs and outputs of the ME devices above with their respective performance indicator. \(\mathbf{F}\) represents the fuel thermal energy, \(\mathbf{W}\) represents electricity, \(\mathbf{Q}\) represents heat, and \(\mathbf{R}\) represents cooling power. Coefficient of performance (_COP_) is defined as the ratio of cooling power output to the energy input, which is used to represent the performance indicator of cooling production devices. To integrate the operation model of a CCHP plant into the dispatch model of the MES, the model of each component CCHP device should be developed first. For a component CCHP device, \(\mathbf{E}_{i}=\left[F_{i},W_{i},Q_{i},R_{i}\right]^{T}\) and \(\mathbf{E}_{o}=\left[F_{o},W_{o},Q_{o},R_{o}\right]^{T}\) are used to denote its input and output array respectively, the mapping between energy input \(\mathbf{E}_{i}\) and output \(\mathbf{E}_{o}\) is described with the efficiency matrix \(\mathbf{H}\) as in (1). Each element in \(\mathbf{H}\) relates one particular input to a certain output with relevant energy conversion efficiency \(\eta\), whose two subscript respectively denote the type of energy output and the type of energy input. \[\mathbf{E_{o}=H\cdot E_{i}}\] \[\mathbf{H}=\left[ \begin{array}{cccc}\eta_{\rm FF}&\eta_{\rm FW}&\eta_{ \rm FQ}&\eta_{\rm FR}\\ \eta_{\rm WF}&\eta_{\rm WW}&\eta_{\rm WQ}&\eta_{\rm WR}\\ \eta_{\rm QF}&\eta_{\rm QW}&\eta_{\rm QQ}&\eta_{\rm QR}\\ \eta_{\rm RF}&\eta_{\rm RW}&\eta_{\rm RQ}&\eta_{\rm RR}\end{array} \right] \tag{1}\]  
Take the illustrative scheme of a CCHP plant in Figure 2 as an example. It is composed of four CCHP devices, among which are energy pathways: the yellow line represents electric power flow; the green line represents fuel energy flow; the red line represents heat power flow; and the blue line represents cooling power flow. It receives electricity supply \(W_{i}\) from the Electrical Distribution System (EDS) and fuel \(F_{i}\) from the Fuel Distribution System (FDS). Electricity can be both bought from and sold to markets through the EDS. Heat demands can be met by exploiting CHP, CHG, and the EP (heating mode). The cooling demand can be met by using the WARG or/and the EP (cooling mode). Electricity can be drawn from the EDS and/or produced by the CHP (and can be sold back as well). Considering there is no heat storage, extra heat \(Q_{\rm Dump}\) will be dumped. It is the abundant production options and redundant energy pathways that provide possibility for CCHP plant to be part of serving the RES accommodation, and promoting the MES operation. In order to model its internal energy flows, energy dispatch factor (EDF) is introduced, which is defined as an array of elements that mark the relative energy dispatch at flow splitting points  
Figure 1: Energy input and output of typical multi-energy (ME) devices.