This paper describes a procedure for optimal sizing of the investment in a renewable electricity source and electricity
storage for a particular consumer with a known electricity consumption profile, under the given conditions of allowed
return on investment period and with the optimal operation of the battery storage system included. The optimal size of
the PV system in terms of its power production under standard test conditions is provided, as well as the optimal size of
the battery storage system in terms of its power converter power rating and the storage capacity. The procedure is based
on a sequential linear programming method which enables the computations tractability on regularly sized computers