Skip to main content

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.

PyPI Downloads License: MIT Python 3.12+ Ruff

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fluxopt-0.0.1rc0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fluxopt-0.0.1rc0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

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

Hashes for fluxopt-0.0.1rc0.tar.gz
Algorithm Hash digest
SHA256 69ac7bc26c8b28da62726baff3722c5c834f60573a5899c61a7eab3614d79d59
MD5 32f4acec8584ece634d020da5f4f5960
BLAKE2b-256 5df606b2879f596c1e06e6f35a176b4d78a2cee8d1023924b8fba46327afcc8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluxopt-0.0.1rc0.tar.gz:

Publisher: release.yaml on FBumann/fluxopt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for fluxopt-0.0.1rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 9287d697c341b3e9532458917cecf7334cc3d4d91843a69595a9066ec1a3702e
MD5 c254a7072e1993d7036617aac1b258a4
BLAKE2b-256 45cabc9535638243083de9276a245b774b949fb304c01a4193cf491337b3aca1

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluxopt-0.0.1rc0-py3-none-any.whl:

Publisher: release.yaml on FBumann/fluxopt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page