novomodelo-bridge
novomodelo-bridge converts hydrothermal dispatch cases written for the Brazilian
planning models NEWAVE (long term) and DECOMP (short term) into the
input format of Novomodelo, an open-source
SDDP solver, and compares the two models' results once both have been run.
It is a command-line tool. A session typically goes:
checkthat a source case is complete enough to convert;convertit into a Novomodelo case directory;- solve that directory with the
novomodelosolver; comparethe source model's published results against Novomodelo's simulation;- open an interactive
dashboardof the Novomodelo run.
Installation
uv tool install novomodelo-bridge # isolated, on-PATH CLI (recommended)
pipx install novomodelo-bridge # alternative
pip install novomodelo-bridge # into the current environment
Requires Python 3.12 or newer. The install pulls in novomodelo-python, Novomodelo's
Python bindings, so convert --validate, compare, and the DECOMP boundary
cost-to-go import work without further setup. novomodelo-python ships prebuilt
wheels for common platforms; if pip reports that none matches yours, see the
novomodelo repository for build options.
The novomodelo solver itself is a separate install, built from the novomodelo
repository (see its README). novomodelo-bridge does not need it to convert or
compare. You need it to solve the converted case between those two steps.
Versions
A novomodelo-bridge release X.Y.Z targets novomodelo X.Y.Z: the converted case
follows that novomodelo release's input contract, and the bridge depends on
exactly that novomodelo-python release. The pin is exact because novomodelo loads a
DECOMP boundary imported by convert decomp only in the version of the
novomodelo-python that wrote it (see the
DECOMP track page).
convert --validate skips its validation step, with a note, when the
installed novomodelo-python is older than the paired release.
Quick start
# 1. Preflight the source case. Exit 0 = ready, 1 = ready with warnings, 2 = will not convert.
novomodelo-bridge check newave /path/to/newave_case
# 2. Convert into a new Novomodelo case directory (--force overwrites a non-empty one).
novomodelo-bridge convert newave /path/to/newave_case ./my_case
# 3. Solve with novomodelo. By default the solver writes its results to ./my_case/output/.
novomodelo run ./my_case
# 4. Compare NEWAVE's published results with Novomodelo's simulation. Always exits 0.
novomodelo-bridge compare newave /path/to/newave_case ./my_case/output --format html
# 5. Browse the Novomodelo run.
novomodelo-bridge dashboard ./my_case --open
Replace newave with decomp for a DECOMP deck; the flow is the same. The
DECOMP track imports the deck's boundary cost-to-go function by default, which
adds one rule for running the case; see the
DECOMP track page.
Commands
| Command | What it does |
|---|---|
convert newave SRC DST |
Convert a NEWAVE case directory into a Novomodelo case directory. |
convert decomp SRC DST |
Convert a DECOMP deck revision into a Novomodelo case directory. |
check newave SRC / check decomp SRC |
Validate the source inputs without writing anything; report missing inputs and what the conversion would leave out. |
compare newave NEWAVE_DIR NOVOMODELO_OUTPUT_DIR |
Compare NEWAVE's published results (MEDIAS-*.CSV, pmo.dat) against a Novomodelo simulation output directory. |
compare decomp DECOMP_DIR NOVOMODELO_OUTPUT_DIR |
Compare a DECOMP run's operation tables (dec_oper_*.csv) against a Novomodelo simulation output directory. |
dashboard CASE_DIR |
Build an interactive HTML dashboard from a solved Novomodelo case (reads CASE_DIR/output/). |
Every command accepts --json, -v/-vv, --log-file PATH, --no-color,
and --quiet. convert adds --validate, --force, --dry-run, and
--diagnostics-json PATH; convert decomp also has --no-fcf. compare
adds --tolerance, --format, and --out-dir. dashboard adds --output
and --open. The generated reference with every option's help text is
docs/cli.md.
Shell completion: novomodelo-bridge --install-completion.
What convert writes
DST becomes a Novomodelo case directory: config.json, stages.json,
penalties.json, and initial_conditions.json at the top, entity registries
under system/, inflow and load data under scenarios/, and bounds and
generic constraints under constraints/. Stage-varying tables are Parquet;
everything else is JSON. The layout is Novomodelo's documented input format (see
the novomodelo documentation).
Next to the case, conversion_manifest.json records provenance: the bridge
version and git commit, the source directory, a hash of every input file read,
the entity counts, and every diagnostic raised during the run.
Diagnostics (a missing optional file, a bound clamped to keep the LP feasible,
a feature the converter leaves out) are rendered as grouped panels on stderr
with the affected plants and stages. --diagnostics-json saves them to a
file; --dry-run runs the whole conversion in memory and lists what would be
written.
What compare writes
compare prints a per-variable summary table and writes artifacts to
NOVOMODELO_OUTPUT_DIR/comparison_artifacts/ (or --out-dir). --format chooses
the set: parquet and json (the tidy comparison dataset) by default, csv,
html for a multi-tab report.html covering costs, system and energy
balance, network, convergence, performance, and per-plant detail, or all.
compare is informational and always exits 0; the report is where you judge
the differences.
Machine-readable output
With --json, a command prints exactly one JSON document to stdout,
{schema_version, command, status, summary, diagnostics}, and nothing else on
stdout, including when it fails. Human-readable rendering is suppressed.
| Command | Exit codes |
|---|---|
check |
0 ready, 1 ready with warnings, 2 will not convert |
convert |
0 converted, 1 conversion error, 2 --validate reported a load failure |
compare |
always 0 |
dashboard |
0 written, 1 error |
An error status and a non-zero exit code always travel together.
Configuration
Defaults for the compare options can live in a novomodelo-bridge.toml:
[compare]
format = ["console", "html"] # or one string; same tokens as --format
out_dir = "comparisons"
[compare.results]
tolerance = 0.01 # relative
The file is looked up in the working directory and its parents, then
$XDG_CONFIG_HOME/novomodelo-bridge/config.toml, then
~/.config/novomodelo-bridge/config.toml; the first one found is used. The same
settings exist as environment variables (NOVOMODELO_BRIDGE_RESULTS_TOLERANCE,
NOVOMODELO_BRIDGE_FORMAT, NOVOMODELO_BRIDGE_OUT_DIR). Precedence is flag >
environment > file > built-in default.
Documentation
- CLI reference, generated from the command help.
- NEWAVE track: inputs, what the converter changes, comparing results.
- DECOMP track: inputs, deferred features, the boundary cost-to-go import, running the case.
- Mapa de dados NEWAVE and Mapa de dados DECOMP, in Portuguese: which deck file, record, and column feeds each Novomodelo file and field, and what is not converted yet.
- Architecture: how the code is organised, for contributors.
- Contributing: development setup, tests, quality gates, releasing.
- Changelog.
Origin and credits
novomodelo-bridge is developed by Operador Nacional do Sistema Elétrico - ONS,
Câmara de Comercialização de Energia Elétrica - CCEE and Empresa de Pesquisa
Energética - EPE, with other contributors, as a fork of
cobre-bridge. The fork was created
from the cobre-bridge v0.18.0 release (commit 8ca8e38, tagged fork-point in
this repository); every commit up to and including it is cobre-bridge's and is
preserved unchanged here.
License
Apache-2.0
Metadata
Release files for novomodelo-bridge 0.18.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| novomodelo_bridge-0.18.1.tar.gz | 2.4 MB | With provenance | Details for novomodelo_bridge-0.18.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| novomodelo_bridge-0.18.1-py3-none-any.whl | Python 3 | none | any | Details for novomodelo_bridge-0.18.1-py3-none-any.whl |
Total release size: 3.3 MB
Release files / novomodelo_bridge-0.18.1.tar.gz
| Download URL | novomodelo_bridge-0.18.1.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
734324caa12c34c58119d89861021247126cc643288ca92a8c482a590c90ca7e
|
|
BLAKE2b-256 checksum How to use checksums |
17c449613bd5ef7267e32dd3732fe8228a53540defce21ea8da74f8c3324b603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / novomodelo_bridge-0.18.1-py3-none-any.whl
| Download URL | novomodelo_bridge-0.18.1-py3-none-any.whl |
|---|---|
| Size | 865.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28d8ee19f23120299437ecf2f8400e5c8380b70b9ef9a2cec21c6ad8e600a0c0
|
|
BLAKE2b-256 checksum How to use checksums |
e4f3c378ff61b816494d26db435d76a7fdf2bcaca93a493c18ead0b858c13258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logSecurity for novomodelo-bridge 0.18.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for novomodelo_bridge-0.18.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.