Skip to main content

High-performance SDDP solver for hydrothermal dispatch — Python bindings for the Cobre ecosystem

Project description

cobre

Python bindings for the Cobre power systems solver.

Cobre 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 cobre-python

Pre-built wheels are available for:

  • Linux x86_64 and aarch64 (manylinux_2_34), musl x86_64
  • macOS Apple Silicon (aarch64) and Intel (x86_64)
  • Windows x86_64
  • Python 3.12+

Quick Start

import cobre

# Load and validate a case
system = cobre.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 = cobre.run.run("path/to/case", output_dir="output/")
print(f"Converged: {result['converged']}, LB: {result['lower_bound']:.2f}")

convergence = cobre.results.load_convergence("output/")
print(f"Iterations: {len(convergence)}")

simulation = cobre.results.load_simulation("output/")
print(f"Cost records: {len(simulation['costs'])}")

policy = cobre.results.load_policy("output/")
print(f"Iterations completed: {policy['metadata']['completed_iterations']}")

Modules

  • cobre.io — Load and validate case directories
  • cobre.model — Data model classes (System, Bus, Line, Thermal, Hydro, etc.)
  • cobre.run — Execute SDDP training and simulation
  • cobre.results — Load and inspect output artifacts, including convergence history, Parquet simulation outputs, and FlatBuffers policy (FCF) checkpoints

Requirements

  • Python >= 3.12
  • No runtime dependencies (the Rust solver is statically linked)

License

Apache-2.0 — see LICENSE.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cobre_python-0.8.2-cp312-abi3-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.8.2-cp312-abi3-musllinux_1_2_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

cobre_python-0.8.2-cp312-abi3-manylinux_2_34_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.34+ x86-64

cobre_python-0.8.2-cp312-abi3-manylinux_2_28_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.8.2-cp312-abi3-macosx_11_0_arm64.whl (7.2 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.8.2-cp312-abi3-macosx_10_12_x86_64.whl (8.0 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file cobre_python-0.8.2-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: cobre_python-0.8.2-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cobre_python-0.8.2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 da9db7acb981a328db75a0f56ec2ddb74aba4a869a81797abe888a9fd3daceb8
MD5 d136542df112ad3d3ce64ae7751fc669
BLAKE2b-256 aa9e624cb6f20526a52fe3ba8f526e57d5de486d191414e529b12ecd0214d73a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.2-cp312-abi3-win_amd64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.2-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.2-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d59e55ad37025d2bf9faf378d658ba09f0b4061230809ce6c720356252b98952
MD5 f27d0fd373f6a5de7d9d97fbbd33ffbd
BLAKE2b-256 7ee033cf3041ef2e6ace73970eb4169bce61bb5f84daa7e5a6e3110a958a3d19

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.2-cp312-abi3-musllinux_1_2_x86_64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.2-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.2-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f9f18e3a253cf67d89431fedac5f6d56c7994db24d28a5ffb6636a0ff55d9819
MD5 9f406e06e2596a0fe4f97ae01ec5fa95
BLAKE2b-256 64a07291efb95675fcf0f6893ea47944c01f7d700889433f8797614452d7b6b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.2-cp312-abi3-manylinux_2_34_x86_64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.2-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.2-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 095d1cffe65198658fd797af0e643accc1b9c212e1ee25bddf0a2472eddf3929
MD5 0f42278c004d4551143a4916f5f9a512
BLAKE2b-256 f02864d064579e734e376aee815fa4bc4bc8a1b178f2ea6df0423ee97beeeefc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.2-cp312-abi3-manylinux_2_28_aarch64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.2-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.2-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 abc00cb284cb3ba776fb5b6e7638fde293261201c0c39ebd31f08e8c989d1b1d
MD5 7a0162ce15bf50cf53bcd6521ea6f76d
BLAKE2b-256 fb0121766ebfc04109f3a9c5acbc9f6e136d9243a48f89be0ea3c2076f76e27c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.2-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobre_python-0.8.2-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.8.2-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 635264a1f19fc4d742a6d9a5ff73807cb6e7bc4a6aa3f9ab9819f04f26f69a75
MD5 34e03de6725092d1501e85aad69c9f24
BLAKE2b-256 44f2ee3b1e118ef3fe654e5c5ef2dc88a32d40c07d5b5a3752720570d266f8a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.8.2-cp312-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on cobre-rs/cobre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page