Skip to content

PowerGrid

Snapshot of one independent power grid from the latest completed allocation. Returned by: power_control.grids() / power_control.grid(target_id)

MemberReturnsMeaning
.anchor_idstringDeterministic entity id identifying this connected grid right now; pass to power.grid(...). Merging or splitting a grid can change its anchor, so re-discover after rewiring
.outpost_idslist of stringsConnected outposts, sorted (empty for a field-only grid)
.machine_idslist of stringsBuilding and field power-structure ids on this grid, sorted. Mobile units and ship equipment are excluded
.memberslist of PowerGridMemberPower details per machine
.generated / .consumednumberW supplied by active generators / drawn by active consumers at snapshot time
.netnumberGeneration minus consumption in W; negative means the load is drawing stored energy
.stored / .capacitynumberConventional battery Wh held / total capacity
.reserve_stored / .reserve_capacitynumberLightning Rod reserve Wh held / capacity. The reserve is spent only after conventional batteries and never absorbs ordinary generation surplus
.has_generatorbooleanTrue when the grid contains a generator, even at 0 W output