I am trying to build an optimization mechanism for a theoretical hybrid plant (pv+battery+inverter). The main idea is to 1) compute an optimal schedule for battery charge/discharge considering the environmental forecasts [pv, load, and loadshedding (grid on/off)], and then 2) program the...