A gridded optimization model for photovoltaic applications. (15th May 2020)