Renewable energy systems have replaced systems that use fossil fuels in many applications in different regions of the world. This is seen in the increasing use of solar and wind energy as the two most important sources for producing environment-friendly and economically convenient electrical energy. The fluctuating and unstable nature of renewable energy sources makes this type of energy complex to exploit, and related research has therefore mainly focused on Control and optimization. This work proposes an optimized configuration of two hybrid systems designed for a microgrid network with the aim to improve the power supply in isolated areas and provide a low cost, more reliable, and sustainable source of electricity for rural communities that may have limited access to traditional power grids. These hybrid setups consist of an initial system that caters for 10 houses which is then extended to serve 20 houses. Both setups utilize solar and wind energy sources, energy storage batteries, and a diesel generator. Real data collected in the Biskra region in the southeast of Algeria, is used. Particle Swarm Optimization algorithm is applied to achieve the optimal size of the hybrid system components through the weighted sum multi-objective approach, whereby three factors, namely, Cost of Electricity, Loss of Power Supply Probability, and Dummy Excess are combined into one objective function. Results of simulation show that the proposed approach achieves highly satisfactory values for the electricity prices in the 10- house and 20-house scenarios, with estimates of 0.15829 $/Kwh and 0.42112 $/Kwh, respectively.