Skip to content

feat(sim): add core foundation with SimConfig, Engine, Controller, KPI#55

Open
bugsbunny88 wants to merge 1 commit intojdhoffa:mainfrom
bugsbunny88:feat/core-foundation
Open

feat(sim): add core foundation with SimConfig, Engine, Controller, KPI#55
bugsbunny88 wants to merge 1 commit intojdhoffa:mainfrom
bugsbunny88:feat/core-foundation

Conversation

@bugsbunny88
Copy link

@bugsbunny88 bugsbunny88 commented Feb 8, 2026

Summary

  • Rewrites simulation architecture around a Device trait, SimConfig, Engine, and NaiveRtController
  • KpiReport tracks energy, cost, and self-sufficiency metrics
  • Feeder model enforces import/export limits; power balance follows sign convention (+kW=load, -kW=gen)
  • Integration tests cover energy conservation, sign invariants, and determinism

Stacked PR series

This is the first of a 6-part stacked series. Merge order:

  1. feat(sim): add core foundation with SimConfig, Engine, Controller, KPI #55 - Core foundation (this PR)
  2. feat(sim): add stochastic weather, CSV export, imbalance settlement #56 - Stochastic weather, CSV export, imbalance settlement
  3. feat(app): add CLI with TOML config and scenario presets #57 - CLI with TOML config and scenario presets
  4. feat(sim): add GreedyController with forecast-aware battery dispatch #58 - GreedyController with forecast-aware battery dispatch
  5. feat(app): add REST API behind api feature gate #59 - REST API (feature-gated)
  6. feat(app): add live TUI behind tui feature gate #60 - Live TUI (feature-gated)

Each PR builds on the previous one. Once #55 is merged, #56's diff will automatically shrink to just its own changes, and so on.

To see the complete end state with all 6 PRs combined, browse the preview/complete branch on my fork.

Test plan

  • cargo test passes (69 unit + 7 integration + 2 doc-tests)
  • cargo check clean

@bugsbunny88 bugsbunny88 changed the title feat(sim): add core foundation — SimConfig, Engine, Controller, KPI feat(sim): add core foundation with SimConfig, Engine, Controller, KPI Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant