Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
4f9289a
New solution storing interface
FBumann Dec 3, 2025
9e38e73
Fix time index in io
FBumann Dec 4, 2025
0d167ff
Add iio tests for new solution and FlowSystem IO
FBumann Dec 4, 2025
07a32c8
Add now optimize() method
FBumann Dec 4, 2025
3d61e4a
Add now optimize() accessor
FBumann Dec 4, 2025
8208efc
Add main results and sumamr and document infeasibilities
FBumann Dec 4, 2025
aba8aee
Remove main results and summary
FBumann Dec 4, 2025
48c9f6b
Remove main results and summary and imprive infeasible extraction
FBumann Dec 4, 2025
4cc0dbb
Add transform accessor for clustering and future transformations
FBumann Dec 4, 2025
402686a
Reverts ome not needed stuff
FBumann Dec 4, 2025
ddaaea1
Update the docs and deprecate old classes
FBumann Dec 4, 2025
f34bbb9
Update deprectations
FBumann Dec 4, 2025
2bc9fb7
Fix time index inconsistencies
FBumann Dec 4, 2025
da68fc1
Update tests
FBumann Dec 4, 2025
5df8a64
Update tests
FBumann Dec 4, 2025
9fe1ad4
Update tests
FBumann Dec 4, 2025
c3db99e
Copy over old tests
FBumann Dec 4, 2025
1a98005
Copy over old tests
FBumann Dec 4, 2025
1c31408
Copy over old tests
FBumann Dec 4, 2025
708d6f2
Update tests of new API
FBumann Dec 4, 2025
f7a42c2
Removed test reuslts ploty
FBumann Dec 4, 2025
5985363
Add migration guide for v6
FBumann Dec 4, 2025
11d26f7
Add plotting and statistics tests
FBumann Dec 4, 2025
260a83c
Fix depprecation warings in tests
FBumann Dec 4, 2025
ba88683
1. tests/test_component.py - Fixed tautological assertions in both …
FBumann Dec 4, 2025
e0312d3
Improve
FBumann Dec 4, 2025
ce24d21
Add accessors for plotting, statistics and more (#506)
FBumann Dec 8, 2025
b96d74f
Add carrier and color management
FBumann Dec 8, 2025
dedfeb8
Add transform accessor and move sel, isel and resample to this access…
FBumann Dec 8, 2025
8bf4896
Add recipies for plotting data (#516)
FBumann Dec 9, 2025
82348b9
Invalidate and lock FLow system based on solution existance (#518)
FBumann Dec 9, 2025
52ad96e
Add better and more versitile sankey diagrams (#514)
FBumann Dec 9, 2025
ab7549f
Update tests for new plot method
FBumann Dec 9, 2025
929c633
Extract docs build and deploy into separate workflow (#520)
FBumann Dec 10, 2025
03d5bac
fix: docs build CI
FBumann Dec 10, 2025
ecee52e
⏺ All 10 review comments have been addressed:
FBumann Dec 10, 2025
77e3b3c
Minor nitpicks
FBumann Dec 10, 2025
5104be3
Revert to critical warning
FBumann Dec 10, 2025
c7d1abb
bugfix: revert
FBumann Dec 10, 2025
8e7f14e
revert: solution always having an extra timestep (#523)
FBumann Dec 10, 2025
4e13036
Add new user facing notebooks with better user stories (#515)
FBumann Dec 10, 2025
7775cf1
Change default of Effect.description to ''
FBumann Dec 11, 2025
8d4a98c
Improve backwards compatability and allow saving the solution directly
FBumann Dec 11, 2025
d841c7a
Re-add old examples and tests
FBumann Dec 11, 2025
91bfd77
Add conversion utility for old flow_systems and results
FBumann Dec 11, 2025
ba70563
Add test for conversion to new api
FBumann Dec 11, 2025
8f7c142
Add new utility for loading old resutls file and voncerting to the ne…
FBumann Dec 11, 2025
1e15f41
Added tests for the v4 api conversion to new api
FBumann Dec 11, 2025
5754068
Update migration guide
FBumann Dec 11, 2025
4508dcf
Improve Tests for old api conversion
FBumann Dec 11, 2025
ddd614b
Make IO more strict to prevent silent errors.
FBumann Dec 11, 2025
eb160aa
Add deprecation warning for method for old results
FBumann Dec 11, 2025
10939bc
Adjust notebook config to plotly_white theme
FBumann Dec 12, 2025
6bc4d4d
Add default compression to netcdf filesand overwrite=False
FBumann Dec 12, 2025
31e0835
Add effect selecrtipon to sankey
FBumann Dec 12, 2025
e546228
Use sankey accessor with better selections
FBumann Dec 12, 2025
e0f0e91
refactor complete. Here's the new structure:
FBumann Dec 12, 2025
e234941
drop=True by default in _apply_selection
FBumann Dec 12, 2025
bf306ca
Update notebooks and docs
FBumann Dec 12, 2025
5b99d42
Removed timestep parameter - now use select={'time': ...} with dateti…
FBumann Dec 12, 2025
cd0cfbc
Added carriers to notebooks
FBumann Dec 12, 2025
6616bfd
Added carriers to notebooks
FBumann Dec 12, 2025
b9aee81
Summary of Carrier Enhancements
FBumann Dec 12, 2025
6c88996
Improve carrier color handling
FBumann Dec 12, 2025
8c16baa
Improve carrier color handling
FBumann Dec 12, 2025
4589153
Make color handling more robust
FBumann Dec 12, 2025
d8e87d9
Summary of Changes
FBumann Dec 12, 2025
7876f12
Use chached properties in plots
FBumann Dec 12, 2025
f8c81b6
Added script to create systems for notbeook showing results
FBumann Dec 12, 2025
5f38a00
Add notebook for results access
FBumann Dec 12, 2025
1828ecf
Always amrk loaded FLowSystem as transformed
FBumann Dec 12, 2025
636127c
Add notebook for resuls show off
FBumann Dec 12, 2025
23612e3
Add notebook for resuls show off
FBumann Dec 12, 2025
570ab3d
Re-Connect FLow_system when loading from dataset
FBumann Dec 12, 2025
e4ad346
Update notebook and add to docs
FBumann Dec 12, 2025
ef2b3fd
Update notebook and add to docs
FBumann Dec 12, 2025
3fad6fe
Update notebook names and docs headers
FBumann Dec 12, 2025
d53f184
Update results notebook
FBumann Dec 12, 2025
2d4d84c
Fix resampling
FBumann Dec 12, 2025
6cf16fd
Original Issue: Resampling irregular timesteps to regular intervals …
FBumann Dec 12, 2025
7c5c77e
When adding elements to a FlowSystem that was already connected_and_t…
FBumann Dec 12, 2025
198d78a
Bugfix notebooks in docs build
FBumann Dec 12, 2025
a308d09
Improve invalidation
FBumann Dec 12, 2025
f7d2ea6
Add class level attributes instead of setting outside init
FBumann Dec 13, 2025
2dd770d
Change default size to be None. If mathematically needed, Users need …
FBumann Dec 13, 2025
d0733f8
Fix docs
FBumann Dec 13, 2025
224728a
fix notebook script
FBumann Dec 13, 2025
11191fd
Better notebooks and units in plots (#527)
FBumann Dec 13, 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

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

- 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
38 changes: 4 additions & 34 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
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 }}
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$

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.4
hooks:
- id: ruff-check
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
files: ^docs/examples.*\.ipynb$
5 changes: 0 additions & 5 deletions docs/examples/00-Minimal Example.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/01-Basic Example.md

This file was deleted.

10 changes: 0 additions & 10 deletions docs/examples/02-Complex Example.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/03-Optimization Modes.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/04-Scenarios.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/examples/05-Two-stage-optimization.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/examples/index.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/home/citing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you've published research using flixOpt, please let us know! We'd love to fea

### List of Publications

*Coming soon: A list of academic publications that have used flixOpt*
Coming soon: A list of academic publications that have used flixOpt.

## Contributing Back

Expand Down
2 changes: 1 addition & 1 deletion docs/home/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ For more details on logging configuration, see the [`CONFIG.Logging`][flixopt.co
## Next Steps

- Follow the [Quick Start](quick-start.md) guide
- Explore the [Minimal Example](../examples/00-Minimal Example.md)
- Explore the [Minimal Example](../notebooks/01-quickstart.ipynb)
- Read about [Core Concepts](../user-guide/core-concepts.md)
2 changes: 1 addition & 1 deletion docs/home/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ flixOpt is released under the MIT License.

## MIT License

```
```text
MIT License

Copyright (c) 2022 Chair of Building Energy Systems and Heat Supply - TU Dresden
Expand Down
44 changes: 34 additions & 10 deletions docs/home/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,49 @@ battery = fx.Storage(
flow_system.add_elements(solar, demand, battery, electricity_bus)
```

### 5. Run Optimization
### 5. Visualize and Run Optimization

```python
# Create and run optimization
optimization = fx.Optimization('solar_battery_optimization', flow_system)
optimization.solve(fx.solvers.HighsSolver())
# Optional: visualize your system structure
flow_system.topology.plot(path='system.html')

# Run optimization
flow_system.optimize(fx.solvers.HighsSolver())
```

### 6. Save Results
### 6. Access and Visualize Results

```python
# This includes the modeled FlowSystem. SO you can restore both results and inputs
optimization.results.to_file()
# Access raw solution data
print(flow_system.solution)

# Use statistics for aggregated data
print(flow_system.statistics.flow_hours)

# Access component-specific results
print(flow_system.components['battery'].solution)

# Visualize results
flow_system.statistics.plot.balance('electricity')
flow_system.statistics.plot.storage('battery')
```

### 7. Save Results (Optional)

```python
# Save the flow system (includes inputs and solution)
flow_system.to_netcdf('results/solar_battery.nc')

# Load it back later
loaded_fs = fx.FlowSystem.from_netcdf('results/solar_battery.nc')
```

## What's Next?

Now that you've created your first model, you can:

- **Learn the concepts** - Read the [Core Concepts](../user-guide/core-concepts.md) guide
- **Explore examples** - Check out more [Examples](../examples/index.md)
- **Explore examples** - Check out more [Examples](../notebooks/index.md)
- **Deep dive** - Study the [Mathematical Formulation](../user-guide/mathematical-notation/index.md)
- **Build complex models** - Use [Recipes](../user-guide/recipes/index.md) for common patterns

Expand All @@ -120,8 +142,10 @@ Most flixOpt projects follow this pattern:
2. **Create flow system** - Initialize with time series and effects
3. **Add buses** - Define connection points
4. **Add components** - Create generators, storage, converters, loads
5. **Run optimization** - Solve the optimization
6. **Save Results** - For later analysis. Or only extract needed data
5. **Verify structure** - Use `flow_system.topology.plot()` to visualize
6. **Run optimization** - Call `flow_system.optimize(solver)`
7. **Analyze results** - Via `flow_system.statistics` and `.solution`
8. **Visualize** - Use `flow_system.statistics.plot.*` methods

## Tips

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ title: Home

<p class="hero-buttons">
<a href="home/installation/" class="md-button md-button--primary">🚀 Get Started</a>
<a href="examples/" class="md-button">💡 View Examples</a>
<a href="notebooks/" class="md-button">💡 View Examples</a>
<a href="https://github.com/flixOpt/flixopt" class="md-button" target="_blank" rel="noopener noreferrer">⭐ GitHub</a>
</p>

Expand All @@ -30,7 +30,7 @@ title: Home

New to FlixOpt? Start here with installation and your first model

- :bulb: **[Examples Gallery](examples/)**
- :bulb: **[Examples Gallery](notebooks/)**

---

Expand Down
Loading