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

Uploaded CPython 3.12+Windows x86-64

cobre_python-0.9.1-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.1-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.1-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.1-cp312-abi3-macosx_11_0_arm64.whl (7.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

cobre_python-0.9.1-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.1-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: cobre_python-0.9.1-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.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 95704601b82c1002ec124f8681886fe8352cabe70007763472034e748e266bb8
MD5 1f779137b4ada112e5a180683355d99f
BLAKE2b-256 15bd03d11e1751ef35bc1551de048e76068b3f2b133b93bda4a8c8712825d5b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.9.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ba6fa55687478963353ba19d9bc43f472a78f84f36352d7767cd44008df87b80
MD5 762e5d149c9939fff3bc51211edffcf6
BLAKE2b-256 30ac97dbc3dbe37708e5b7c0257069b6dfaa2a1338f028b6f936fc3e8384892a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.9.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fa5a12bd8578506ea2e8f37a011cda5cdb6139fddb8f415d819809fb990ff45d
MD5 aed7509b909a07006b5f54f6397518b7
BLAKE2b-256 93fa1475cd5b5ec476569942bded752804ce6c456ff49c6f7e45a29196a00ae2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.9.1-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c6a9182095f7f3a80e7dd00faa47c3628e54dc469a098b0910f7bb7566941209
MD5 fd750c0fb0eb6e9645fe7f4d7fef80e2
BLAKE2b-256 72867428fdd4bf2265878085abdb1966c90b1bc2f15cf22231b911909ace0526

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.9.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 85a73301f7a9c111efb588183ac867589aa56103cc6f67673d71425108751818
MD5 17cf66e0a31cc91bcfa88e8ad5dc3850
BLAKE2b-256 fad023235cf844e9f9b582ac750e4b7f1a4557cc478637bedd7b7d90e0236767

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cobre_python-0.9.1-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f17bea92620cd2676973e6f371df3bdc6a029a6f911f4588bb47aa20a0435741
MD5 3839930768782624d56ea07c997687ee
BLAKE2b-256 6e043fb45a8f3bebe97bd1c008fd082f51110bc2c0cc6ca5b9ae4fce4ce7572c

See more details on using hashes here.

Provenance

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