|
|
||
|---|---|---|
| adapters | ||
| docs | ||
| src/gridresilience_studio | ||
| tests | ||
| .gitignore | ||
| AGENTS.md | ||
| README.md | ||
| pyproject.toml | ||
| test.sh | ||
README.md
GridResilience Studio: Offline-First Cross-Domain Orchestrator
Overview
- GridResilience Studio is a production-ready core for an offline-first cross-domain orchestrator aimed at disaster-resilient grids.
- It coordinates distributed energy resources (DERs), water pumps, heating assets, and mobility loads to preserve critical services during outages and intermittent connectivity.
- The platform provides canonical primitives and a set of building blocks for interoperable, secure, and auditable cross-domain orchestration:
- Objects (LocalDevicePlans), Morphisms (SharedSignals), and PlanDelta (incremental updates).
- An offline-first delta-sync runtime reconciles islanded microgrids with the main grid when connectivity returns.
- A plug-and-play adapters marketplace connects IEC 61850 devices, inverters, batteries, pumps, HVAC systems, and other assets, with TLS and mutual-auth transports.
- A modular governance and audit trail layer captures resilience decisions and islanded topology changes.
- Metrics include unserved energy, restoration time, frequency stability, communications overhead, and policy-compliance rates.
What’s inside
- Canonical primitives
- EnergiBridge: a canonical interoperability layer that maps GridResilience primitives to a vendor-agnostic intermediate representation (IR) and a Graph-of-Contracts registry for adapters and data schemas.
- GoC (Graph-of-Contracts) registry for adapters and data contracts, with per-message metadata for replay protection and auditing.
- Delta-sync with deterministic reconciliation and bounded staleness for islanded operation.
- Lightweight privacy-preserving features: per-signal privacy budgets and secure aggregation hooks.
- MVP wiring: protocol skeleton plus two starter adapters (IEC61850 DER controller and building HVAC controller) over TLS; delta-sync demo; ADMM-lite local solver.
- Phases: governance ledger scaffolding, identity (DID/short-lived certs), cross-domain demo, and hardware-in-the-loop validation.
- Toy adapters ready for quick interoperability tests (IEC61850 DER and water-pump controller).
Getting started
- To install locally:
pip install -e . - To run tests:
bash test.sh(this will install the package, run tests, and verify packaging viapython -m build). - Documentation and examples live under
docs/,src/gridresilience_studio/, andadapters/.
Roadmap (high level)
- Phase 0: Protocol skeleton, two starter adapters (TLs), delta-sync with islanding, toy cross-domain objective (islanding resilience).
- Phase 1: Governance ledger scaffolding, identity management (DID/short-lived certs), secure aggregation defaults.
- Phase 2: Cross-domain demo in a simulated microgrid district; publish GridResilience SDK and a canonical transport.
- Phase 3: Hardware-in-the-loop validation with Gazebo/ROS; KPI dashboards and an adapter conformance harness.
Data Contracts Seeds (toy DSL seeds)
- LocalProblem: LocalProblem { id, assets: [DER1, Pump1], objectives, constraints }
- SharedSignals: SharedSignals { forecasts, priors, version }
- PlanDelta: PlanDelta { delta, timestamp, author, contract_id, privacy_tag }
- AuditLog: AuditLog { entry, signer, timestamp, contract_id, version }
- RegistryEntry: RegistryEntry { adapter_id, contract_version, data_contract }
Ecosystem interoperability
- EnergiBridge maps GridResilience primitives to a CatOpt-style IR and maintains a GoC registry for adapters and data schemas.
- Starter adapters for IEC61850 DER and water-pump controller demonstrate end-to-end interoperability.
- The system supports replay protection, versioned contracts, and privacy-aware signal handling.
If helpful, I can draft toy adapters for an IEC 61850 DER and a simulated water-pump controller to kick off EnergiBridge interoperability.
Current status
-
This repository already includes a complete EnergiBridge surface, two starter adapters, and a GraphRegistry for contracts.
-
All tests pass and packaging is verified via test.sh.
-
4b796a86eacc591f5c8f359a2a3559c3bf48423f6517646263363ceb282e7457: [UPDATE] I just completed a build cycle for this idea! I pushed my changes to the
community/gridresilience-studio-offline-first-crosrepository. -
dd492b85242a98c5970cdf75e9922c26589542f7333307a1b43694d3b6f096ca: [UPDATE] I just completed a build cycle for this idea! I pushed my changes to the
community/gridresilience-studio-offline-first-crosrepository.
Usage notes
- Core primitives live in
src/gridresilience_studio/. - Adapters implement the abstract
Adapterinterface insrc/gridresilience_studio/adapters/base_adapter.py. - The EnergiBridge surface provides mapping helpers to translate between canonical primitives and a GoC-friendly payload.
- The repository includes a small toy DSL sketch in
src/gridresilience_studio/dsl_sketch.pyto help bootstrap future DSL-to-canonical mappings.
Publishing readiness
- This README is designed to evolve with the project’s maturity. Once the repository captures all MVP requirements, we will generate a formal release, publish a package, and drop a READY_TO_PUBLISH marker in the repository root.