Backstory: Im playing a game and I regain energy in this game a 1 / 180 s (3m). I would like to be efficient at using my energy, and use energy over a span of 8 hours without running out. At max, I can hold 130 energy in my storage for us, and I use it in factors of 14 energy at a time.
I would like to figure out how often I can use energy at 14 energy per use over a certain amount of time, say 8 hours, without running out, but also using energy in the reserve while regaining energy over this time.
I can theorize it, but Im having a hard time creating a formula for it.
Thanks!
The maximum use happens when you start with $130$, instantly use $14$ so you are regaining energy all the time, and use your last $14$ at the end of the interval. In that case you regain $160$ energy during the $8$ hours. That means you can have $290$ total (or maybe $289$ because it takes a bit of time to use the first block, so the last recovery is just after the $8$ hour point), but as you use it in blocks of $14$ you can only use $280$. You can use $20$ blocks of energy. Your starting complement gives you $9$ blocks. It is hard to give a concise description on the allowable spacing of the uses.