Skip to main content

Odys

CI Coverage Python versions PyPI License

Optimize energy portfolios under uncertainty.


Documentation

Examples


Odys is a modern Python framework for optimizing multi-asset energy systems.

The key features are:

  • Optimization under uncertainty: Stochastic optimization is the default, not an afterthought. Multi-asset, multi-market from day one with built-in CVaR risk management.
  • Multi-solver support: Swap between HiGHS (default), Gurobi, CPLEX, or SCIP with a single configuration change.
  • Simple API: Define your assets, describe the uncertainty through scenarios, and call .optimize(). No boilerplate, no configuration files.
  • Transparent math: Every constraint and objective term is documented with equations. You know exactly what the solver sees.

Installation

pip install odys

Requires Python 3.11+. For commercial solvers (Gurobi, CPLEX, SCIP), see the solver docs.

Quick example

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

from datetime import timedelta

from odys import AssetPortfolio, EnergySystem, FixedLoad, Generator, 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(fixed_load_profiles={"demand": [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: generator_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.2.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.2.1
File Size Uploaded Provenance Actions
odys-0.2.1.tar.gz 38.6 kB Without provenance Details for odys-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 101.2 kB

Release files / odys-0.2.1.tar.gz

Download URL odys-0.2.1.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e76506dd444bc10ade0799249147149fc0f7c3ea85932cf806d3edf897f8cf69
BLAKE2b-256 checksum
How to use checksums
57f55db32617238a32e6e5aa48d0c081f8d3d00ffaad42e02150102cdb83ecdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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.2.1-py3-none-any.whl

Download URL odys-0.2.1-py3-none-any.whl
Size 62.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5e62461203f4f049236d97af3c6c82644f313ee370fa30772ad995de25a0f03
BLAKE2b-256 checksum
How to use checksums
d4bf555f85da1a932acd373675f1d8342e29bbb0f2de8782e634856626620f5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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.2.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