-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Milestone
Description
Based on #472 and #473, implement a simple (v1) algorithm of energy distribution (power flow).
- Power may flow from any source (any battery) to any target.
- Even from a unit to a power plan if needed.
- No energy interlink (an edge in the grid graph) can transmit than X watts (a constant in the code).
- Power may not flow from batteries with 0 charge or to batteries with maximum charge.
- The flow is "optimal" in some sense.
- This must be designed so that "the optimal":
- makes sense in the context of the game
- can be computed with a non-super-complex algorithm
- can be computed efficiently
- For example: flow to batteries/units close to full discharge should be prioritized
- This must be designed so that "the optimal":
Note that the goal of the issue is a version 1 implementation / algorithm. Simplicity is of higher priority than perfection.
See https://en.wikipedia.org/wiki/Maximum_flow_problem for inspiration.