Skip to content
NRCanPublic

About

TRNRun is a tool for running TRNSYS simulations, built to make batch runs easy to automate, monitor, and orchestrate.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

TRNRun


Unit Tests TRNSYS 17 / 18 License - MIT

TRNRun is a tool for running TRNSYS simulations, designed to make batch runs easy to automate, monitor, and orchestrate from Python, MATLAB, .NET, or the command line.

TRNRun Runner Terminal Display GUI
TRNRUN_Runner.mp4
TRNRUN_Python.mp4
TRNRUN_GUI.mp4

Components

Component Role
TRNRun Runner Runs and monitors one deck, emitting JSON Lines events.
TRNRun Daemon Queues and tracks simulations for one client over a JSON pipe.
Type3830 Reports simulation progress for monitoring and stall detection.

Libraries

Library Release Compatibility Install
Python PyPI Latest Release Python versions pip install trnrun or uv add trnrun
.NET NuGet Latest Release .NET 10 dotnet add package TRNRun
MATLAB MATLAB Toolbox Latest Release MATLAB R2021a+ .mltbx from GitHub Releases

Each library runs concurrent simulation batches through the bundled daemon.

Requirements

Quick start

Python

from trnrun import SimulationManager

with SimulationManager(workers=1) as manager:
    simulation = manager.add(r"C:\path\to\deck.dck", keep_awake=True)
    manager.wait(simulation)

See the Python documentation for more details.

MATLAB

import trnrun.*
manager = SimulationManager(workers=1);

simulation = manager.add("C:\path\to\deck.dck", ...
    SimulationSettings(keepAwake=true), waitFor="FINISHED");

See the MATLAB documentation for more details.

.NET

using TRNRun;

await using TRNRunDaemon daemon = await TRNRunDaemon.StartAsync(workers: 1);
long simId = await daemon.AddAsync(@"C:\path\to\deck.dck", new SimulationSettings { KeepAwake = true });
Simulation simulation = await daemon.WaitForFinishedAsync(simId);

See the .NET documentation for more details.

License

TRNRun is available under the MIT License.

About

TRNRun is a tool for running TRNSYS simulations, built to make batch runs easy to automate, monitor, and orchestrate.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages