At each time step, the total power production must equal the load, as expressed in Eq. (1), where P load is the power consumption of the load, P gen is the power output of the diesel generator, P PV is the power output of the PV system, P batt is the power output of the battery, and P curt is the curtailed or "dumped" power from the PV …