Skip to content

Examples

These examples walk through common odys use cases, from a basic single-scenario dispatch to stochastic optimization with multiple markets.

Each example is self-contained -- you can copy-paste it and run it directly.

Example What it shows
Basic Dispatch Generators + battery meeting a fixed load
Stochastic Scenarios Multiple wind scenarios with batteries
Stochastic Without Batteries Stochastic dispatch using generators only
Markets Selling excess generation into electricity markets
Markets + Stochastic Stochastic scenarios with stage-fixed market decisions

Running the examples

All examples are available in the examples/ directory of the repository. To run one:

python examples/example1.py