trano-simulate
Simulate Modelica models with OpenModelica, in a Docker container of the
OpenModelica image or with the omc of your machine, and report their results.
It is the simulation backend of trano, and does not depend on it:
a model is the name and the Modelica text of a package whose top model is building.
from pathlib import Path
from trano_simulate import ModelPackage, SimulationOptions, run_simulation
package = ModelPackage(name="Decay", source=Path("decay.mo").read_text())
result = run_simulation(Path("run"), package, options=SimulationOptions(end_time=3600), runtime="docker")
result.success, result.result_path, result.error_kind, result.error_message
runtime="docker" needs Docker; runtime="local" needs OpenModelica's omc on the PATH, with the Modelica
libraries installed (trano-install-libraries).
Reports
A report needs two files: the description of the model, which trano writes next to the model it generates
(<name>.description.json: its spaces, constructions and systems, and the result variables to plot), and the result
file of the simulation.
from trano_simulate.reporting import ModelDocumentation, to_docx, to_html_reporting
documentation = ModelDocumentation.from_files(Path("house.description.json"), Path("run/results/house.building_res.mat"))
Path("house.html").write_text(to_html_reporting(documentation))
to_docx(documentation, Path("house.docx"))
Development
uv sync
make linting
make tests # unit tests
make simulate # simulations in Docker
Metadata
Release files for trano-simulate 0.2.0
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 | |
|---|---|---|---|---|
| trano_simulate-0.2.0.tar.gz | 24.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trano_simulate-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.2 kB
Release files / trano_simulate-0.2.0.tar.gz
| Download URL | trano_simulate-0.2.0.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9f006acdecba3f457051841a6a4a1eca965260d128c6f5703cf47ff0e9a9af9
|
|
BLAKE2b-256 checksum How to use checksums |
34c556ce930c7d7f98036aec119349f4127dd311edd209c1851a5a1465ab68fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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_simulate-0.2.0-py3-none-any.whl
| Download URL | trano_simulate-0.2.0-py3-none-any.whl |
|---|---|
| Size | 27.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b4d6b1088937897da6d207345e2b71d26bf58a6b7e3b146c98275568ed011cd
|
|
BLAKE2b-256 checksum How to use checksums |
b297b32247a5af3f7e0d468421ac1a0f0a8f0ecf7c14ff16c35f51a8307f7243
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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-simulate 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.