The quest to meet the ever increasing demand for energy coupled with the need to curtail the emission of CO2 has led to the deployment of renewable energy sources into the electrical network over the past decades. This development, although very desirable, comes with the known downside of fluctuating production, especially when dealing with wind and solar power sources. This introduces variations in voltage and frequency along with harmonic pollution that need to be constantly controlled. System operators are required to balance demand and supply and are sometimes forced to cut out supply from renewable energy sources in order to maintain network stability, resulting in losses. This paper shows an approach to sizing of renewable energy plant and storage system using particle-swarm optimization. The background aim is to support the hosting capacity of the network where the unit is connected.