Skip to main content

trano-optimization

Optimal control, moving horizon estimation and simulation of Modelica models: rumoca translates the model into a CasADi function, solved by direct collocation with IPOPT.

It works on the Modelica text of an explicit ODE (for instance the building_mpc model that trano generates with the FastSmoothBuildingsMPC library) and does not depend on trano.

from trano_optimization import CasadiModel, OptimalControl

model = CasadiModel.from_modelica(source, "house.building_mpc")
result = OptimalControl(model).solve(initial_state, disturbances, comfort_lower, price)

A model that uses a Modelica library without holding it gives rumoca the folder of the library:

import fastsmoothbuildings

model = CasadiModel.from_modelica(source, "house.building_mpc", roots=[fastsmoothbuildings.LIBRARY])

Installation

pip install trano-optimization

This installs rumoca 0.10.2 from PyPI, which translates flat models. The models of the FastSmoothBuildings libraries are made of connected components, which rumoca exports to CasADi from 0.10.3 only, not released yet: install it from its main branch (Rust toolchain), as [tool.uv.sources] of pyproject.toml does.

pip install "rumoca @ git+https://github.com/CogniPilot/rumoca@33c21141791cbc341f4788ff6353d2f49d1c740a#subdirectory=crates/rumoca-bind-python"

Development

uv sync         # builds rumoca from its git source (Rust toolchain)
make linting
make tests

Metadata

Release files for trano-optimization 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trano-optimization 0.3.0
File Size Uploaded Provenance
trano_optimization-0.3.0.tar.gz 15.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for trano-optimization 0.3.0
File Interpreter ABI Platform
trano_optimization-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / trano_optimization-0.3.0.tar.gz

Download URL trano_optimization-0.3.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6d4c0bcdc6fa1d6ad0133775137c5907e7dae37844e1dee717f14b62ea97ab4d
BLAKE2b-256 checksum
How to use checksums
ea41c29f3d22209e0072932f7974f5ea25df3860c8f9dd8009451923b2fcf36d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / trano_optimization-0.3.0-py3-none-any.whl

Download URL trano_optimization-0.3.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caf8085963577cefc1fb90323dd8059ca4f31c3cba4ea3c872ddcd2f8b8b16cd
BLAKE2b-256 checksum
How to use checksums
ac6dce4c2c66876b76100bd6c3394c21e1127d53a68d36b4a952c8b97d88de02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for trano-optimization 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page