Similar Items: Optimal Sizing of Photovoltaic Systems With Flexible Curtailment Strategy