novomodelo-python
High-performance SDDP solver for hydrothermal dispatch — Python bindings for the Novomodelo ecosystem
Downloads & Community Adoption
Health & Engineering Analysis (5 Pillars)
1. Governance & Community150 / 200 ▾
2. PEP Metadata & Packaging200 / 200 ▾
3. Security & Supply Chain200 / 200 ▾
4. Documentation, SEO & Ecosystem155 / 200 ▾
5. Engineering, CI & Quality165 / 200 ▾
Official Documentation & Usage Guide — novomodelo-python
Show full original documentation (English README) ▾
novomodelo
Python bindings for the Novomodelo power systems solver.
Novomodelo is a high-performance SDDP (Stochastic Dual Dynamic Programming) solver for hydrothermal dispatch, written in Rust. This package provides Python access to case loading, validation, training, simulation, and result inspection.
Installation
pip install novomodelo-python
Prebuilt wheels are published for:
- Linux x86_64 (manylinux_2_34)
- Linux aarch64 (manylinux_2_28)
- Linux musl x86_64 (musllinux_1_2)
- macOS Apple Silicon (aarch64) and Intel (x86_64)
- Windows x86_64
- Python 3.12+
The x86_64 Linux wheel is tagged manylinux_2_34, so it needs glibc 2.34 or newer:
RHEL and Rocky Linux 9+, Ubuntu 22.04+, Debian 12+. RHEL 8 and Ubuntu 20.04 are older,
so pip does not select the wheel there. The aarch64 Linux wheel is tagged
manylinux_2_28 (glibc 2.28 or newer).
Where no wheel fits, pip builds the published sdist instead, which needs a Rust
toolchain (1.88+), cmake and a C++ compiler. The same toolchain builds the package
from the root of a clone made with git clone --recurse-submodules (the solvers are
vendored as submodules):
pip install ./crates/novomodelo-python
Quick Start
import novomodelo
# Load and validate a case
system = novomodelo.io.load_case("path/to/case")
print(
f"System: {system.n_buses} buses, {system.n_hydros} hydros, {system.n_thermals} thermals"
)
# Run training + simulation
result = novomodelo.run.run("path/to/case", output_dir="output/")
print(f"Converged: {result['converged']}, LB: {result['lower_bound']:.2f}")
convergence = novomodelo.results.load_convergence("output/")
print(f"Iterations: {len(convergence)}")
simulation = novomodelo.results.load_simulation("output/")
print(f"Cost records: {len(simulation['costs'])}")
policy = novomodelo.results.load_policy("output/")
print(f"Iterations completed: {policy['metadata']['producer']['completed_iterations']}")
The same workflow, driven step by step:
# The Study lifecycle — construct, train, simulate
study = novomodelo.Study("path/to/case", output_dir="output/")
policy = study.train()
summary = study.simulate(policy)
print(f"Scenarios: {summary['n_scenarios']}, Completed: {summary['completed']}")
# Inspect the study before running any phase
print(f"Stages: {study.stochastic['n_stages']}, Seed: {study.stochastic['seed']}")
Modules
novomodelo.io— Load and validate case directoriesnovomodelo.model— Data model classes (System, Bus, Line, Thermal, Hydro, etc.)novomodelo.run— Execute SDDP training and simulationnovomodelo.results— Load and inspect output artifacts, including convergence history, Parquet simulation outputs, and FlatBuffers policy (FCF) checkpointsnovomodelo.schema— JSON Schema export for case-directory input typesnovomodelo.errors— Typed exception hierarchy for case-loading and solver errors
The package also exports Study, Policy, write_policy_checkpoint, and version_info at the top level.
Requirements
- Python >= 3.12
- No runtime dependencies (the Rust solver is statically linked)
License
Apache-2.0 — see LICENSE.