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.9.0-cp312-abi3-win_amd64.whl (7.1 MB view details)

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.9.0-cp312-abi3-musllinux_1_2_x86_64.whl (15.0 MB view details)

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

cobre_python-0.9.0-cp312-abi3-manylinux_2_34_x86_64.whl (8.6 MB view details)

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

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

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.9.0-cp312-abi3-macosx_11_0_arm64.whl (7.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.9.0-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.9.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: cobre_python-0.9.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 7.1 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.9.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 81b99ad091053fe25d923dbe5207717dd68d831c0af7d18e5ad6b4011d122547
MD5 76cf13410baaa09b024314e42001d5c9
BLAKE2b-256 1e2e3a4e3a56367a9c25739dc72381fbc3208b8f5917b787975fc8e429b3c135

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.9.0-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.9.0-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.9.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 51d22b6199b21122103b982ef27b27c5c1f434c46f1120aaa97cbfa3a13b1072
MD5 1444dc85e3047ea764cc0dc24341d8b0
BLAKE2b-256 20e1304cdb6cb4ce4805d611c3c707353b0806262c6f6ca7df3b5a6f026455a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.9.0-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.9.0-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.9.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0d5277e1027f748b149dc018263807d1c16dba6f5c3a190abcc8089b0afa7b69
MD5 15155328bb2c9e4962020fd60980e72f
BLAKE2b-256 8aac560d256869431b9d0134d283bc97cb232e26656845a85bbf15022615306c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.9.0-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.9.0-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cobre_python-0.9.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 94450067604fbc1a1d96a5415ef845b40c1e22f88866737f263309c0fb5e992e
MD5 a08ac9fe3b56e28fb787bd78ba92799b
BLAKE2b-256 abeb9b5ba9e130d11d9ceb0e4199d6701ce40ad8be66b885000252f9027cebfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.9.0-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.9.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cobre_python-0.9.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71e0104be095bee13abf17abadec262b3153509274ca466133830062803833ac
MD5 b081d6ad1ea0724702a8c38455e78b88
BLAKE2b-256 7d9f74abe2f5861608024cf232ad4d73f2cc79b7ae0ca094db5f41a7b67b6967

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.9.0-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.9.0-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cobre_python-0.9.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 49a596a6ea4aeeafcec6897697b92a12d2424e0f0a75ed2b8b2248a94bf8536c
MD5 44ca333a5a48cdc9d230753b95dfc3d1
BLAKE2b-256 1bfdf0683d3610cbd387ffad6d610af6751008d5f4f87ab7d8dba1ea223796fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobre_python-0.9.0-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