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 its FastModelMPC 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)

Installation

pip install trano-optimization

This installs rumoca 0.10.2 from PyPI, which translates flat models. The models of trano's FastModel 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.2.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.2.0
File Size Uploaded Provenance
trano_optimization-0.2.0.tar.gz 15.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 31.3 kB

Release files / trano_optimization-0.2.0.tar.gz

Download URL trano_optimization-0.2.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b44948e72f8c0e885f4a4765257e9ae689d5a1430bbd2f1a99c58e74e046018a
BLAKE2b-256 checksum
How to use checksums
806b29a8306eefc60a9c6153be05785486e9b8772e2e09a3b8fc2f14eeadd7e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.2.0-py3-none-any.whl

Download URL trano_optimization-0.2.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8d72f15685a8d3991bcbca089fc17a12b3f9e8303a15147c0ba0418967ba170
BLAKE2b-256 checksum
How to use checksums
91944d4c35d5c755e6b361b51c0a9348889939031f9fab8592585c89a801489f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.2.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.

Release history Release notifications | RSS feed

This release

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