We need to supply electricity to a remote region that is not part of our network. A small gas generator will be ideal for this environment, but we are excited to try accompanying it with a new 80 MWh battery. This battery will allow us to have days where we do not need to turn on the generator, a positive outcome for the area.
The forecast daily electricity demands (MWh) for June are as follows:
34, 37, 37, 37, 37, 27, 36, 35, 39, 40, 26, 28, 33, 26, 33, 40, 47, 40, 36, 32, 37, 35, 30, 35, 37, 24, 32, 24, 35, 37
Each night we put in our order for the gas to power the generator for the following day. Effectively, our orders are placed in integer numbers of MWh, x, with a total cost of buying the gas and running the generator for a day of $300+80×0.9 (or $0, when x = 0).
We need to meet the forecast demand each day, either directly from the generator or from the battery. Any surplus electricity will be stored in the battery. Once the battery is at capacity, subsequent gas is wasted.
Suppose our battery is initially empty and can be left empty at the end of the month. How much electricity should we plan to generate for each day in June?
Please provide us with the optimal total cost.