The initial expenses of PV panels, batteries, and installation have an amortization period that is less than the PV plant's useful life, according to [18; 32]. Because of this, for many residential customers, the reliability of the electrical supply--rather than the expense of the investment--is the most important aspect to consider when planning the installation of an SAPV system. As long as there is a high level of supply reliability guaranteed, many private home investors are willing to pay the investment costs of the PV generation system [33]. Because of this, an optimal design process for the SAPV system is necessary, one that takes into account all of the system's uncertainties. During SAPV design, unanticipated system faults must be considered assuming no component faults can result in an overly optimistic performance prediction and the consequent undersizing of PV modules and batteries [34]. Monte Carlo simulation (MCS) techniques can be executed sequentially or non-sequentially [35]. By sequentially sampling the states of the system's component parts, the sequential MCS simulates the chronology of the stochastic process of system operation. The earlier states, such as the battery's SOC status, determine the current state of a renewable energy system with energy storage. Typically, there is no connection between residential demand and PV generation. The complexity of this reliability analysis is better handled by a sequential MCS. Other methodologies, such as reliability evaluation based on analytical models or Markov models, cannot be used to realistically evaluate SAPV systems [36]. Sequential Monte Carlo simulation is used in this study to assess component faults. The paper's goal is to size the SAPV system economically optimally while imposing some restrictions on the system's intended reliability. This study is distinct from previous ones in that it considers actual data from time series on PV generation and load demand in addition to the simultaneous evaluation of uncertainties related to faults in system components. The aim of the design of an SAPV generation system is to guarantee the desired level of reliability in the continuity of the supply. The problem is formulated as a single-objective cost optimization problem, as the reliability of the SAPV system is set as a minimum requirement. To calculate the optimal size of the installation that minimizes investment and operation costs for a minimum established reliability requirement, the application of an evolutionary algorithm (EA) has been considered. An evolutionary algorithm is an optimization method that imitates behaviors of nature to obtain an approximate solution of non-linear complex optimization problems, with a large number of variables or very complex to solve using traditional mathematical algorithms [37]. The first to be described was the genetic algorithm (GA), although there is currently a wide variety of alternatives, such as the article swarm optimization (PSO) algorithm based on bird behavior, the ACO algorithm (ant colony optimization) based on the behavior of ant colonies, or evolutions and variants of these such as the memetic algorithm (MA). Different studies have been published comparing the EA, both qualitatively [38], and comparing the performance in solving optimization problems of different kinds. While, qualitatively, advantages and disadvantages are observed in each one of them, quantitatively, in the studies where the performance of each one of them has been compared, the PSO algorithm on average reaches the solution more quickly and effectively [37; 39]. This fact, added to its simplicity, positions it as the one indicated to implement in this work. The PSO algorithm was devised by [PERSON] and [PERSON] in 1995 to describe the behavior of fish and birds. It has been used to describe the behavior of complex systems to reach an optimal solution [40].