These decisions must take into account anticipated solar generation, predicted energy demand, and the local electricity tariff structure, and are best done in an automated way, continually analyzing new information (such as updated weather forecasts) as it arrives.