gridverse-open-low-code-pla.../docs/dsl_sketch.md

1.4 KiB

GridVerse DSL Sketch

This document provides a lightweight, vendor-agnostic DSL seed to bootstrap interoperability between LocalProblems, SharedVariables, and PlanDelta. It is intended for MVP prototyping and should map cleanly to the existing GridVerse core contracts and EnergiBridge translations.

Core concepts (seed mapping)

  • LocalProblem: domain-specific optimization task at a site
  • SharedVariables: signals/priors used to inform optimization
  • PlanDelta: incremental changes to the plan with timestamp and author
  • Canonical IR: EnergiBridge-like bridge payloads consumed by adapters and solver

Simple DSL syntax (example)

  • site_id=site-A
  • description=District cooling optimization
  • variables=cooling_setpoint=22.5,heat_pump_on=true

Parsed representation (conceptual):

  • LocalProblem(site_id="site-A", description="District cooling optimization", variables={...})
  • SharedVariables(signals={}, version=1)
  • PlanDelta(delta_id="pd-01", changes={}, timestamp=...)

Intended workflow

  • DSL text -> LocalProblem/SharedVariables via dsl.parse_local_problem_from_dsl
  • Convert to canonical bundle via dsl.dsl_to_canonical_bundle (which uses EnergiBridge under the hood)
  • Feed into GraphContractRegistry and Adapter Marketplace for downstream solving and adaptation

Notes

  • This is a seed sketch; follow-up enhancements should include richer parsing, error handling, and end-to-end tests.