Skip to content

Add economic cost overrides and dotted sweeps - #119

Merged
Str4vinci merged 3 commits into
developfrom
feat/0.5.x-cost-overrides
Aug 14, 2026
Merged

Add economic cost overrides and dotted sweeps#119
Str4vinci merged 3 commits into
developfrom
feat/0.5.x-cost-overrides

Conversation

@Str4vinci

@Str4vinci Str4vinci commented Aug 11, 2026

Copy link
Copy Markdown
Owner

This makes BREOS's economic assumptions directly configurable and sweepable without requiring a throwaway cost preset for every price or CAPEX value. It delivers Phase 0 of the economic-scenario roadmap while keeping the existing flat-pricing model and preset results unchanged.

Summary

  • add a validated [costs] override table with explicit precedence: user override → named preset → CostParams default
  • use the existing cost-catalog vocabulary for electricity, export, standing, PV, battery, inverter, installation, land, maintenance, operation, and other costs
  • centralize the public-key-to-CostParams mapping so App presets and lower-level config construction cannot drift
  • support quoted and native TOML dotted sweep keys such as "costs.electricity_cost" and costs.storage_cost_per_kwh
  • deep-copy each sweep configuration so nested overrides preserve sibling cost values and cannot mutate later runs
  • reject unknown, empty, duplicate, and conflicting sweep keys with actionable available-key messages
  • document the configuration and sweep workflow and update the shipped sweep example

Compatibility

Existing configurations need no changes. With no [costs] table, named presets and dataclass defaults resolve exactly as before; the residential Portugal preset is pinned character-for-character in a regression test. Sweep CSV columns retain the existing param_... convention, including dotted names such as param_costs.electricity_cost.

This is intentionally only the override seam. Escalator decomposition, scenario orchestration, switching values, currency, and time-of-use valuation remain in their roadmap phases.

Validation

  • full non-slow suite: 812 passed, 7 skipped, 2 deselected
  • focused App/config/CLI/economics suite: 188 passed
  • Ruff lint and formatting checks passed
  • strict offline Sphinx build with -W passed
  • release artifact verification passed for the sdist, wheel, installed package data, and all 14 BLAST models

@Str4vinci
Str4vinci merged commit 535c715 into develop Aug 14, 2026
8 checks passed
@Str4vinci
Str4vinci deleted the feat/0.5.x-cost-overrides branch August 14, 2026 22:52
@Str4vinci Str4vinci mentioned this pull request Aug 14, 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