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
cobre.run.run("path/to/case", output_dir="output/")
# Inspect convergence and simulation results
convergence = cobre.results.load_convergence("output/")
print(f"Converged after {len(convergence)} iterations")
simulation = cobre.results.load_simulation("output/")
print(f"Stages: {simulation.n_stages}, Scenarios: {simulation.n_scenarios}")
# Read the saved policy (FlatBuffers FCF checkpoint)
policy = cobre.results.load_policy("output/policy.fcf")
print(f"Policy cuts: {policy.n_cuts}")
Modules
cobre.io— Load and validate case directoriescobre.model— Data model classes (System, Bus, Line, Thermal, Hydro, etc.)cobre.run— Execute SDDP training and simulationcobre.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cobre_python-0.3.2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: cobre_python-0.3.2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 13.1 MB
- Tags: PyPy, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20b385b175eaef9e4f08039273e7636a7f1e2a1019fc5e0fb55f7e203f0161db
|
|
| MD5 |
03f559cc8651273e06e140fa64683d7e
|
|
| BLAKE2b-256 |
f71fd59fe5e641ccce56799f26afdc04e79ecdb70d95d192a6878e157f8aa89c
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl -
Subject digest:
20b385b175eaef9e4f08039273e7636a7f1e2a1019fc5e0fb55f7e203f0161db - Sigstore transparency entry: 1201995488
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp314-cp314t-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp314-cp314t-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 13.1 MB
- Tags: CPython 3.14t, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f322bb31e2dc01cd927b021fd9bd6c1e56f910125b2834b4b8883a8a41d164
|
|
| MD5 |
fa47074fbc23aa0bce737b0a04c1d05a
|
|
| BLAKE2b-256 |
81ffe866a62cb3e0b0199680a681db5e4e2344e9ae882d26a10e5b74a2b69030
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp314-cp314t-musllinux_1_2_x86_64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp314-cp314t-musllinux_1_2_x86_64.whl -
Subject digest:
36f322bb31e2dc01cd927b021fd9bd6c1e56f910125b2834b4b8883a8a41d164 - Sigstore transparency entry: 1201995475
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 13.1 MB
- Tags: CPython 3.13t, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6431c261ea14f0c52a6d7210c7844b866ba02660d8dda93144e3c2d615273fce
|
|
| MD5 |
9bc1150467783f24c77782e45bde329c
|
|
| BLAKE2b-256 |
39b7b614a281f45529a5c91c7f8bfcf3ddd03536d75c3721050c51328e3bc523
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl -
Subject digest:
6431c261ea14f0c52a6d7210c7844b866ba02660d8dda93144e3c2d615273fce - Sigstore transparency entry: 1201995442
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp312-abi3-win_amd64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp312-abi3-win_amd64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.12+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
586a275f87e64d2b7822f1a4c1e9ddb14c5f43df90d2ca41ad66dd1d101ac751
|
|
| MD5 |
0de3f39445a65fa4dc945ccde18f5078
|
|
| BLAKE2b-256 |
8b9cb721b2b2dff1aafb75dbb8595c05f73cfeed0888153ccdbf1ffc9646f4a5
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp312-abi3-win_amd64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp312-abi3-win_amd64.whl -
Subject digest:
586a275f87e64d2b7822f1a4c1e9ddb14c5f43df90d2ca41ad66dd1d101ac751 - Sigstore transparency entry: 1201995461
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp312-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp312-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 13.1 MB
- Tags: CPython 3.12+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdfdb0aedf4cf5a22fbdb14b98c7a1b13f2abc425c16d50231db47a1e7dccb1a
|
|
| MD5 |
37aa9485ac662801da3c37ceb02023a4
|
|
| BLAKE2b-256 |
3dee0362a18c9ad409ee38b8513deca846b09031864912cce5f76ba44f1a37ab
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp312-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp312-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
bdfdb0aedf4cf5a22fbdb14b98c7a1b13f2abc425c16d50231db47a1e7dccb1a - Sigstore transparency entry: 1201995436
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp312-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp312-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.12+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
341328c4de831e61ef7179137daed4d51f24b8a70fd3749cddcd70d204b628c9
|
|
| MD5 |
c210d62b0659935ac7390e8d44d7d253
|
|
| BLAKE2b-256 |
4093cb323d89d9390aedac26403f1ef99165d4feb7f65e04ce6b97b605816eef
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp312-abi3-manylinux_2_34_x86_64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp312-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
341328c4de831e61ef7179137daed4d51f24b8a70fd3749cddcd70d204b628c9 - Sigstore transparency entry: 1201995452
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp312-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp312-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 6.3 MB
- Tags: CPython 3.12+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ada2106edfdad78659cba8192465936907e81a8d1b9122c1eb5e2b2bd9126fc0
|
|
| MD5 |
cbd9f5dcf143be362e76f01b22f56ecd
|
|
| BLAKE2b-256 |
f28f1b8fe1728d4d40d9e0cd76e0f5fb84de9f77a5a70b6a44f63a97da793ba7
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp312-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp312-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
ada2106edfdad78659cba8192465936907e81a8d1b9122c1eb5e2b2bd9126fc0 - Sigstore transparency entry: 1201995484
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.5 MB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dd6d9e6d62f9a20c4be5c95b0d149bade5dc90282385964795460b5f3db1b8e
|
|
| MD5 |
2e5b7ec45227d5345949b5b5c4f9085b
|
|
| BLAKE2b-256 |
8576d1fa85981decb04d401468366964727400c3421af7cf0cd46a2a57cea3c7
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp312-abi3-macosx_11_0_arm64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp312-abi3-macosx_11_0_arm64.whl -
Subject digest:
5dd6d9e6d62f9a20c4be5c95b0d149bade5dc90282385964795460b5f3db1b8e - Sigstore transparency entry: 1201995491
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cobre_python-0.3.2-cp312-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: cobre_python-0.3.2-cp312-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.12+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5976c1add70fc938e04ddf67531cbb341f3a3401803af9ad4b941d879b911e2f
|
|
| MD5 |
2f6313a32634babedb0d6e68719adc59
|
|
| BLAKE2b-256 |
08e6ac291bc40654a96c9f4d08ad65e81bb0b21a750d9e495c89e6eec1e2de9b
|
Provenance
The following attestation bundles were made for cobre_python-0.3.2-cp312-abi3-macosx_10_12_x86_64.whl:
Publisher:
release-python.yml on cobre-rs/cobre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cobre_python-0.3.2-cp312-abi3-macosx_10_12_x86_64.whl -
Subject digest:
5976c1add70fc938e04ddf67531cbb341f3a3401803af9ad4b941d879b911e2f - Sigstore transparency entry: 1201995445
- Sigstore integration time:
-
Permalink:
cobre-rs/cobre@36251dd91c08055674f7c68596654f41ae52ebb1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/cobre-rs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@36251dd91c08055674f7c68596654f41ae52ebb1 -
Trigger Event:
push
-
Statement type: