## 2 Literature Review  
In energy management systems with a single energy carrier, optimal performance and calculations are simpler, due to the lack of independence among energy carriers. Some research has been done to optimize the performance of such systems based on time-series analysis, factor-based optimization algorithms, etc. [16; 17; 18; 19]. However, in a few cases, uncertainty in load demand is included in optimizing system performance. For example, in [20], the effect of the presence of DERs in optimizing the performance of energy management systems is investigated. In multi-carrier energy management systems, computing and optimizing system performance is more complex. In [21], a model for optimizing the performance of the Poly Generation micro-grid of the University of Geneva is presented, showing that MEMGs can have economic and environmental benefits if they use the optimal strategy. Furthermore, in [22], an optimization model for a PG micro-grid in the presence of renewable energy sources is proposed. In [23], a real-time operational optimization method is presented. In [24; 25; 26], the problems of optimizing the performance of multi-carrier energy systems with centralized approaches, and from top to down, were investigated. On the other hand, in a few cases--such as [27; 28]--the problems of optimal planning of the performance of the multi-carrier energy systems with decentralized and distributed approaches have been investigated. Load demand is not considered in energy management systems with multiple energy carriers. The reasons for this include computational complexity, performance optimization of energy carriers, uncertainties in renewable energy production, and continuous fluctuation. Hence, the authors of [27; 28] could not consider the uncertainties. Considering uncertainties makes it difficult to provide an optimal approach but, on the other hand, it makes the optimal approach more efficient and reduces the operating costs of the system. In [29], optimization was achieved using PSO and GA to solve the problem of MEMG operational planning. Meanwhile, [30] used a stochastic model for electricity and natural gas pricing and load demand in real time. In [31], a micro-grid management approach is presented, considering random load and predicting the demand. In [26], a new method for a multi-agent system (MAS) is presented, which is a combination of ANFIS and GA. In [15], deep learning is used to model uncertainties. In [32], optimization of the performance of the system is achieved using the gray wolf optimization method. In [33], the evolutionary vertical sequencing protocol is used to model coordination between high-level agents, and a two-layer MLIP is used for low-level uncertainty. In [34], micro-grid energy management with a decentralized approach is achieved using reinforcement learning. In [35], a game-theory-based optimization model is presented to configure the capacity of energy carrier agents. In multi-carrier systems, providing an optimal approach is complex because, in such systems, uncertainties related to energy production in renewable sources, fluctuations in load demand, and uncertainty in market price exist. Reviewing the related work in energy management of multi-carrier energy networks indicates that such systems can reduce costs and pollution if optimally operated. Due to the importance of the optimal performance of MEMGs, studies in this field have been considered. However, most of these studies have not considered demand response programs and uncertainties related to the output of renewable energy. To overcome these limitations, this study presents a multi-carrier system (MCS) for planning the optimal performance of MEMG agents, considering uncertainties related to renewable energy production and energy demand fluctuations. The effect of using demand response programs is also presented, with the two objectives of minimizing operational and environmental costs.