babylon.engine.systems.substrate

SubstrateSystem: physical-stock tick at pipeline slot 2.5 (Spec 062, US7).

Implements the System protocol. Runs after TerritorySystem (slot 2) and before ProductionSystem (slot 3), so production consumes the just-computed substrate values within the same tick.

Per FR-050/FR-051, the substrate system tracks physical stocks (raw materials, energy, biocapacity) that flow into Vol I production. For the MVP, the system is a pure pass-through that records substrate snapshots into the per-tick context so the auditor can observe them. Concrete stock-depletion / regeneration logic lands with the downstream economics spec that owns physical-substrate dynamics.

See also

specs/062-cross-scale-integration/spec.md FR-050/FR-051/FR-052. babylon.kernel.system_protocol: System Protocol.

Classes

SubstrateSystem()

Pipeline slot 2.5: substrate stock update before Production.

class babylon.engine.systems.substrate.SubstrateSystem[source]

Bases: SystemBase

Pipeline slot 2.5: substrate stock update before Production.

The system reads each hex’s pre-tick substrate stocks (raw_material_stock, energy_stock, biocapacity_stock) from the graph, applies any depletion/regeneration this tick, and writes the post-tick values back to the graph node attributes. The values are then visible to ProductionSystem in the same tick.

Production hex-locality: this system does NOT cross hex boundaries. All depletion/regeneration is in-place per hex.

name: ClassVar[str] = 'substrate'
step(graph, services, context)[source]

Update substrate stocks for every hex node.

For the MVP, the stocks are passed through unchanged. The system slot itself is the load-bearing contribution: by occupying position 2.5, it guarantees Production reads post-Substrate values rather than pre-Substrate snapshots (US7 acceptance test).

Return type:

None

Parameters: