Energy system optimization with linopy — progressive modeling, from simple to complex.
Project description
fluxopt
Energy system optimization with linopy — detailed dispatch, scaled to multi period planning.
Early development — the API may change between releases. Planned features and progress are tracked in Issues.
Installation
pip install fluxopt
Includes the HiGHS solver out of the box.
Quick Start
from datetime import datetime, timedelta
import fluxopt as fx
timesteps = [datetime(2024, 1, 1) + timedelta(hours=i) for i in range(4)]
result = fx.optimize(
timesteps=timesteps,
buses=[fx.Bus('electricity')],
effects=[fx.Effect('cost', is_objective=True)],
ports=[
fx.Port('grid', imports=[
fx.Flow(bus='electricity', size=200, effects_per_flow_hour={'cost': 0.04}),
]),
fx.Port('demand', exports=[
fx.Flow(bus='electricity', size=100, fixed_relative_profile=[0.5, 0.8, 1.0, 0.6]),
]),
],
)
Development
Requires uv and Python >= 3.12.
uv sync --group dev # Install deps
uv run pytest -v # Run tests
uv run ruff check . # Lint
uv run ruff format . # Format
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fluxopt-0.0.1rc0.tar.gz.
File metadata
- Download URL: fluxopt-0.0.1rc0.tar.gz
- Upload date:
- Size: 33.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69ac7bc26c8b28da62726baff3722c5c834f60573a5899c61a7eab3614d79d59
|
|
| MD5 |
32f4acec8584ece634d020da5f4f5960
|
|
| BLAKE2b-256 |
5df606b2879f596c1e06e6f35a176b4d78a2cee8d1023924b8fba46327afcc8c
|
Provenance
The following attestation bundles were made for fluxopt-0.0.1rc0.tar.gz:
Publisher:
release.yaml on FBumann/fluxopt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fluxopt-0.0.1rc0.tar.gz -
Subject digest:
69ac7bc26c8b28da62726baff3722c5c834f60573a5899c61a7eab3614d79d59 - Sigstore transparency entry: 973315516
- Sigstore integration time:
-
Permalink:
FBumann/fluxopt@7df3fc2e85c9d24dd9d8ca9d17d086fa287fe383 -
Branch / Tag:
refs/tags/v0.0.1rc0 - Owner: https://github.com/FBumann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@7df3fc2e85c9d24dd9d8ca9d17d086fa287fe383 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fluxopt-0.0.1rc0-py3-none-any.whl.
File metadata
- Download URL: fluxopt-0.0.1rc0-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9287d697c341b3e9532458917cecf7334cc3d4d91843a69595a9066ec1a3702e
|
|
| MD5 |
c254a7072e1993d7036617aac1b258a4
|
|
| BLAKE2b-256 |
45cabc9535638243083de9276a245b774b949fb304c01a4193cf491337b3aca1
|
Provenance
The following attestation bundles were made for fluxopt-0.0.1rc0-py3-none-any.whl:
Publisher:
release.yaml on FBumann/fluxopt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fluxopt-0.0.1rc0-py3-none-any.whl -
Subject digest:
9287d697c341b3e9532458917cecf7334cc3d4d91843a69595a9066ec1a3702e - Sigstore transparency entry: 973315524
- Sigstore integration time:
-
Permalink:
FBumann/fluxopt@7df3fc2e85c9d24dd9d8ca9d17d086fa287fe383 -
Branch / Tag:
refs/tags/v0.0.1rc0 - Owner: https://github.com/FBumann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@7df3fc2e85c9d24dd9d8ca9d17d086fa287fe383 -
Trigger Event:
push
-
Statement type: