Skip to main content

Odys

CI Coverage Python versions PyPI License

Optimize energy portfolios under uncertainty.

Documentation · User Guide · Examples · Formulation

Odys is a free, open-source Python framework for the short-term operation of energy asset portfolios across electricity markets. Generators, storage, electric vehicles, chargers and loads are scheduled against one or more markets, with uncertainty represented by probability-weighted scenarios.

Features:

  • Stochastic optimization: maximize expected profit over a set of scenarios, with optional stage-fixed (non-anticipative) market positions and a CVaR risk term.
  • Solver choice: HiGHS by default; Gurobi, CPLEX and SCIP as optional extras. Models are built with linopy.
  • Validated inputs: assets, profiles and scenarios are Pydantic models, checked before the model is built.
  • Results as pandas: dispatch comes back as Series and DataFrames.
  • Documented formulation: every variable, constraint and objective term is written out.
  • Typed and tested: fully typed public API, tested on Python 3.11 to 3.14.

Scope: Odys models a portfolio on a single bus over a short horizon. It does not model networks, power flow or capacity expansion; for those, see PyPSA or Calliope.

Installation

pip install odys

Requires Python 3.11+. HiGHS is included. Gurobi, CPLEX and SCIP are optional extras:

pip install "odys[gurobi]"

See the solver docs for choosing a solver and passing options.

Quick example

Define your assets, describe the scenario, and call .optimize():

from datetime import timedelta

from odys import AssetPortfolio, EnergySystem, FixedLoad, Generator, LoadProfile, Scenario

generator = Generator(name="gen", nominal_power=100.0, variable_cost=50.0)
load = FixedLoad(name="demand")

portfolio = AssetPortfolio([generator, load])

energy_system = EnergySystem(
    portfolio=portfolio,
    scenarios=Scenario(profiles=(LoadProfile(load=load, values=[60, 90, 40, 70]),)),
    timestep=timedelta(hours=1),
    number_of_steps=4,
)

result = energy_system.optimize()
print(result.generators.power)
time  generator
0     gen          60.0
1     gen          90.0
2     gen          40.0
3     gen          70.0
Name: power, dtype: float64

See the documentation for the full workflow, or check the examples for complete worked scenarios.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT

Metadata

Release files for odys 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odys 0.3.1
File Size Uploaded Provenance Actions
odys-0.3.1.tar.gz 57.4 kB Without provenance Details for odys-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for odys 0.3.1
File Interpreter ABI Platform Actions
odys-0.3.1-py3-none-any.whl Python 3 none any Details for odys-0.3.1-py3-none-any.whl

Total release size: 141.7 kB

Release files / odys-0.3.1.tar.gz

Download URL odys-0.3.1.tar.gz
Size 57.4 kB
Tags Source
SHA-256 checksum
How to use checksums
eebfcc669e5e5f3096d3a7d17821c45e841e4786e304c529da3618e24eed2123
BLAKE2b-256 checksum
How to use checksums
b2f02d1d40a5b72fc0baf11d1bb803c7affe8c44006f6f43c0e4b9e2170c0b7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / odys-0.3.1-py3-none-any.whl

Download URL odys-0.3.1-py3-none-any.whl
Size 84.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dca10a8ab62bbca93f5ec958a3d8eb2f12fa3a25b7fc6d802040a1156bc5a869
BLAKE2b-256 checksum
How to use checksums
0e1ba6e08d6323a1aff6d7ab9733f2021220d951959d62fef255156b603e0d9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for odys 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page