Metadata-Version: 2.4
Name: odys
Version: 0.2.1
Summary: Python framework for optimizing multi-energy systems.
Keywords: battery,dispatch,energy,milp,optimization,portfolio,stochastic,uncertainty
Author: Ramiro Criach
Author-email: Ramiro Criach <ramirocriach@gmail.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: highspy>=1.14.0
Requires-Dist: linopy>=0.7.0
Requires-Dist: numpy>=2.4.1
Requires-Dist: pandas>=2.3.3
Requires-Dist: pydantic>=2.12.5
Requires-Dist: xarray>=2025.12.0
Requires-Dist: cplex>=22.1.2.1 ; extra == 'cplex'
Requires-Dist: gurobipy>=13.0.1 ; extra == 'gurobi'
Requires-Dist: pyscipopt>=6.1.0 ; extra == 'scip'
Requires-Python: >=3.11, <4.0
Project-URL: Changelog, https://github.com/ramirocrc/odys/blob/main/CHANGELOG.md
Project-URL: Documentation, https://ramirocrc.github.io/odys/
Project-URL: Homepage, https://ramirocrc.github.io/odys/
Project-URL: Issues, https://github.com/ramirocrc/odys/issues
Project-URL: Repository, https://github.com/ramirocrc/odys
Provides-Extra: cplex
Provides-Extra: gurobi
Provides-Extra: scip
Description-Content-Type: text/markdown

# Odys

[![CI](https://img.shields.io/github/actions/workflow/status/ramirocrc/odys/main.yml?branch=main)](https://github.com/ramirocrc/odys/actions/workflows/main.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/ramirocrc/odys/branch/main/graph/badge.svg)](https://codecov.io/gh/ramirocrc/odys)
[![Python versions](https://img.shields.io/pypi/pyversions/odys?color=green)](https://pypi.org/project/odys/)
[![PyPI](https://img.shields.io/pypi/v/odys)](https://pypi.org/project/odys/)
[![License](https://img.shields.io/github/license/ramirocrc/odys)](https://github.com/ramirocrc/odys/blob/main/LICENSE)

Optimize energy portfolios under uncertainty.

---

**[Documentation](https://ramirocrc.github.io/odys/)**

**[Examples](https://ramirocrc.github.io/odys/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

```console
pip install odys
```

Requires Python 3.11+. For commercial solvers (Gurobi, CPLEX, SCIP), see the [solver docs](https://ramirocrc.github.io/odys/user_guide/solvers/).

## Quick example

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

```python
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](https://ramirocrc.github.io/odys/) for the full workflow, or check the [examples](https://ramirocrc.github.io/odys/examples/) for complete worked scenarios.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.

## License

[MIT](LICENSE)
