optimizing solar energy production