## 1 Introduction
However, they generally do not analyse the problem from the point of view of reliability and the guarantee of achieving a certain value in continuity of supply [6; 9; 17; 18; 20; 23; 24; 32]. One of the few papers that includes reliability as a goal to design the size of an autonomous system with renewable energy is [34]. It optimizes the size of a system with three sources (solar, wind and tide) and an ESS. Reliability is studied from an annual curve for each resource (solar radiation, wind speed, water speed and demand) that reflects the mean values of 16 years. The results depend on the costs assigned to each system, but the advantage of a cooperative operation is not studied, which is the main objective of this paper. This is the main gap identified in the literature, since the published studies do not include, at the same time, a cooperative management strategy including random failures in the system, reliability optimization and optimal design of the facilities. In a previous study [38], the authors developed a method to evaluate the reliability of an SAPV energy system in an isolated case using an SMC simulation methodology, which provides very useful information to improve the design of these systems. The methodology developed in this study is applicable with various objectives. On the one hand, the method allows us to propose an optimal design of the system to achieve the desired reliability. On the other hand, it allows us to study the reliability with different designs, which facilitates the analysis of the necessary support system (generally, a diesel generator). Finally, the parameterized result obtained with the developed method allows for a complete analysis of the system to be designed, controlling not only aspects related to the reliability of the supply but also the use of the energy generated and the sensitivity analysis of the system to various disturbances. It is important to note that this study aims at optimizing the size of the components of a single facility. As indicated in the conclusions of this study, the authors consider that it is necessary to study the reliability of this type of system when several installations are connected in an MG. Going one step further, it is very interesting to analyse the impact on the reliability and optimal design of these systems of CoMGs. This will further improve facility designs and assess the reliability of the system as a whole, optimizing energy use and minimizing the use and size of support systems. Thus, in this work, two neighbouring houses whose demand throughout 2019 is known have been selected and a cooperative management strategy has been developed. The main objective of the presented study is to evaluate the reliability of the system and obtain an optimal design that improves the results of the individual design for each participant. The 2020 data have not been considered adequate after some analysis due to the pandemic situation, especially considering that an SMC method will be used to simulate multiple scenarios and draw reliable global conclusions. This study is the basis for evaluating the design and reliability of MGs in which each installation has its own SAPV energy system and its ESS and a connection to the MG. One type of these CoMGs is called a virtual power plant (VPP) in the literature. There are numerous works on VPPs. For an exhaustive review, works such as [39] can be consulted. However, these works focus in optimizing the management strategy of the different resources, which should only be conducted after an optimal design. In this work, starting from a design based on the method described in [38], a simple cooperative management strategy has been developed and the reliability of the system has been evaluated using an SMC simulation approach. The method used allows the inclusion of random faults in the generation systems, which is one of the most overlooked aspects in reliability studies.