ents_casting generates long-term scenarios and matching stochastic short-term forecasts from measured time series of a single year and historical weather data. The generated data can be used to evaluate the design and operation of energy systems under realistic weather variability and forecast uncertainty.
The package currently supports the following time series parameters:
pv_local: Capacity factor for photovoltaics.wind_local: Capacity factor for wind turbines.demand_el: Electricity demand.demand_heat: Heating demand.demand_cold: Cooling demand.price_el: Electricity price.emissions_el: Electricity emission factor.
Input
- Measured time series of relevant parameters for one year.
ents_casting generates long-term scenarios by learning the relationship between weather variables and the measured time series and applying this relationship to historical weather years. A synthetic error term is added to account for imperfect predictive accuracy.
Each scenario contains one year of hourly values for all supported parameters and can be used to evaluate energy system operation under different weather conditions.
For every day in each long-term scenario, ents_casting generates a stochastic forecast with a forecast horizon of six days and hourly resolution. The forecasts are based on synthetic weather forecasts that reproduce the accuracy of historical weather forecasts.
These forecasts enable realistic simulation of operational decision making under forecast uncertainty and can be used to benchmark predictive operating methods, for example with s2_mpc.
Clone the repository:
git clone https://github.com/RWTH-LTT/ents_casting.gitCreate a virtual environment:
python3 -m venv ./venv_s2_mpcActivate the virtual environment:
. venv_s2_mpc/Scripts/activateInstall ents_casting together with all required dependencies:
pip install -e ./ents_castingThe file config.yaml specifies all settings required for scenario and forecast generation, including the weather years, locations, and training years. All configuration options are documented in the file.
Provide the historical measured data by placing CSV files in
data/measured_data/data_{year}.csv
where {year} corresponds to the years listed in training_years in config.yaml.
Different parameters may originate from different measurement years.
Run the complete workflow:
python -m ents_castingThe workflow performs the following steps:
- Download the historical weather data for the specified weather years and locations.
- Download the historical weather forecasts.
- Train the LightGBM forecast models.
- Generate the long-term scenarios for the specified weather years.
- Fit AR(2) error models for the long-term scenarios.
- Add AR(2) noise to the long-term scenarios.
- Train the AR(2) error models for weather forecasts.
- Train the AR(2) error models for parameter forecasts.
- Generate the short-term forecasts for each day of the long-term scenarios.
Note
Downloading weather data for many (>10) weather years may exceed API rate limits. If this occurs, reduce the number of locations and download the data in multiple runs.
ents_casting has been developed at the Institute of Technical Thermodynamics (RWTH Aachen University) by:
- Benedict Brosius
- Jan Wilberg
- Mats Zoellmann
If ents_casting supports your research, please cite:
Brosius, B., Zoeller, J., Zoellmann, M., Helders, S., Nilges, B., Schricker, H., & von der Assen, N. (2026). Model predictive control of smart energy systems with seasonal storage: Mitigating the end-of-horizon effect via stochastic dynamic programming. Energy Conversion and Management: X. https://doi.org/10.1016/j.ecmx.2026.102138