How zineb550/energy-dispatch works
This is a Spain electricity-demand forecasting and dispatch decision-analysis application. Its principal workflow ingests and cleans OPSD demand, generation and weather data; builds leakage-safe features; forecasts next-day demand; plans generation and storage; then settles that plan against actual demand to measure realized cost. Separate planning, sensitivity and diagnostics branches examine decision value, while the Streamlit dashboard presents stored results and supports a one-day what-if. The README documents several capabilities whose implementation was not sampled; those branches are included at the documented subsystem level.
Main entry points: pipeline.py Workflow runner · evaluate.py Realized-cost evaluation · processed Forecast results · forecast.py Forecast and backtest
Components 17
Data preparation
- Ingest and clean
src/energy_dispatch/data.py - Clean hourly data
data/processed
Forecasting
- Leak-safe features
src/energy_dispatch/features.py - Forecast and backtest
src/energy_dispatch/forecast.py - Forecast results
data/processed
Dispatch and analysis
- Dispatch optimizer
src/energy_dispatch/optimize.py - Realized-cost evaluation
src/energy_dispatch/evaluate.py - Evaluation results
data/processed - Quantile planning
src/energy_dispatch/planning.py - Storage sensitivity
src/energy_dispatch/sensitivity.py - Forecast diagnostics
src/energy_dispatch/diagnostics.py - Workflow runner
src/energy_dispatch/pipeline.py
Results and dashboard
- Dashboard data layer
src/energy_dispatch/dashboard.py - Streamlit dashboard
app/streamlit_app.py - Demo result files
app/demo_results
Other components
- Grid operator
- OPSD data
Connections 27
- Grid operator → Streamlit dashboard: views results
- Ingest and clean → OPSD data: downloads
- Ingest and clean → Clean hourly data: writes cleaned data
- Clean hourly data → Forecast and backtest: provides inputs
- Forecast and backtest → Leak-safe features: builds features
- Forecast and backtest → Forecast results: writes forecasts
- Forecast results → Realized-cost evaluation: provides forecasts
- Realized-cost evaluation → Dispatch optimizer: plans dispatch
- Realized-cost evaluation → Evaluation results: writes evaluation
- Forecast results → Quantile planning: provides forecast intervals
- Quantile planning → Realized-cost evaluation: evaluates plans
- Forecast results → Storage sensitivity: provides scenarios
- Storage sensitivity → Realized-cost evaluation: evaluates variants
- Forecast results → Forecast diagnostics: provides forecasts
- Evaluation results → Forecast diagnostics: provides costs
- Forecast diagnostics → Quantile planning: tests plans
- Workflow runner → Ingest and clean: runs stage
- Workflow runner → Forecast and backtest: runs stage
- Workflow runner → Realized-cost evaluation: runs stage
- Workflow runner → Storage sensitivity: runs stage
- Workflow runner → Quantile planning: runs stage
- Workflow runner → Forecast diagnostics: runs stage
- Streamlit dashboard → Dashboard data layer: loads result views
- Dashboard data layer → Forecast results: reads results
- Dashboard data layer → Evaluation results: reads results
- Streamlit dashboard → Realized-cost evaluation: replans one day
- Workflow runner → Demo result files: exports demo results