Changelog
All notable changes to GemsPy are documented here.
[Unreleased]
Scenario-scope playlist (replaces nb-scenarios)
The scenario-scope section of optim-config.yml now supports a full
playlist mechanism. The old nb-scenarios integer key is removed and raises
a validation error if still present.
Scenario indices are 0-based throughout, consistent with the
modeler-scenariobuilder.dat convention.
Inline form — specify scenarios with integers, string-integers, and
inclusive "a-b" range strings:
Playlist-file form — point to a flat JSON array of 0-based integers, useful for machine-generated playlists:
Other changes:
excludeis now compatible with bothincludeandplaylist-file. Use it to subtract a few scenarios at run time without modifying the playlist file.validate_optim_config()now accepts an optionalscenario_builderargument and cross-checks all playlist indices against every scenario group, raising aValueErrorfor out-of-bounds indices.- The playlist is resolved and cached exactly once at
load_optim_config()time; I/O and format errors surface immediately asValueError. - Boolean values (
true/false) are explicitly rejected in both inline lists and JSON playlist files.
[0.1.0] - 2026-04-30
Study folder structure
Studies are now loaded from a conventional directory layout via load_study(study_dir):
<study>/
input/
system.yml # component topology and connections
model-libraries/*.yml # model library files
data-series/ # time-series parameter files (TSV)
data-series/modeler-scenariobuilder.dat # optional scenario mapping
The Study object (pairing a System with a DataBase) is the single input to SimulationSession.
Optimization configuration (optim-config.yml)
A new optim-config.yml file controls all aspects of a simulation run:
resolution.mode— four strategies:frontal,sequential-subproblems,parallel-subproblems,benders-decompositionresolution.block_length/block_overlap— time-window size and overlap for sequential/parallel modestime_scope—first_time_step/last_time_stepscenario_scope.nb_scenarios— number of Monte-Carlo scenarios to run (replaced by the playlist mechanism in a later release)solver_options— solver name (default: HiGHS), log verbosity, and free-form solver parametersmodels[].model_decomposition— per-model assignment of variables, constraints, and objective contributions tomaster,subproblems, ormaster-and-subproblems(used for Benders decomposition)models[].out_of_bounds_processing— per-constraint handling of time indices that fall outside the horizon (cyclicordrop)
Scenario builder
modeler-scenariobuilder.dat maps Monte-Carlo scenario indices to data-series column indices on a per-scenario-group basis, allowing different components to draw from different stochastic draws.
Vectorized solver
The internal optimizer was migrated from a scalar OR-Tools pipeline to a fully vectorized linopy / xarray pipeline. All constraints for all components, time steps, and scenarios are now built in a single pass and solved in one call — significantly reducing build time for large horizons.
Removed
- OR-Tools dependency.
[0.0.6] - 2025
Added
- Math operators
floor,ceil,min, andmaxin the GemsPy expression language, withmax/minaccepting a variadic argument list (argListgrammar rule). - Support for complex variable bounds expressions: operator expansion now runs before bounds evaluation, enabling expressions such as
min(p_max_cluster, min_gen_mod * unit_count * p_max_unit). visitTimeShiftExprandvisitTimeIndexExprin the expression visitor interface.AGENTS.mdand agent guidance documentation.- Status and quality badges in README.
Fixed
- O(T²) list-copy performance bug in
CopyVisitor.addition(now O(T)). - Pandas and Pydantic deprecation warnings resolved.
floor/ceil/max/minvisitor implementations inLinearExpressionBuilder.- Degree of
floor/ceil/max/minreturnsinffor non-constant operands.
[0.0.5] - 2025
Added
load_input_system: load and validate an input system into memory from a file path.
[0.0.4] - 2025
Removed
- PyPSA → GEMS converter and related files (out of scope).
[0.0.3] - 2025
Changed
- Version naming aligned; package prepared for PyPI upload.
- README revised to consistently use GEMS / GemsPy naming.
[0.0.2] - 2025
Changed
- Initial PyPI preparation: project metadata, classifiers, and packaging configuration.