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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.6.0-cp312-abi3-musllinux_1_2_x86_64.whl (14.3 MB view details)

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

cobre_python-0.6.0-cp312-abi3-manylinux_2_34_x86_64.whl (7.7 MB view details)

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

cobre_python-0.6.0-cp312-abi3-manylinux_2_28_aarch64.whl (7.4 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

cobre_python-0.6.0-cp312-abi3-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.6.0-cp312-abi3-macosx_10_12_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: cobre_python-0.6.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.4 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.6.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 91eda00489019892b5302f6196eb4d9aa569fdd7b275d4a5e3bbf01a2a3aa989
MD5 2fe579ac7cbe6d49521eab7db7bcb8aa
BLAKE2b-256 48a877c406ae704ca82e71b81ebc48a0cb73e04b49ea4f4d4561aadfaf181263

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c0674de79f6aa7c5a1785092926553449d1ce79e3e0fed71f9d6b95c29a9eb79
MD5 d857a3025e905aa23a036f1ab571b518
BLAKE2b-256 c739d8e37c9e500cea6d719225716f0bcfada5fcf9f63cad713698a25273f7b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 40ae9d5c3ab02faa0432eb9676c00fef6dc33bc52ed230f6df1c3ec949856005
MD5 ff29782d5d202db1039d03cbcc502144
BLAKE2b-256 300ae29de594bdb6d12f09f9684d25d77731aa124040f0fde083507f9e7942d4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6b5c0edcfb343ba454d1eebeacf79de75f0e08a0878a69ea52db07ab3f1e61b3
MD5 6fd05a01bc531d2a5236bcf3d4f6d896
BLAKE2b-256 5a863e6228731086cda94bdcd469fcb7af0f085a655a2123d61671961ddb0977

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c401be5d865cbf4ae9c9f32c7bb139cd355006a27fe08f706408ef7be77da68e
MD5 e1d161a554353b14711f804161b386a3
BLAKE2b-256 67f5b62b543419541e806eec61e67a7251adf4f48a8ba0934d04b9bd4754d9ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.6.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5ba15ee897f9b7430e348297ca17b93d17bbbfb59819d7bcab74ae2f95465279
MD5 7eba8d18b8ffd153e949afecd0c3b504
BLAKE2b-256 7cce4fe47d6ded232b973eec3096fb4711d4a6d65e0ed22346652f72953f97bf

See more details on using hashes here.

Provenance

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