Skip to content
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6d9bcca
Removing all deprectaed params and warnings
FBumann Nov 19, 2025
d4a2e74
Update tests
FBumann Nov 19, 2025
2c6d923
Update CHANGELOG.md to mention removed params
FBumann Nov 19, 2025
96d830f
Merge remote-tracking branch 'origin/main' into feature/v5
FBumann Nov 21, 2025
756ccda
Merge branch 'main' into feature/v5
FBumann Nov 30, 2025
a8612b0
Merge branch 'main' into feature/v5
FBumann Nov 30, 2025
4ca07f6
Merge branch 'main' into feature/v5
FBumann Nov 30, 2025
6fe49c8
ci: improve and split into multiple files
FBumann Nov 30, 2025
30c4a68
Feature/rename on off to status (#500)
FBumann Nov 30, 2025
60a3e65
Removed all deprecated items
FBumann Nov 30, 2025
5fd9ff5
Feature/excess rename (#501)
FBumann Nov 30, 2025
dbc0a78
Feature/docs improvement (#481)
FBumann Nov 30, 2025
d0514fc
deprecate results.py and plotting.py and change to storing the soluti…
FBumann Dec 3, 2025
9f9effb
Add migration guide for v6
FBumann Dec 4, 2025
d1198e1
Add plotting and statistics tests
FBumann Dec 4, 2025
e6da589
1. tests/test_component.py - Fixed tautological assertions in both …
FBumann Dec 4, 2025
2cb7a4f
break: remove final timestep from charge_state and extract into separ…
FBumann Dec 4, 2025
58ce446
Add accessors for plotting, statistics and more (#506)
FBumann Dec 8, 2025
94db61d
Add carrier and color management
FBumann Dec 8, 2025
0d8aaff
Add transform accessor and move sel, isel and resample to this access…
FBumann Dec 8, 2025
1601cac
Add recipies for plotting data (#516)
FBumann Dec 9, 2025
9faf98b
Invalidate and lock FLow system based on solution existance (#518)
FBumann Dec 9, 2025
62aac69
Add better and more versitile sankey diagrams (#514)
FBumann Dec 9, 2025
32e751b
Update tests for new plot method
FBumann Dec 9, 2025
5d32ae9
Extract docs build and deploy into separate workflow (#520)
FBumann Dec 10, 2025
b0202b9
fix: docs build CI
FBumann Dec 10, 2025
92fede1
Minor nitpicks
FBumann Dec 10, 2025
75c0aed
revert: solution always having an extra timestep (#523)
FBumann Dec 10, 2025
f3dc1e1
Add new user facing notebooks with better user stories (#515)
FBumann Dec 10, 2025
89d0aa2
Change default of Effect.description to ''
FBumann Dec 11, 2025
ae7f0b0
Improve backwards compatability and allow saving the solution directly
FBumann Dec 11, 2025
b26540b
Make IO more strict to prevent silent errors.
FBumann Dec 11, 2025
59024bc
Add deprecation warning for method for old results
FBumann Dec 11, 2025
3fe1a44
Adjust notebook config to plotly_white theme
FBumann Dec 12, 2025
f7beae9
Add default compression to netcdf filesand overwrite=False
FBumann Dec 12, 2025
79a2484
Refactor sankey plots into separate accessor and improve selection of…
FBumann Dec 12, 2025
9150212
Improve carrier, and color handling as well as caching of those
FBumann Dec 12, 2025
446f2aa
Improve validation of size being present
FBumann Dec 12, 2025
2c2ace1
Better notebooks and units in plots (#527)
FBumann Dec 13, 2025
400796c
Update CHANGELOG.md
FBumann Dec 13, 2025
ac595bc
minor nitpicks
FBumann Dec 13, 2025
6597916
Updated CHangelog and migration guide
FBumann Dec 13, 2025
baed6db
optimize.rolling_horizon() (#528)
FBumann Dec 13, 2025
70f670c
Typo in CHANGELOG.md
FBumann Dec 13, 2025
3bcd81a
Add storage cache
FBumann Dec 13, 2025
3981c3c
invaliudate carrier cache
FBumann Dec 13, 2025
4133f91
Improve robustness
FBumann Dec 13, 2025
68992eb
Added include_solution parameter to to_dataset()
FBumann Dec 13, 2025
002a337
Add flixopt_version to attrs in IO
FBumann Dec 13, 2025
5d17f9a
Typos for better clarity
FBumann Dec 13, 2025
78969bd
drop python 3.10 support and add 3.14 (#529)
FBumann Dec 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Docs

on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'flixopt/**'
pull_request:
paths:
- 'docs/**'
- 'mkdocs.yml'
workflow_dispatch:
workflow_call:
inputs:
deploy:
type: boolean
default: false
version:
type: string
required: false

Comment thread
coderabbitai[bot] marked this conversation as resolved.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHON_VERSION: "3.11"
MPLBACKEND: Agg
PLOTLY_RENDERER: json

jobs:
build:
name: Build documentation
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: astral-sh/setup-uv@v6
with:
version: "0.9.10"
enable-cache: true

Comment thread
coderabbitai[bot] marked this conversation as resolved.
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Extract changelog
run: |
cp CHANGELOG.md docs/changelog.md
python scripts/format_changelog.py

- name: Install dependencies
run: uv pip install --system ".[docs,full]"

- name: Build docs
run: mkdocs build --strict

- uses: actions/upload-artifact@v4
with:
name: docs
path: site/
retention-days: 7

deploy:
name: Deploy documentation
needs: build
if: ${{ inputs.deploy == true }}
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: astral-sh/setup-uv@v6
with:
version: "0.9.10"
enable-cache: true

- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install mike
run: uv pip install --system mike

- uses: actions/download-artifact@v4
with:
name: docs
path: site/

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Deploy docs
run: |
VERSION=${{ inputs.version }}
VERSION=${VERSION#v}
mike deploy --push --update-aliases --no-build $VERSION latest
mike set-default --push latest
40 changes: 5 additions & 35 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
name: Run tests
needs: [check-preparation]
if: needs.check-preparation.outputs.prepared == 'true'
uses: ./.github/workflows/test.yaml
uses: ./.github/workflows/tests.yaml

build:
name: Build package
Expand Down Expand Up @@ -188,37 +188,7 @@ jobs:
name: Deploy documentation
needs: [create-release]
if: "!contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc')"
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: astral-sh/setup-uv@v6
with:
version: "0.9.10"

- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Extract changelog
run: |
uv pip install --system packaging
python scripts/extract_changelog.py

- name: Install docs dependencies
run: uv pip install --system ".[docs]"

- name: Configure Git
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

- name: Deploy docs
run: |
VERSION=${GITHUB_REF#refs/tags/v}
mike deploy --push --update-aliases $VERSION latest
mike set-default --push latest
uses: ./.github/workflows/docs.yaml
with:
deploy: true
version: ${{ github.ref_name }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml → .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches: [main]
pull_request:
branches: ["*"]
branches: ["**"]
workflow_dispatch:
workflow_call: # Allow release.yaml to call this workflow
workflow_call: # Allow release.yaml to call this workflow.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ venv/
.DS_Store
lib/
temp-plot.html
.cache
site/
*.egg-info
uv.lock
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ repos:
- id: check-yaml
exclude: ^mkdocs\.yml$ # Skip mkdocs.yml
- id: check-added-large-files
exclude: ^examples/resources/Zeitreihen2020\.csv$
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.4
hooks:
- id: ruff-check
args: [ --fix ]
- id: ruff-format
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
files: ^docs/examples.*\.ipynb$
169 changes: 154 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This contains all commits, PRs, and contributors.
Therefore, the Changelog should focus on the user-facing changes.

Please remove all irrelevant sections before releasing.
Please keep the format of the changelog consistent with the other releases, so the extraction for mkdocs works.
Please keep the format of the changelog consistent: ## [VERSION] - YYYY-MM-DD
---

## [Template] - ????-??-??
Expand Down Expand Up @@ -49,38 +49,177 @@ If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOp

---

## [Unreleased] - ????-??-??
Until here -->

**Summary**:
## [Upcoming]

If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0) and [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/).

### ✨ Added
**Summary**: Renamed OnOff terminology to Status terminology for better alignment with PyPSA and unit commitment standards. **All deprecated items from v4.x have been removed.**

### 💥 Breaking Changes

**Renamed `OnOffParameters` → `StatusParameters`**: Complete terminology update to align with industry standards (PyPSA, unit commitment). This is a clean breaking change with no backwards compatibility wrapper.

**Class and Constructor Parameters:**

| Category | Old Name (OnOffParameters) | New Name (StatusParameters) | Notes |
|----------|---------------------------|----------------------------|-------|
| **Class** | `OnOffParameters` | `StatusParameters` | Main class renamed |
| **Constructor** | `on_variable` | `status` | Model variable parameter |
| **Constructor** | `previous_states` | `previous_status` | Initial state parameter |
| **Parameter** | `effects_per_switch_on` | `effects_per_startup` | Startup costs/impacts |
| **Parameter** | `effects_per_running_hour` | `effects_per_active_hour` | Operating costs/impacts |
| **Parameter** | `on_hours_total_min` | `active_hours_min` | Minimum total operating hours |
| **Parameter** | `on_hours_total_max` | `active_hours_max` | Maximum total operating hours |
| **Parameter** | `consecutive_on_hours_min` | `min_uptime` | UC standard terminology |
| **Parameter** | `consecutive_on_hours_max` | `max_uptime` | UC standard terminology |
| **Parameter** | `consecutive_off_hours_min` | `min_downtime` | UC standard terminology |
| **Parameter** | `consecutive_off_hours_max` | `max_downtime` | UC standard terminology |
| **Parameter** | `switch_on_total_max` | `startup_limit` | Maximum number of startups |
| **Parameter** | `force_switch_on` | `force_startup_tracking` | Force creation of startup variables |

**Model Classes and Variables:**

| Category | Old Name (OnOffModel) | New Name (StatusModel) | Notes |
|----------|----------------------|------------------------|-------|
| **Model Class** | `OnOffModel` | `StatusModel` | Feature model class |
| **Variable** | `on` | `status` | Main binary state variable |
| **Variable** | `switch_on` | `startup` | Startup event variable |
| **Variable** | `switch_off` | `shutdown` | Shutdown event variable |
| **Variable** | `switch_on_nr` | `startup_count` | Cumulative startup counter |
| **Variable** | `on_hours_total` | `active_hours` | Total operating hours |
| **Variable** | `consecutive_on_hours` | `uptime` | Consecutive active hours |
| **Variable** | `consecutive_off_hours` | `downtime` | Consecutive inactive hours |
| **Variable** | `off` | `inactive` | Deprecated - use `1 - status` instead |

**Flow and Component API:**

| Category | Old Name | New Name | Location |
|----------|----------|----------|----------|
| **Parameter** | `on_off_parameters` | `status_parameters` | `Flow.__init__()` |
| **Parameter** | `on_off_parameters` | `status_parameters` | `Component.__init__()` |
| **Property** | `flow.submodel.on_off` | `flow.submodel.status` | Flow submodel access |
| **Property** | `component.submodel.on_off` | `component.submodel.status` | Component submodel access |

**Internal Properties:**

| Old Name | New Name |
|----------|----------|
| `use_switch_on` | `use_startup_tracking` |
| `use_consecutive_on_hours` | `use_uptime_tracking` |
| `use_consecutive_off_hours` | `use_downtime_tracking` |
| `with_on_off` | `with_status` |
| `previous_states` | `previous_status` |

**Migration Guide**:

Use find-and-replace to update your code with the mappings above. The functionality is identical - only naming has changed.

**Important**: This is a complete renaming with no backwards compatibility. The change affects:
- Constructor parameter names
- Model variable names and property access
- Results access patterns

A partial backwards compatibility wrapper would be misleading, so we opted for a clean breaking change.

- `Bus.imbalance_penalty_per_flow_hour` now defaults to `None` (strict balance) instead of `1e5`

### ♻️ Changed

- Renamed `BusModel.excess_input` → `virtual_supply` and `BusModel.excess_output` → `virtual_demand` for clearer semantics
- Renamed `Bus.excess_penalty_per_flow_hour` → `imbalance_penalty_per_flow_hour`
- Renamed `Bus.with_excess` → `allows_imbalance`

### 🗑️ Deprecated

### 🔥 Removed
- `Bus.excess_penalty_per_flow_hour` → use `imbalance_penalty_per_flow_hour`

### 🐛 Fixed
### 🔥 Removed

### 🔒 Security
**Modules removed:**
- `calculation.py` module - Use `optimization.py` instead

**Classes removed:**
- `Calculation`, `FullCalculation` → Use `Optimization`
- `AggregatedCalculation` → Use `ClusteredOptimization`
- `SegmentedCalculation` → Use `SegmentedOptimization`
- `Aggregation` → Use `Clustering`
- `AggregationParameters` → Use `ClusteringParameters`
- `AggregationModel` → Use `ClusteringModel`
- `CalculationResults` → Use `Results`
- `SegmentedCalculationResults` → Use `SegmentedResults`

**Functions removed:**
- `change_logging_level()` → Use `CONFIG.Logging.enable_console()`

**Methods removed:**
- `Optimization._perform_aggregation()` → Use `_perform_clustering()`
- `Optimization.calculate_aggregation_weights()` → Use `calculate_clustering_weights()`

**Parameters removed:**
- `Optimization.active_timesteps` → Use `flow_system.sel(time=...)` or `flow_system.isel(time=...)`
- `TimeSeriesData.from_dataarray()`: `aggregation_group` → Use `clustering_group`
- `TimeSeriesData.from_dataarray()`: `aggregation_weight` → Use `clustering_weight`
- `FlowSystem.weights` → Use `scenario_weights`
- `Results.__init__()`: `flow_system` → Use `flow_system_data`
- `Results` plotting methods: `indexer` → Use `select`
- `Results.plot_heatmap()`: `heatmap_timeframes`, `heatmap_timesteps_per_frame` → Use `reshape_time`
- `Results.plot_heatmap()`: `color_map` → Use `colors`

**Properties removed:**
- `FlowSystem.all_elements` → Use dict-like interface (`flow_system['label']`, `.keys()`, `.values()`, `.items()`)
- `FlowSystem.weights` → Use `scenario_weights`

**Features removed:**
- Passing `Bus` objects directly to `Flow` → Pass bus label string instead and add Bus to FlowSystem
- Using `Effect` objects in `EffectValues` → Use effect label strings instead

**Deprecated parameters removed** (all were deprecated in v4.0.0 or earlier):

**TimeSeriesData:**
- `agg_group` → use `aggregation_group`
- `agg_weight` → use `aggregation_weight`
- Properties: `agg_group`, `agg_weight`

**Effect:**
- Constructor parameters: `minimum_operation` → use `minimum_temporal`, `maximum_operation` → use `maximum_temporal`, `minimum_invest` → use `minimum_periodic`, `maximum_invest` → use `maximum_periodic`, `minimum_operation_per_hour` → use `minimum_per_hour`, `maximum_operation_per_hour` → use `maximum_per_hour`
- Properties: `minimum_operation`, `maximum_operation`, `minimum_invest`, `maximum_invest`, `minimum_operation_per_hour`, `maximum_operation_per_hour`, `minimum_total_per_period`, `maximum_total_per_period`

**Flow:**
- Constructor parameters: `flow_hours_per_period_max` → use `flow_hours_max`, `flow_hours_per_period_min` → use `flow_hours_min`, `flow_hours_total_max` → use `flow_hours_max`, `flow_hours_total_min` → use `flow_hours_min`, `total_flow_hours_max` → use `flow_hours_max_over_periods`, `total_flow_hours_min` → use `flow_hours_min_over_periods`
- Properties: `flow_hours_total_max`, `flow_hours_total_min`

**InvestParameters:**
- Constructor parameters: `fix_effects` → use `effects_of_investment`, `specific_effects` → use `effects_of_investment_per_size`, `divest_effects` → use `effects_of_retirement`, `piecewise_effects` → use `piecewise_effects_of_investment`, `optional` → use `mandatory` (with inverted logic)
- Properties: `optional`, `fix_effects`, `specific_effects`, `divest_effects`, `piecewise_effects`

**OnOffParameters:**
- Constructor parameters: `on_hours_total_min` → use `on_hours_min`, `on_hours_total_max` → use `on_hours_max`, `switch_on_total_max` → use `switch_on_max`

**Storage:**
- `initial_charge_state="lastValueOfSim"` → use `initial_charge_state="equals_final"`

**Source, Sink, SourceAndSink:**
- Constructor parameters:
- Source: `source` → use `outputs`
- Sink: `sink` → use `inputs`
- SourceAndSink: `source` → use `outputs`, `sink` → use `inputs`, `prevent_simultaneous_sink_and_source` → use `prevent_simultaneous_flow_rates`
- Properties:
- Source: `source` property
- Sink: `sink` property
- SourceAndSink: `source`, `sink`, `prevent_simultaneous_sink_and_source` properties

**Linear Converters** (Boiler, CHP, HeatPump, etc.):
- Flow parameters: `Q_fu` → use `fuel_flow`, `P_el` → use `electrical_flow`, `Q_th` → use `thermal_flow`, `Q_ab` → use `heat_source_flow`
- Efficiency parameters: `eta` → use `thermal_efficiency`, `eta_th` → use `thermal_efficiency`, `eta_el` → use `electrical_efficiency`, `COP` → use `cop`

### 📦 Dependencies

### 📝 Docs
- Improve documentation from the ground up

### 👷 Development

### 🚧 Known Issues
This is not yet publicly released!

---

Until here -->

## [4.3.5] - 2025-11-29

**Summary**: Fix zenodo again
Expand Down
Loading