Skip to content

Energy Distrubution Grid: Power Flow #475

@Indy2222

Description

@Indy2222

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

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions