Architecture¶
euroflex_bess_lab is organized around six layers:
config.py- validates
schema_version: 4 - resolves runtime paths
-
treats the primary runtime object as a
sitewith one or moreassets -
markets/ euroflex_bess_lab.marketsis the public import surfacemarkets/adapters/contains Belgium and Netherlands implementations-
adapters own timing, settlement semantics, actual-data loading, and reserve-product availability
-
forecasts/ - built-in operational forecast paths are
persistenceandcsv custom_pythonis a stable integration point for trusted local model codeperfect_foresightstays oracle-only-
walk-forward execution never lets the solver see data that was not visible at the decision timestamp
-
optimization/ - Pyomo + HiGHS kernels for:
da_onlyda_plus_fcr- Belgium-first
da_plus_afrr
-
portfolio kernels enforce shared POI constraints at the site level
-
backtesting/ - walk-forward engine
- checkpoint-based schedule revision
- oracle reference path
- stable artifact writing
-
reason-code assignment for site and asset outputs
-
analytics/,validation.py,exports.py, andreconciliation.py - reporting and rainflow diagnostics
- config/data/doctor checks
- downstream handoff payloads for site schedules and asset allocations
- baseline vs revision vs realized reconciliation
Portfolio mental model¶
v1.0.0 and v1.1.0 keep the first-class site/portfolio model and add Belgium-first aFRR plus schedule lineage on top:
- a site owns shared POI limits
- assets are currently battery-only
- market data is site-level
- optimization decisions are made per asset but constrained by site import/export limits
- outputs are written at both the site and asset level
- revision runs preserve a baseline plan, checkpoint revisions, and a final locked-realized trace
Revision mental model¶
schedule_revision is an execution wrapper:
workflow: schedule_revisionturns on checkpoint re-optimizationrevision.base_workflowselects the underlying market workflow- past intervals are locked
- FCR and Belgium aFRR commitments remain locked in the current release line
- only future unlocked energy intervals can change
Public import rule¶
New code should import through:
euroflex_bess_labeuroflex_bess_lab.markets