## 1 Introduction
In the presence of multiple energy demands, the concept of DR is extended to the multiple energy sector and a new concept of demand response, known as integrated demand response (IDR), is developed [29; 30]. In [31], a framework which enables buildings to carry out heating demand response for the integrated heating/electricity community energy systems is presented. In [32], a demand response mechanism of electro-thermal IES considering electrical and thermal load is proposed, and a multi-objective operation optimization model is established based on the DR mechanism to improve the economic and energy efficiency of IES. In [33], the authors addressed the concept of a hydrogen-based smart micro-energy hub considering IDR and a fuel cell-based hydrogen storage system. IDR is introduced to manage consumers' load patterns not only by shifting their electrical loads, but also by shifting their heat loads. In the specialized literature, IDR is a novel and developing concept and yet researchable subject, although the research on IDR models or strategies is far from being a full investigation. In addition, the coordinated operation and optimal scheduling of multi-energy carriers with both the IDR and HES, including electrical, heating and cooling, are not considered thoroughly. In reality, the implementation of IDR is inseparable from interaction between the end users and operator. As described in [34], the energy box in a cloud-based architecture can be used as one of the possible solutions for the communication and interaction between the end users and operator in the MEMG system. IDR, on the other hand, is also available as an energy management technique from the demand-side perspective. The energy flows' control and optimization are crucial for MEMGs to have a clear picture of the coordination of supply and demand at the scheduling and operational phases, considering distributed energy resources (DERs) and IDR. There are already some analytical approaches applicable to the optimization of power flow control of DERs, such as cost-optimal control and rule-based control [35]. Recently, model predictive control (MPC)-based applications on the optimization of power flows in energy systems were proposed in [36] to minimize electricity cost and to maximize DR services. In the predictive control method, operation of both demand- and supply-side entities are optimally controlled. MPC-based applications on energy flow control in MEMG systems considering IDR and HES are interesting open research topics that need further study but are out of the scope of the present paper. In view of the aforementioned discussion, this work focuses on the optimal operation of multi-energy microgrids for buildings in the presence of variable PV; HES consisting of electrical, heating and cooling energy storage; and IDR. The main contributions of this paper are as follows:1. To properly handle the uncertainty of variable PV generation, the p-efficient point method is applied to determine the expected PV generation amounts based on historical data at given confidence levels and then incorporate them into the MEMG optimization problem. 2. A generalized model for IDR is developed, and the role of IDR in accommodating PV generation within MEMGs is investigated. 3. A mixed-integer linear programming (MILP) model for properly integrating and coordinating the deployment of IDR, HES and also the energy conversion facilities for economic system operation is proposed. Coordinated operation of electrical, heating and cooling energy storage is optimized. 4. The proposed model is implemented on two typical summer and winter days for various cases to validate its effectiveness and feasibility. According to the obtained results, the proposed strategy can help the system operator to reduce the total energy costs by 5.44% on a typical summer day and 3.5% on a typical winter day. The rest of the paper is organized as follows: The MEMG system description and required concepts are presented in Section 2.