ChangelogΒΆ
This project adheres to Semantic Versioning. Formatting is based on Keep a Changelog & Gitmoji. For more details regarding the individual PRs and contributors, please refer to our GitHub releases.
Tip
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
v5.0.2 17th December 2025ΒΆ
β»οΈ ChangedΒΆ
statistics.plot.effects()now defaults toby=Nonefor aggregated totals; useby='component'for the previous behavior
v5.0.1 17th December 2025ΒΆ
π· DevelopmentΒΆ
- Fixed docs deployment in CI workflow
v5.0.0 16th December 2025ΒΆ
Summary: This is a major release that introduces the new FlowSystem-centric API, dramatically simplifying workflows by integrating optimization, results access, and visualization directly into the FlowSystem object. This release also completes the terminology standardization (OnOff β Status) and deprecates the old Optimization/Results workflow (to be removed in v6.0.0).
Migration Guide
See the Migration Guide v5 for step-by-step upgrade instructions.
β¨ AddedΒΆ
FlowSystem-Centric Architecture: The FlowSystem is now the central hub for all operations:
import flixopt as fx
# Create and configure your system
flow_system = fx.FlowSystem(timesteps)
flow_system.add_elements(boiler, heat_bus, costs)
# Optimize directly on FlowSystem
flow_system.optimize(fx.solvers.HighsSolver())
# Access results via solution Dataset
total_costs = flow_system.solution['costs'].item()
flow_rate = flow_system.solution['Boiler(Q_th)|flow_rate'].values
# Plot with new accessor API
flow_system.statistics.plot.balance('HeatBus')
flow_system.statistics.plot.sankey.flows()
New Accessor-Based API: Four accessor patterns provide organized, discoverable interfaces:
| Accessor | Purpose | Example |
|---|---|---|
flow_system.statistics | Data access (flow rates, sizes, effects) | flow_system.statistics.flow_rates |
flow_system.statistics.plot | Visualization methods | flow_system.statistics.plot.balance('Bus') |
flow_system.transform | FlowSystem transformations | flow_system.transform.cluster(params) |
flow_system.topology | Network structure & visualization | flow_system.topology.plot_network() |
Statistics Accessor: Access aggregated results data with clean, consistent naming:
stats = flow_system.statistics
# Flow data (clean labels, no |flow_rate suffix needed)
stats.flow_rates['Boiler(Q_th)']
stats.flow_hours['Boiler(Q_th)']
stats.sizes['Boiler(Q_th)']
stats.charge_states['Battery']
# Effect breakdown by contributor
stats.temporal_effects['costs'] # Per timestep, per contributor
stats.periodic_effects['costs'] # Investment costs per contributor
stats.total_effects['costs'] # Total per contributor
Comprehensive Plotting API: All plots return PlotResult objects with chainable methods:
# Balance plots for buses and components
flow_system.statistics.plot.balance('ElectricityBus')
flow_system.statistics.plot.balance('Boiler', mode='area')
# Storage visualization with charge state
flow_system.statistics.plot.storage('Battery')
# Heatmaps with automatic time reshaping
flow_system.statistics.plot.heatmap('Boiler(Q_th)|flow_rate', reshape=('D', 'h'))
# Flow-based Sankey diagrams
flow_system.statistics.plot.sankey.flows()
flow_system.statistics.plot.sankey.flows(select={'bus': 'ElectricityBus'})
# Effect contribution Sankey
flow_system.statistics.plot.sankey.effects('costs')
# Method chaining for customization and export
flow_system.statistics.plot.balance('Bus') \
.update(title='Custom Title', height=600) \
.to_html('plot.html') \
.to_csv('data.csv') \
.show()
Carrier Management: New Carrier class for consistent styling across visualizations:
# Define custom carriers
electricity = fx.Carrier('electricity', '#FFD700', 'kW', 'Electrical power')
district_heat = fx.Carrier('district_heat', '#FF6B6B', 'kW_th')
# Register with FlowSystem
flow_system.add_carrier(electricity)
# Use with buses (reference by name)
elec_bus = fx.Bus('MainGrid', carrier='electricity')
# Or use predefined carriers from CONFIG
fx.CONFIG.Carriers.electricity
fx.CONFIG.Carriers.heat
Transform Accessor: Transformations that create new FlowSystem instances:
# Time selection and resampling
fs_subset = flow_system.transform.sel(time=slice('2023-01-01', '2023-06-30'))
fs_resampled = flow_system.transform.resample(time='4h', method='mean')
# Clustered optimization
params = fx.ClusteringParameters(hours_per_period=24, nr_of_periods=8)
clustered_fs = flow_system.transform.cluster(params)
clustered_fs.optimize(solver)
Rolling Horizon Optimization: Decompose large operational problems into sequential segments:
# Solve with rolling horizon
segments = flow_system.optimize.rolling_horizon(
solver,
horizon=192, # Timesteps per segment
overlap=48, # Lookahead for storage optimization
)
# Combined solution available on original FlowSystem
total_cost = flow_system.solution['costs'].item()
# Individual segments also available
for seg in segments:
print(seg.solution['costs'].item())
Solution Persistence: FlowSystem now stores and persists solutions:
# Optimize and save with solution
flow_system.optimize(solver)
flow_system.to_netcdf('results/my_model.nc4')
# Load FlowSystem with solution intact
loaded_fs = fx.FlowSystem.from_netcdf('results/my_model.nc4')
print(loaded_fs.solution['costs'].item()) # Solution is available!
Migration Helper for Old Results (deprecated, temporary):
# Migrate old result files to new FlowSystem format
fs = fx.FlowSystem.from_old_results('results_folder', 'my_model')
# Or convert Results object directly
fs = results.convert_to_flow_system()
FlowSystem Locking: FlowSystem automatically locks after optimization to prevent accidental modifications:
flow_system.optimize(solver)
# This would raise an error:
# flow_system.add_elements(new_component) # Locked!
# Call reset() to unlock for modifications
flow_system.reset()
flow_system.add_elements(new_component) # Now works
NetCDF Improvements: - Default compression level 5 for smaller files - overwrite=False parameter to prevent accidental overwrites - Solution data included in FlowSystem NetCDF files - Automatic name assignment from filename
PlotResult Class: All plotting methods return a PlotResult object containing both: - data: An xarray Dataset with the prepared data - figure: A Plotly Figure object
Component color parameter: Components now accept a color parameter for consistent visualization styling.
π₯ Breaking ChangesΒΆ
Renamed OnOffParameters β StatusParameters: Complete terminology update to align with industry standards (PyPSA, unit commitment). Old NetCDF files with OnOffParameters are automatically converted on load.
| Old Term | New Term |
|---|---|
OnOffParameters | StatusParameters |
on_off_parameters | status_parameters |
on variable | status |
switch_on | startup |
switch_off | shutdown |
switch_on_nr | startup_count |
on_hours_total | active_hours |
consecutive_on_hours | uptime |
consecutive_off_hours | downtime |
effects_per_switch_on | effects_per_startup |
effects_per_running_hour | effects_per_active_hour |
consecutive_on_hours_min | min_uptime |
consecutive_on_hours_max | max_uptime |
consecutive_off_hours_min | min_downtime |
consecutive_off_hours_max | max_downtime |
switch_on_total_max | startup_limit |
force_switch_on | force_startup_tracking |
on_hours_min | active_hours_min |
on_hours_max | active_hours_max |
Bus imbalance terminology and default changed: - excess_penalty_per_flow_hour β imbalance_penalty_per_flow_hour - Default changed from 1e5 to None (strict balance) - with_excess β allows_imbalance - excess_input β virtual_supply - excess_output β virtual_demand
Storage charge_state changes: - charge_state no longer has an extra timestep - Final charge state is now a separate variable: charge_state|final
Effect.description now defaults to '' (empty string) instead of None.
Stricter I/O: NetCDF loading is stricter to prevent silent errors. Missing or corrupted data now raises explicit errors.
Validation: Component with status_parameters now validates that all flows have sizes (required for big-M constraints).
β»οΈ ChangedΒΆ
- Renamed
BusModel.excess_inputβvirtual_supplyandBusModel.excess_outputβvirtual_demandfor clearer semantics - Renamed
Bus.excess_penalty_per_flow_hourβimbalance_penalty_per_flow_hour - Renamed
Bus.with_excessβallows_imbalance
ποΈ DeprecatedΒΆ
All deprecated items will be removed in v6.0.0.
Old Optimization Workflow - Use FlowSystem methods instead:
# Old (deprecated, still works with warning)
optimization = fx.Optimization('model', flow_system)
optimization.do_modeling()
optimization.solve(solver)
results = optimization.results
costs = results.model['costs'].solution.item()
# New (recommended)
flow_system.optimize(solver)
costs = flow_system.solution['costs'].item()
Classes deprecated: - Optimization β Use flow_system.optimize(solver) - ClusteredOptimization β Use flow_system.transform.cluster() then optimize() - SegmentedOptimization β Use flow_system.optimize.rolling_horizon() - Results β Use flow_system.solution and flow_system.statistics - SegmentedResults β Use segment FlowSystems directly
FlowSystem methods deprecated: - flow_system.sel() β Use flow_system.transform.sel() - flow_system.isel() β Use flow_system.transform.isel() - flow_system.resample() β Use flow_system.transform.resample() - flow_system.plot_network() β Use flow_system.topology.plot_network() - flow_system.start_network_app() β Use flow_system.topology.start_network_app() - flow_system.stop_network_app() β Use flow_system.topology.stop_network_app() - flow_system.network_infos() β Use flow_system.topology.network_infos()
Results methods deprecated: - results.flow_rates() β Use flow_system.statistics.flow_rates - results.flow_hours() β Use flow_system.statistics.flow_hours
Migration helpers (temporary, also deprecated): - FlowSystem.from_old_results() β For migrating old result files - Results.convert_to_flow_system() β For converting Results objects
Plotting parameters deprecated: - indexer parameter β Use select instead - heatmap_timeframes parameter β Use reshape_time=(timeframes, timesteps_per_frame) instead - heatmap_timesteps_per_frame parameter β Use reshape_time=(timeframes, timesteps_per_frame) instead - color_map parameter β Use colors instead
π₯ RemovedΒΆ
Python version changes: - Dropped Python 3.10 support - Added Python 3.14 support
Classes removed (already renamed/deprecated in v4.x): - OnOffParameters β Use StatusParameters - Calculation β Use Optimization (deprecated) or flow_system.optimize() (recommended) - FullCalculation β Use Optimization (deprecated) or flow_system.optimize() (recommended) - AggregatedCalculation β Use ClusteredOptimization (deprecated) or flow_system.transform.cluster() (recommended) - SegmentedCalculation β Use SegmentedOptimization (deprecated) or flow_system.optimize.rolling_horizon() (recommended) - Aggregation β Use Clustering - AggregationParameters β Use ClusteringParameters - AggregationModel β Use ClusteringModel - CalculationResults β Use Results (deprecated) or flow_system.solution (recommended) - SegmentedCalculationResults β Use SegmentedResults (deprecated)
Modules removed: - calculation.py module β Use optimization.py (deprecated) or FlowSystem methods (recommended)
Functions removed: - change_logging_level() β Use CONFIG.Logging.enable_console()
Properties removed: - FlowSystem.all_elements β Use dict-like interface (flow_system['label'], .keys(), .values(), .items()) - FlowSystem.weights β Use scenario_weights
π DocsΒΆ
Comprehensive Tutorial Notebooks - 12 new Jupyter notebooks covering all major use cases:
- 01-Quickstart - Minimal working example
- 02-Heat System - District heating with storage
- 03-Investment Optimization - Optimal equipment sizing
- 04-Operational Constraints - Startup costs, uptime/downtime
- 05-Multi-Carrier System - CHP producing electricity and heat
- 06a-Time-Varying Parameters - Temperature-dependent COP
- 06b-Piecewise Conversion - Load-dependent efficiency
- 06c-Piecewise Effects - Economies of scale
- 07-Scenarios and Periods - Multi-year planning
- 08-Large-Scale Optimization - Resampling and two-stage
- 09-Plotting and Data Access - Visualization guide
- 10-Transmission - Connecting sites with pipelines/cables
New Documentation Pages: - Migration Guide v5 - Step-by-step upgrade instructions - Results & Plotting Guide - Comprehensive plotting documentation - Building Models Guide - Component selection and modeling patterns - FAQ - Common questions and answers - Troubleshooting - Problem diagnosis and solutions
π· DevelopmentΒΆ
New Test Suites: - test_flow_system_locking.py - FlowSystem locking behavior - test_solution_and_plotting.py - Statistics accessor and plotting - test_solution_persistence.py - Solution save/load - test_io_conversion.py - Old file format conversion - test_topology_accessor.py - Network visualization
CI Improvements: - Separate docs build and deploy workflow - Improved test organization with deprecated tests in separate folder
Migration ChecklistΒΆ
The old Optimization/Results workflow still works with deprecation warnings. Migrate at your own pace before v6.0.0.
| Task | Action |
|---|---|
Update OnOffParameters | Rename to StatusParameters with new parameter names (breaking) |
Update on_off_parameters | Rename to status_parameters (breaking) |
| Update Bus excess parameters | Use imbalance_penalty_per_flow_hour (breaking) |
Replace Optimization class | Use flow_system.optimize(solver) (deprecated) |
Replace SegmentedOptimization | Use flow_system.optimize.rolling_horizon(solver, ...) (deprecated) |
Replace Results access | Use flow_system.solution['var_name'] (deprecated) |
| Update transform methods | Use flow_system.transform.sel/isel/resample() (deprecated) |
| Update I/O code | Use to_netcdf() / from_netcdf() on FlowSystem |
| Migrate old result files | Use FlowSystem.from_old_results(folder, name) (temporary helper) |
v4.3.5 29th November 2025ΒΆ
Summary: Fix zenodo again
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
v4.3.4 27th November 2025ΒΆ
Summary: Fix zenodo again
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
v4.3.3 27th November 2025ΒΆ
Summary: Fix zenodo again
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
v4.3.2 27th November 2025ΒΆ
Summary: Fix zenodo
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
v4.3.1 26th November 2025ΒΆ
Summary: Add zenodo for better citations and archiving.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
π DocsΒΆ
- Added Zenodo DOI badge to README.md (placeholder, to be updated after first Zenodo release)
π· DevelopmentΒΆ
- Added Zenodo integration for automatic archival and citation
- Created
.zenodo.jsonfile for Zenodo metadata configuration - Repository now ready for DOI assignment upon next release
v4.3.0 25th November 2025ΒΆ
Summary: Penalty is now a first-class Effect - add penalty contributions anywhere (e.g., effects_per_flow_hour={'Penalty': 2.5}) and optionally define bounds as with any other effect.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
- Penalty as first-class Effect: Users can now add Penalty contributions anywhere effects are used:
- User-definable Penalty: Optionally define custom Penalty with constraints (auto-created if not defined):
β»οΈ ChangedΒΆ
- Penalty is now a standard Effect with temporal/periodic dimensions, and periodic weights in the objective
- Results structure: Penalty now has same structure as other effects in solution Dataset
- Use
results.solution['Penalty']for total penalty value (same as before, but now it's an effect variable) - Access components via
results.solution['Penalty(temporal)']andresults.solution['Penalty(periodic)']if needed
π DocsΒΆ
- Updated mathematical notation for Penalty as Effect
π· DevelopmentΒΆ
- Unified interface: Penalty uses same
add_share_to_effects()as other effects (internal only)
v4.2.0 25th November 2025ΒΆ
Summary: Renamed classes and parameters related to Calculation, Aggregation and Results. Fully backwards compatible
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
overwriteparameter when saving results to file. If True, overwrite existing files.
β»οΈ ChangedΒΆ
- Now creates the Results folder even if parents didnt exist
ποΈ DeprecatedΒΆ
Class and module renaming: - FullCalculation β Optimization - AggregatedCalculation β ClusteredOptimization - SegmentedCalculation β SegmentedOptimization - CalculationResults β Results - SegmentedCalculationResults β SegmentedResults - Aggregation β Clustering - AggregationParameters β ClusteringParameters - AggregationModel β ClusteringModel - Module: calculation.py β optimization.py - Module: aggregation.py β clustering.py
Old names remain available with deprecation warnings (removed in v5.0.0).
π FixedΒΆ
- Fixed
fix_sizes()docstring/implementation inconsistency for optionaldsparameter
π· DevelopmentΒΆ
- Fixed
active_timestepstype annotation to includeNone - Fixed xarray truth-value ambiguity in
main_resultsbuses with excess filter - Added validation for
nr_of_previous_valuesinSegmentedOptimizationto prevent silent indexing bugs
v4.1.4 25th November 2025ΒΆ
Summary: Added file logging encoding to prevent issues
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
π FixedΒΆ
- Issues with windows file system when logging to file due to non ASCII characters
v4.1.3 25th November 2025ΒΆ
Summary: Re-add mistakenly removed method for loading a config from file
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
π FixedΒΆ
- Re-added
CONFIG.load_from_file()method that was accidentally removed
v4.1.2 24th November 2025ΒΆ
Summary:
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
- Exported SUCCESS log level (
SUCCESS_LEVEL) for use withlogger.log(SUCCESS_LEVEL, ...) - Added proper deprecation tests
β»οΈ ChangedΒΆ
- logger coloring improved
π· DevelopmentΒΆ
- Fixed Deprecation warnings in tests
v4.1.1 23rd November 2025ΒΆ
Summary: Finalize preparations for removal of all deprecated parameters in v5.0.0
β¨ AddedΒΆ
- Added missing infos about removal to remaining deprecated parameters and methods
π FixedΒΆ
- Missing release notes of v4.1.0
v4.1.0 21st November 2025ΒΆ
Summary: Logging migrated from loguru to standard Python logging for stability and security. Simpler API with convenient presets.
Migration Required?
Most users: No action needed (silent by default). Methods like CONFIG.exploring(), CONFIG.debug(), etc. continue to work exactly as before. If you customized logging: Simple API update (see migration below). If you used loguru directly: Breaking change (loguru only in v3.6.0-v4.0.0, ~4 days).
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
New logging presets:
New logging methods: - CONFIG.Logging.enable_console(level, colored, stream) - Console output with colors - CONFIG.Logging.enable_file(level, path, max_bytes, backup_count) - File logging with rotation - CONFIG.Logging.disable() - Disable all logging - CONFIG.Logging.set_colors(log_colors) - Customize colors
Enhanced formatting: - Multi-line messages with box borders (ββ, β, ββ) - Exception tracebacks with proper indentation - Timestamps: 2025-11-21 14:30:45.123
π₯ Breaking ChangesΒΆ
Logging migration (edge cases only):
| Old (v3.6.0-v4.0.0) | New (v4.1.0+) |
|---|---|
CONFIG.Logging.level = 'INFO'CONFIG.Logging.console = TrueCONFIG.apply() | CONFIG.Logging.enable_console('INFO')or CONFIG.exploring() |
CONFIG.Logging.file = 'app.log' | CONFIG.Logging.enable_file('INFO', 'app.log') |
logger.opt(lazy=True) | Built-in (automatic) |
Migration:
# Before (v3.6.0-v4.0.0)
CONFIG.Logging.level = 'INFO'
CONFIG.Logging.console = True
CONFIG.apply()
# After (v4.1.0+)
CONFIG.Logging.enable_console('INFO') # or CONFIG.exploring()
β»οΈ ChangedΒΆ
- Replaced loguru with Python
logging+ optionalcolorlogfor colors - Configuration immediate (no
CONFIG.apply()needed) - Log format:
[dimmed timestamp] [colored level] β message - Logs to
stdoutby default (configurable) - SUCCESS level preserved (green, level 25)
- Performance: Expensive operations guarded with
logger.isEnabledFor()checks
ποΈ DeprecatedΒΆ
change_logging_level(level)β UseCONFIG.Logging.enable_console(level). Removal in v5.0.0.
π₯ RemovedΒΆ
CONFIG methods/attributes: - CONFIG.apply() β Use helper methods directly - CONFIG.Logging.level, .console, .file β Use enable_console()/enable_file() - CONFIG.Logging.verbose_tracebacks, .rich, .Colors, .date_format, .format, .console_width, .show_path, .show_logger_name β Use standard logging - loguru features (logger.opt(), etc.)
π FixedΒΆ
TypeErrorincheck_bounds()with loguru-style formatting- Exception tracebacks not appearing in custom formatters
- Inconsistent formatting between console and file logs
π SecurityΒΆ
- Removed loguru dependency for reduced supply chain risk
π¦ DependenciesΒΆ
- Removed:
loguru >= 0.7.0 - Added:
colorlog >= 6.8.0, < 7(optional)
π DocsΒΆ
- Preset comparison table in
CONFIG.Loggingdocstring - Color customization examples
- Migration guide with before/after code
v4.0.0 19th November 2025ΒΆ
Summary: This release introduces clearer parameter naming for linear converters and constraints, enhanced period handling with automatic weight computation, and new sum-over-all-periods constraints for multi-period optimization. All deprecated parameter names continue to work with warnings.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ Key FeaturesΒΆ
Sum-over-all-periods constraints: New constraint parameters enable limiting weighted totals across all periods: - Effect: minimum_over_periods and maximum_over_periods - Flow: flow_hours_max_over_periods and flow_hours_min_over_periods
# Per-period: limits apply to EACH period individually
effect = fx.Effect('costs', maximum_total=1000) # β€1000 per period
# Over-periods: limits apply to WEIGHTED SUM across ALL periods
# With periods=[2020, 2030, 2040] (weights: [10, 10, 10] from 10-year intervals)
effect = fx.Effect('costs', maximum_over_periods=25000) # 10Γcostsββββ + 10Γcostsββββ + 10Γcostsββββ β€ 25000
Improved period weight handling: - Period weights now computed automatically from period index (like hours_per_timestep for time) - Weights correctly recalculate when using .sel() or .isel() on periods - Separate tracking of period_weights, scenario_weights, and combined weights
Simplified workflow: - Calculation.solve() now automatically calls do_modeling() if needed
π₯ Breaking ChangesΒΆ
FlowSystem weights parameter renamed:
# Old (v3.x)
fs = FlowSystem(..., weights=np.array([0.3, 0.5, 0.2]))
# New (v4.0)
fs = FlowSystem(..., scenario_weights=np.array([0.3, 0.5, 0.2]))
Note: If you were previously passing period Γ scenario weights to weights, you now need to: 1. Pass only scenario weights to scenario_weights 2. Period weights will be computed automatically from your periods index
ποΈ Deprecated ParametersΒΆ
Linear converters (Boiler, CHP, HeatPump, etc.) - descriptive names replace abbreviations: - Flow: Q_fu β fuel_flow, P_el β electrical_flow, Q_th β thermal_flow, Q_ab β heat_source_flow - Efficiency: eta β thermal_efficiency, eta_th β thermal_efficiency, eta_el β electrical_efficiency, COP β cop (lowercase)
Constraint parameters - removed redundant _total suffix: - Flow: flow_hours_total_max β flow_hours_max, flow_hours_total_min β flow_hours_min - OnOffParameters: on_hours_total_max β on_hours_max, on_hours_total_min β on_hours_min, switch_on_total_max β switch_on_max
Storage: - initial_charge_state="lastValueOfSim" β initial_charge_state="equals_final"
All deprecated names continue working with warnings. They will be removed in v5.0.0.
Additional property deprecations now include removal version: - InvestParameters: fix_effects, specific_effects, divest_effects, piecewise_effects - OnOffParameters: on_hours_total_min, on_hours_total_max, switch_on_total_max - Flow: flow_hours_total_min, flow_hours_total_max
π FixedΒΆ
- Fixed inconsistent boundary checks in linear converters with array-like inputs
π· DevelopmentΒΆ
- Eliminated circular dependencies with two-phase modeling pattern
- Enhanced validation for cross-element references and FlowSystem assignment
- Added helper methods for cleaner data transformation code
- Improved logging and cache invalidation
- Improved argument consistency in internal effect coordinate fitting
v3.6.1 17th November 2025ΒΆ
Summary: Documentation improvements and dependency updates.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
π¦ DependenciesΒΆ
- Updated
astral-sh/uvto v0.9.8 - Updated
mkdocs-git-revision-date-localized-pluginto v1.5.0
π DocsΒΆ
- Improved type specifications in
flixopt/types.pyfor better documentation generation - Fixed minor mkdocs warnings in
flixopt/io.pyandmkdocs.yml
v3.6.0 15th November 2025ΒΆ
Summary: Type system overhaul and migration to loguru for logging. If you are heavily using our logs, this might be breaking!
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
- New type system (
flixopt/types.py):- Introduced dimension-aware type aliases using suffix notation (
_TPS,_PS,_S) to clearly indicate which dimensions data can have - Added
Numeric_TPS,Numeric_PS,Numeric_Sfor numeric data with Time/Period/Scenario dimensions - Added
Bool_TPS,Bool_PS,Bool_Sfor boolean data with dimension support - Added
Effect_TPS,Effect_PS,Effect_Sfor effect dictionaries with dimension support - Added
Scalartype for scalar-only numeric values - Added
NumericOrBoolutility type for internal use - Type system supports scalars, numpy arrays, pandas Series/DataFrames, and xarray DataArrays
- Introduced dimension-aware type aliases using suffix notation (
- Lazy logging evaluation - expensive log operations only execute when log level is active
CONFIG.Logging.verbose_tracebacksoption for detailed debugging with variable values
π₯ Breaking ChangesΒΆ
- Logging framework: Migrated to loguru
- Removed
CONFIG.Loggingparameters:rich,Colors,date_format,format,console_width,show_path,show_logger_name - For advanced formatting, use loguru's API directly after
CONFIG.apply()
- Removed
β»οΈ ChangedΒΆ
- Code structure: Removed
commons.pymodule and moved all imports directly to__init__.pyfor cleaner code organization (no public API changes) - Type handling improvements: Updated internal data handling to work seamlessly with the new type system
π FixedΒΆ
- Fixed
ShareAllocationModelinconsistency where None/inf conversion happened in__init__instead of during modeling, which could cause issues with parameter validation - Fixed numerous type hint inconsistencies across the codebase
π¦ DependenciesΒΆ
- Updated
mkdocs-materialto v9.6.23 - Replaced
rich >= 13.0.0withloguru >= 0.7.0for logging
π DocsΒΆ
- Enhanced documentation in
flixopt/types.pywith comprehensive examples and dimension explanation table - Clarified Effect type docstrings - Effect types are dicts, but single numeric values work through union types
- Added clarifying comments in
effects.pyexplaining parameter handling and transformation - Improved OnOffParameters attribute documentation
- Updated getting-started guide with loguru examples
- Updated
config.pydocstrings for loguru integration
π· DevelopmentΒΆ
- Added test for FlowSystem resampling
v3.5.0 6th November 2025ΒΆ
Summary: Improve representations and improve resampling
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
- Added options to resample and select subsets of flowsystems without converting to and from Dataset each time. Use the new methods
FlowSystem.__dataset_resample(),FlowSystem.__dataset_sel()andFlowSystem.__dataset_isel(). All of them expect and return a dataset.
π₯ Breaking ChangesΒΆ
β»οΈ ChangedΒΆ
- Truncate repr of FlowSystem and CalculationResults to only show the first 10 items of each category
- Greatly sped up the resampling of a FlowSystem again
v3.4.1 4th November 2025ΒΆ
Summary: Speed up resampling by 20-40 times.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β»οΈ ChangedΒΆ
- Greatly sped up the resampling of a FlowSystem (x20 - x40) by converting to dataarray internally
v3.4.0 1st November 2025ΒΆ
Summary: Enhanced solver configuration with new CONFIG.Solving section for centralized solver parameter management.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
Solver configuration: - New CONFIG.Solving configuration section for centralized solver parameter management: - mip_gap: Default MIP gap tolerance for solver convergence (default: 0.01) - time_limit_seconds: Default time limit in seconds for solver runs (default: 300) - log_to_console: Whether solver should output to console (default: True) - log_main_results: Whether to log main results after solving (default: True) - Solvers (HighsSolver, GurobiSolver) now use CONFIG.Solving defaults for parameters, allowing global configuration - Solver parameters can still be explicitly overridden when creating solver instances - New log_to_console parameter in all Solver classes
β»οΈ ChangedΒΆ
- Individual solver output is now hidden in SegmentedCalculation. To return to the prior behaviour, set
show_individual_solves=Trueindo_modeling_and_solve().
π FixedΒΆ
- New compacted list representation for periods and scenarios also in results log and console print
π DocsΒΆ
- Unified contributing guides in docs and on github
π· DevelopmentΒΆ
- Added type hints for submodel in all Interface classes
v3.3.1 30th October 2025ΒΆ
Summary: Small Bugfix and improving readability
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β»οΈ ChangedΒΆ
- Improved
summary.yamlto use a compacted list representation for periods and scenarios
π FixedΒΆ
- Using
switch_on_total_maxwith periods or scenarios failed
π DocsΒΆ
- Add more comprehensive
CONTRIBUTE.md - Improve logical structure in User Guide
v3.3.0 30th October 2025ΒΆ
Summary: Better access to Elements stored in the FLowSystem and better representations (repr)
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β»οΈ ChangedΒΆ
Improved repr methods: - Results classes (ComponentResults, BusResults, FlowResults, EffectResults) now show concise header with key metadata followed by xarray Dataset repr - Element classes (Component, Bus, Flow, Effect, Storage) now show one-line summaries with essential information (connections, sizes, capacities, constraints)
Container-based access: - FlowSystem now provides dict-like access patterns for all elements - Use flow_system['element_label'], flow_system.keys(), flow_system.values(), and flow_system.items() for unified element access - Specialized containers (components, buses, effects, flows) offer type-specific access with helpful error messages
ποΈ DeprecatedΒΆ
FlowSystem.all_elementsproperty is deprecated in favor of dict-like interface (flow_system['label'],.keys(),.values(),.items()). Will be removed in v4.0.0.
v3.2.1 29th October 2025ΒΆ
Summary:
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
π FixedΒΆ
- Fixed resampling of FlowSystem to reset
hours_of_last_timestepandhours_of_previous_timestepsproperly
π· DevelopmentΒΆ
- Improved issue templates
v3.2.0 26th October 2025ΒΆ
Summary: Enhanced plotting capabilities with consistent color management, custom plotting kwargs support, and centralized I/O handling.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
β¨ AddedΒΆ
Color management: - setup_colors() method for CalculationResults and SegmentedCalculationResults to configure consistent colors across all plots - Group components by colorscales: results.setup_colors({'CHP': 'reds', 'Storage': 'blues', 'Greys': ['Grid', 'Demand']}) - Automatically propagates to all segments in segmented calculations - Colors persist across all plot calls unless explicitly overridden - Flexible color inputs: Supports colorscale names (e.g., 'turbo', 'plasma'), color lists, or label-to-color dictionaries - Cross-backend compatibility: Seamless color handling for both Plotly and Matplotlib
Plotting customization: - Plotting kwargs support: Pass additional arguments to plotting backends via px_kwargs, plot_kwargs, and backend_kwargs parameters - New CONFIG.Plotting configuration section: - default_show: Control default plot visibility - default_engine: Choose 'plotly' or 'matplotlib' - default_dpi: Set resolution for saved plots - default_facet_cols: Configure default faceting columns - default_sequential_colorscale: Default for heatmaps (now 'turbo') - default_qualitative_colorscale: Default for categorical plots (now 'plotly')
I/O improvements: - Centralized JSON/YAML I/O with auto-format detection - Enhanced NetCDF handling with consistent engine usage - Better numeric formatting in YAML exports
β»οΈ ChangedΒΆ
- Default colorscale: Changed from 'viridis' to 'turbo' for better perceptual uniformity
- Color terminology: Standardized from "colormap" to "colorscale" throughout for Plotly consistency
- Plotting internals: Now use
xr.Datasetas primary data type (DataFrames automatically converted) - NetCDF engine: Switched back to netcdf4 engine following xarray updates and performance benchmarks
π₯ RemovedΒΆ
- Removed unused
plotting.pie_with_plotly()method
π FixedΒΆ
- Improved error messages when using
engine='matplotlib'with multidimensional data - Better dimension validation in
results.plot_heatmap()
π DocsΒΆ
- Enhanced examples demonstrating
setup_colors()usage - Updated terminology from "colormap" to "colorscale" in docstrings
π· DevelopmentΒΆ
- Fixed concurrency issue in CI
- Centralized color processing logic into dedicated module
- Refactored to function-based color handling for simpler API
v3.1.1 20th October 2025ΒΆ
Summary: Fixed a bug when accessing the effects_per_component dataset in results without periodic effects.
If upgrading from v2.x, see the v3.0.0 release notes and Migration Guide.
π FixedΒΆ
- Fixed ValueError in effects_per_component when all periodic effects are scalars/NaN by explicitly creating mode-specific templates (via _create_template_for_mode) with correct dimensions
π· DevelopmentΒΆ
- Converted all remaining numpy style docstrings to google style
v3.1.0 19th October 2025ΒΆ
Summary: This release adds faceting and animation support for multidimensional plots and redesigns the documentation website. Plotting results across scenarios or periods is now significantly simpler (Plotly only).
If upgrading from v2.x, see the Migration Guide and v3.0.0 release notes.
β¨ AddedΒΆ
- Faceting and animation for multidimensional plots: All plotting methods now support
facet_byandanimate_byparameters to create subplot grids and animations from multidimensional data (scenarios, periods, etc.). Plotly only. - Flexible data selection with
selectparameter: Select data using single values, lists, slices, or index arrays for precise control over what gets plotted - Heatmap fill control: New
fillparameter in heatmap methods controls how missing values are filled after reshaping ('ffill'or'bfill') - Smart line styling for mixed variables: Area plots now automatically style variables containing both positive and negative values with dashed lines, while stacking purely positive or negative variables
β»οΈ ChangedΒΆ
- Breaking: Selection behavior: Plotting methods no longer automatically select the first value for non-time dimensions. Use the
selectparameter for explicit selection of scenarios, periods, or other dimensions - Better error messages: Enhanced error messages when using Matplotlib with multidimensional data, with clearer guidance on dimension requirements and suggestions to use Plotly
- Improved examples: Enhanced
scenario_example.pywith better demonstration of new features - Robust validation: Improved dimension validation in
plot_heatmap()with clearer error messages
ποΈ DeprecatedΒΆ
indexerparameter: Use the newselectparameter instead. Theindexerparameter will be removed in v4.0.0heatmap_timeframesandheatmap_timesteps_per_frameparameters: Use the newreshape_time=(timeframes, timesteps_per_frame)parameter instead in heatmap plotting methodscolor_mapparameter: Use the newcolorsparameter instead in heatmap plotting methods
π FixedΒΆ
- Fixed cryptic errors when working with empty buses by adding proper validation
- Added early validation for non-existent periods when using linked periods with tuples
π DocumentationΒΆ
- Redesigned documentation website with custom css
π· DevelopmentΒΆ
- Renamed internal
_apply_indexer_to_data()to_apply_selection_to_data()for consistency with new API naming
v3.0.3 16th October 2025ΒΆ
Summary: Hotfixing new plotting parameter style. Continue to use mode.
Note: If upgrading from v2.x, see the Migration Guide and v3.0.0 release notes.
π FixedΒΆ
- Reverted breaking change from v3.0.0: continue to use
mode parameter in plotting instead of newstyle` - Renamed new
modeparameter in plotting methods tounit_type
π DocsΒΆ
- Updated Migration Guide and added missing entries.
- Improved Changelog of v3.0.0
v3.0.2 15th October 2025ΒΆ
Summary: This is a follow-up release to v3.0.0, improving the documentation.
Note: If upgrading from v2.x, see the Migration Guide and v3.0.0 release notes.
π DocsΒΆ
- Update the Readme
- Add a project roadmap to the docs
- Change Development status to "Production/Stable"
- Regroup parts in docs
v3.0.1 14th October 2025ΒΆ
Summary: This is a follow-up release to v3.0.0, adding a Migration Guide and bugfixing the docs.
Note: If upgrading from v2.x, see the Migration Guide and v3.0.0 release notes.
π DocsΒΆ
- Fixed deployed docs
- Added Migration Guide for flixopt 3
π· DevelopmentΒΆ
- Added missing type hints
v3.0.0 13th October 2025ΒΆ
Summary: This release introduces new model dimensions (periods and scenarios) for multi-period investments and stochastic modeling, along with a redesigned effect sharing system and enhanced I/O capabilities.
Note: If upgrading from v2.x, see the Migration Guide and v3.0.0 release notes.
β¨ AddedΒΆ
New model dimensions:
- Period dimension: Enables multi-period investment modeling with distinct decisions in each period for transformation pathway optimization
- Scenario dimension: Supports stochastic modeling with weighted scenarios for robust decision-making under uncertainty (demand, prices, weather)
- Control variable independence across scenarios via
scenario_independent_sizesandscenario_independent_flow_ratesparameters - By default, investment sizes are shared across scenarios while flow rates vary per scenario
- Control variable independence across scenarios via
Redesigned effect sharing system:
Effects now use intuitive share_from_* syntax that clearly shows contribution sources:
costs = fx.Effect('costs', 'β¬', 'Total costs',
share_from_temporal={'CO2': 0.2}, # From temporal effects
share_from_periodic={'land': 100}) # From periodic effects
This replaces specific_share_to_other_effects_* parameters and inverts the direction for clearer relationships.
Enhanced I/O and data handling:
- NetCDF/JSON serialization for all Interface objects and FlowSystem with round-trip support
- FlowSystem manipulation:
sel(),isel(),resample(),copy(),__eq__()methods - Direct access to FlowSystem from results without manual restoring (lazily loaded)
- New
FlowResultsclass and precomputed DataArrays for sizes/flow_rates/flow_hours effects_per_componentdataset for component impact evaluation, including all indirect effects through effect shares
Other additions:
- Balanced storage - charging and discharging sizes can be forced equal via
balancedparameter - New Storage parameters:
relative_minimum_final_charge_stateandrelative_maximum_final_charge_statefor final state control - Improved filter methods in results
- Example for 2-stage investment decisions leveraging FlowSystem resampling
π₯ Breaking ChangesΒΆ
API and Behavior Changes:
- Effect system redesigned (no deprecation):
- Terminology changes: Effect domains renamed for clarity:
operationβtemporal,invest/investmentβperiodic - Sharing system: The old
specific_share_to_other_effects_*parameters were completely replaced with the newshare_from_temporalandshare_from_periodicsyntax (see π₯ Removed section)
- Terminology changes: Effect domains renamed for clarity:
- FlowSystem independence: FlowSystems cannot be shared across multiple Calculations anymore. A copy of the FlowSystem is created instead, making every Calculation independent. Each Subcalculation in
SegmentedCalculationnow has its own distinctFlowSystemobject - Bus and Effect object assignment: Direct assignment of Bus/Effect objects is no longer supported. Use labels (strings) instead:
Flow.busmust receive a string label, not a Bus object- Effect shares must use effect labels (strings) in dictionaries, not Effect objects
- Logging defaults (from v2.2.0): Console and file logging are now disabled by default. Enable explicitly with
CONFIG.Logging.console = TrueandCONFIG.apply()
Class and Method Renaming:
- Renamed class
SystemModeltoFlowSystemModel - Renamed class
ModeltoSubmodel - Renamed
modeparameter in plotting methods tostyle Calculation.do_modeling()now returns theCalculationobject instead of itslinopy.Model. Callers that previously accessed the linopy model directly should now usecalculation.do_modeling().modelinstead ofcalculation.do_modeling()
Variable Renaming in Results:
- Investment binary variable:
is_investedβinvestedinInvestmentModel - Switch tracking variables in
OnOffModel:switch_onβswitch|onswitch_offβswitch|offswitch_on_nrβswitch|count
- Effect submodel variables (following terminology changes):
Effect(invest)|totalβEffect(periodic)Effect(operation)|totalβEffect(temporal)Effect(operation)|total_per_timestepβEffect(temporal)|per_timestepEffect|totalβEffect
Data Structure Changes:
relative_minimum_charge_stateandrelative_maximum_charge_statedon't have an extra timestep anymore. Use the newrelative_minimum_final_charge_stateandrelative_maximum_final_charge_stateparameters for final state control
β»οΈ ChangedΒΆ
- Type system overhaul - added clear separation between temporal and non-temporal data throughout codebase for better clarity
- Enhanced FlowSystem interface with improved
__repr__()and__str__()methods - Improved Model Structure - Views and organisation is now divided into:
- Model: The main Model (linopy.Model) that is used to create and store the variables and constraints for the FlowSystem.
- Submodel: The base class for all submodels. Each is a subset of the Model, for simpler access and clearer code.
- Made docstrings in
config.pymore compact and easier to read - Improved format handling in configuration module
- Enhanced console output to support both
stdoutandstderrstream selection - Added
show_logger_nameparameter toCONFIG.Loggingfor displaying logger names in messages
ποΈ DeprecatedΒΆ
- The
agg_groupandagg_weightparameters ofTimeSeriesDataare deprecated and will be removed in a future version. Useaggregation_groupandaggregation_weightinstead. - The
active_timestepsparameter ofCalculationis deprecated and will be removed in a future version. Use the newsel(time=...)method on the FlowSystem instead. - InvestParameters parameters renamed for improved clarity around investment and retirement effects:
fix_effectsβeffects_of_investmentspecific_effectsβeffects_of_investment_per_sizedivest_effectsβeffects_of_retirementpiecewise_effectsβpiecewise_effects_of_investment
- Effect parameters renamed:
minimum_investmentβminimum_periodicmaximum_investmentβmaximum_periodicminimum_operationβminimum_temporalmaximum_operationβmaximum_temporalminimum_operation_per_hourβminimum_per_hourmaximum_operation_per_hourβmaximum_per_hour
- Component parameters renamed:
Source.sourceβSource.outputsSink.sinkβSink.inputsSourceAndSink.sourceβSourceAndSink.outputsSourceAndSink.sinkβSourceAndSink.inputsSourceAndSink.prevent_simultaneous_sink_and_sourceβSourceAndSink.prevent_simultaneous_flow_rates
π₯ RemovedΒΆ
- Effect share parameters: The old
specific_share_to_other_effects_*parameters were replaced WITHOUT DEPRECATIONspecific_share_to_other_effects_operationβshare_from_temporal(with inverted direction)specific_share_to_other_effects_investβshare_from_periodic(with inverted direction)
π FixedΒΆ
- Enhanced NetCDF I/O with proper attribute preservation for DataArrays
- Improved error handling and validation in serialization processes
- Better type consistency across all framework components
- Added extra validation in
config.pyto improve error handling
π DocsΒΆ
- Reorganized mathematical notation docs: moved to lowercase
mathematical-notation/with subdirectories (elements/,features/,modeling-patterns/) - Added comprehensive documentation pages:
dimensions.md(time/period/scenario),effects-penalty-objective.md, modeling patterns - Enhanced all element pages with implementation details, cross-references, and "See Also" sections
- Rewrote README and landing page with clearer vision, roadmap, and universal applicability emphasis
- Removed deprecated
docs/SUMMARY.md, updatedmkdocs.ymlfor new structure - Tightened docstrings in core modules with better cross-referencing
- Added recipes section to docs
π§ Known IssuesΒΆ
- IO for single Interfaces/Elements to Datasets might not work properly if the Interface/Element is not part of a fully transformed and connected FlowSystem. This arises from Numeric Data not being stored as xr.DataArray by the user. To avoid this, always use the
to_dataset()on Elements inside a FlowSystem that's connected and transformed.
π· DevelopmentΒΆ
- Centralized deprecation pattern: Added
_handle_deprecated_kwarg()helper method toInterfacebase class that provides reusable deprecation handling with consistent warnings, conflict detection, and optional value transformation. Applied across 5 classes (InvestParameters, Source, Sink, SourceAndSink, Effect) reducing deprecation boilerplate by 72%. - FlowSystem data management simplified - removed
time_series_collectionpattern in favor of direct timestep properties - Change modeling hierarchy to allow for more flexibility in future development. This leads to minimal changes in the access and creation of Submodels and their variables.
- Added new module
.modelingthat contains modeling primitives and utilities - Clearer separation between the main Model and "Submodels"
- Improved access to the Submodels and their variables, constraints and submodels
- Added
__repr__()for Submodels to easily inspect its content - Enhanced data handling methods
fit_to_model_coords()method for data alignmentfit_effects_to_model_coords()method for effect data processingconnect_and_transform()method replacing several operations
- Testing improvements: Eliminated warnings during test execution
- Updated deprecated code patterns in tests and examples (e.g.,
sink/sourceβinputs/outputs,'H'β'h'frequency) - Refactored plotting logic to handle test environments explicitly with non-interactive backends
- Added comprehensive warning filters in
__init__.pyandpyproject.tomlto suppress third-party library warnings - Improved test fixtures with proper figure cleanup to prevent memory leaks
- Enhanced backend detection and handling in
plotting.pyfor both Matplotlib and Plotly - Always run dependent tests in order
- Updated deprecated code patterns in tests and examples (e.g.,
v2.2.0 11th October 2025ΒΆ
Summary: This release is a Configuration and Logging management release.
β¨ AddedΒΆ
- Added
CONFIG.reset()method to restore configuration to default values - Added configurable log file rotation settings:
CONFIG.Logging.max_file_sizeandCONFIG.Logging.backup_count - Added configurable log format settings:
CONFIG.Logging.date_formatandCONFIG.Logging.format - Added configurable console settings:
CONFIG.Logging.console_widthandCONFIG.Logging.show_path - Added
CONFIG.Logging.Colorsnested class for customizable log level colors using ANSI escape codes (works with both standard and Rich handlers) - All examples now enable console logging to demonstrate proper logging usage
- Console logging now outputs to
sys.stdoutinstead ofsys.stderrfor better compatibility with output redirection
π₯ Breaking ChangesΒΆ
- Console logging is now disabled by default (
CONFIG.Logging.console = False). Enable it explicitly in your scripts withCONFIG.Logging.console = TrueandCONFIG.apply() - File logging is now disabled by default (
CONFIG.Logging.file = None). Set a file path to enable file logging
β»οΈ ChangedΒΆ
- Logging and Configuration management changed
- Improved default logging colors: DEBUG is now gray (
\033[90m) for de-emphasized messages, INFO uses terminal default color (\033[0m) for clean output
ποΈ DeprecatedΒΆ
change_logging_level()function is now deprecated in favor ofCONFIG.Logging.levelandCONFIG.apply(). Will be removed in version 3.0.0.
π₯ RemovedΒΆ
- Removed unused
config.merge_configsfunction from configuration module
π· DevelopmentΒΆ
- Greatly expanded test coverage for
config.pymodule - Added
@pytest.mark.xdist_grouptoTestConfigModuletests to prevent global config interference
v2.1.11 5th October 2025ΒΆ
Summary: Important bugfix in Storage leading to wrong results due to incorrect discharge losses.
β»οΈ ChangedΒΆ
- Using
h5netcdfinstead ofnetCDF4for dataset I/O operations. This follows the update inxarray==2025.09.01
π FixedΒΆ
- Fix
charge_stateConstraint inStorageleading to incorrect losses in discharge and therefore incorrect charge states and discharge values.
π¦ DependenciesΒΆ
- Updated
renovate.configto treat CalVer packages (xarray and dask) with more care - Updated packaging configuration
v2.1.10 29th September 2025ΒΆ
Summary: This release is a Documentation and Development release.
π DocsΒΆ
- Improved CHANGELOG.md formatting by adding better categories and formating by Gitmoji.
- Added a script to extract the release notes from the CHANGELOG.md file for better organized documentation.
π· DevelopmentΒΆ
- Improved
renovate.config - Sped up CI by not running examples in every run and using
pytest-xdist
v2.1.9 23rd September 2025ΒΆ
Summary: Small bugfix release addressing network visualization error handling.
π FixedΒΆ
- Fix error handling in network visualization if
networkxis not installed
v2.1.8 22nd September 2025ΒΆ
Summary: Code quality improvements, enhanced documentation, and bug fixes for heat pump components and visualization features.
β¨ AddedΒΆ
- Extra Check for HeatPumpWithSource.COP to be strictly > 1 to avoid division by zero
- Apply deterministic color assignment by using sorted() in
plotting.py - Add missing args in docstrings in
plotting.py,solvers.py, andcore.py.
β»οΈ ChangedΒΆ
- Greatly improved docstrings and documentation of all public classes
- Make path handling to be gentle about missing .html suffix in
plotting.py - Default for
relative_lossesinTransmissionis now 0 instead of None - Setter of COP in
HeatPumpWithSourcenow completely overwrites the conversion factors, which is safer. - Fix some docstrings in plotting.py
- Change assertions to raise Exceptions in
plotting.py
π FixedΒΆ
Core Components: - Fix COP getter and setter of HeatPumpWithSource returning and setting wrong conversion factors - Fix custom compression levels in io.save_dataset_to_netcdf - Fix total_max did not work when total min was not used
Visualization: - Fix color scheme selection in network_app; color pickers now update when a scheme is selected
π DocsΒΆ
- Fix broken links in docs
- Fix some docstrings in plotting.py
π· DevelopmentΒΆ
- Pin dev dependencies to specific versions
- Improve CI workflows to run faster and smarter
v2.1.7 13th September 2025ΒΆ
Summary: Maintenance release to improve Code Quality, CI and update the dependencies. There are no changes or new features.
β¨ AddedΒΆ
- Added
__version__to flixopt
π· DevelopmentΒΆ
- ruff format the whole Codebase
- Added renovate config
- Added pre-commit
- lint and format in CI
- improved CI
- Updated Dependencies
- Updated Issue Templates
v2.1.6 2nd September 2025ΒΆ
Summary: Enhanced Sink/Source components with multi-flow support and new interactive network visualization.
β¨ AddedΒΆ
- Network Visualization: Added
FlowSystem.start_network_app()andFlowSystem.stop_network_app()to easily visualize the network structure of a flow system in an interactive Dash web app- Note: This is still experimental and might change in the future
β»οΈ ChangedΒΆ
- Multi-Flow Support:
Sink,Source, andSourceAndSinknow accept multipleflowsasinputsandoutputsinstead of just one. This enables modeling more use cases with these classes - Flow Control: Both
SinkandSourcenow have aprevent_simultaneous_flow_ratesargument to prevent simultaneous flow rates of more than one of their flows
ποΈ DeprecatedΒΆ
- For the classes
Sink,SourceandSourceAndSink:.sink,.sourceand.prevent_simultaneous_sink_and_sourceare deprecated in favor of the new argumentsinputs,outputsandprevent_simultaneous_flow_rates
π FixedΒΆ
- Fixed testing issue with new
linopyversion 0.5.6
π· DevelopmentΒΆ
- Added dependency "nbformat>=4.2.0" to dev dependencies to resolve issue with plotly CI
v2.1.5 8th July 2025ΒΆ
π FixedΒΆ
- Fixed Docs deployment
v2.1.4 8th July 2025ΒΆ
π FixedΒΆ
- Fixing release notes of 2.1.3, as well as documentation build.
v2.1.3 8th July 2025ΒΆ
π FixedΒΆ
- Using
Effect.maximum_operation_per_hourraised an error, needing an extra timestep. This has been fixed thanks to @PRse4.
v2.1.2 14th June 2025ΒΆ
π FixedΒΆ
- Storage losses per hour were not calculated correctly, as mentioned by @brokenwings01. This might have led to issues when modeling large losses and long timesteps.
- Old implementation: \(c(\text{t}_{i}) \cdot (1-\dot{\text{c}}_\text{rel,loss}(\text{t}_i)) \cdot \Delta \text{t}_{i}\)
- Correct implementation: \(c(\text{t}_{i}) \cdot (1-\dot{\text{c}}_\text{rel,loss}(\text{t}_i)) ^{\Delta \text{t}_{i}}\)
π§ Known IssuesΒΆ
- Just to mention: Plotly >= 6 may raise errors if "nbformat" is not installed. We pinned plotly to <6, but this may be fixed in the future.
v2.1.1 8th May 2025ΒΆ
β»οΈ ChangedΒΆ
- Improved docstring and tests
π FixedΒΆ
- Fixed bug in the
_ElementResults.constraintsnot returning the constraints but rather the variables
v2.1.0 11th April 2025ΒΆ
β¨ AddedΒΆ
- Python 3.13 support added
- Logger warning if relative_minimum is used without on_off_parameters in Flow
- Greatly improved internal testing infrastructure by leveraging linopy's testing framework
π₯ Breaking ChangesΒΆ
- Restructured the modeling of the On/Off state of Flows or Components
- Variable renaming:
...|consecutive_on_hoursβ...|ConsecutiveOn|hours - Variable renaming:
...|consecutive_off_hoursβ...|ConsecutiveOff|hours - Constraint renaming:
...|consecutive_on_hours_con1β...|ConsecutiveOn|con1 - Similar pattern for all consecutive on/off constraints
- Variable renaming:
π FixedΒΆ
- Fixed the lower bound of
flow_ratewhen using optional investments without OnOffParameters - Fixed bug that prevented divest effects from working
- Added lower bounds of 0 to two unbounded vars (numerical improvement)
v2.0.1 10th April 2025ΒΆ
β¨ AddedΒΆ
- Logger warning if relative_minimum is used without on_off_parameters in Flow
π FixedΒΆ
- Replace "|" with "__" in filenames when saving figures (Windows compatibility)
- Fixed bug that prevented the load factor from working without InvestmentParameters
v2.0.0 29th March 2025ΒΆ
Summary: π₯ MAJOR RELEASE - Complete framework migration from Pyomo to Linopy with redesigned architecture.
β¨ AddedΒΆ
Model Capabilities: - Full model serialization support - save and restore unsolved Models - Enhanced model documentation with YAML export containing human-readable mathematical formulations - Extend flixopt models with native linopy language support - Full Model Export/Import capabilities via linopy.Model
Results & Data: - Unified solution exploration through Calculation.results attribute - Compression support for result files - to_netcdf/from_netcdf methods for FlowSystem and core components - xarray integration for TimeSeries with improved datatypes support
π₯ Breaking ChangesΒΆ
Framework Migration: - Optimization Engine: Complete migration from Pyomo to Linopy optimization framework - Package Import: Framework renamed from flixOpt to flixopt (import flixopt as fx) - Data Architecture: Redesigned data handling to rely on xarray.Dataset throughout the package - Results System: Results handling completely redesigned with new CalculationResults class
Variable Structure: - Restructured the modeling of the On/Off state of Flows or Components - Variable renaming: ...|consecutive_on_hours β ...|ConsecutiveOn|hours - Variable renaming: ...|consecutive_off_hours β ...|ConsecutiveOff|hours - Constraint renaming: ...|consecutive_on_hours_con1 β ...|ConsecutiveOn|con1 - Similar pattern for all consecutive on/off constraints
π₯ RemovedΒΆ
- Pyomo dependency (replaced by linopy)
- Period concepts in time management (simplified to timesteps)
π FixedΒΆ
- Improved infeasible model detection and reporting
- Enhanced time series management and serialization
- Reduced file size through improved compression
π DocsΒΆ
- Google Style Docstrings throughout the codebase