RVDLAB

Get started

Install RVDLAB, check the environment, and run your first simulation.

Commands use the documented v0.4.0 snapshot, commit afa38fe. The interface screenshot shows v0.4.1.

Requirements

The Python package builds and installs the TUI and C++ runtime together.

DependencyVersion
Python3.10 or later; Textual 8.2+ is installed as a dependency
C++ compilerC++17 support
CMake3.16+; 3.21+ when using presets
NinjaRequired by the release preset

On Windows, use an x64 Visual Studio developer terminal or a configured MinGW toolchain. macOS execution still needs validation on the target device.

Install from source

Clone the repository and check out the documented version.

Get the source
git clone https://github.com/Strtus/rvd-railbench.git
cd rvd-railbench
git checkout afa38fe6710dbe89b8481ef1c5fe270dff5ef492
Bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install .
rvdlab --version
rvdlab --check
rvdlab

--version shows the interface and runtime versions and paths. --check checks runtime, policy and configuration readiness. It returns 0 when ready, 1 when a condition is not met, and 2 when the project cannot be located.

Run a simulation

To run the C++ tools directly, build and test them from the repository root.

Build and test
cmake --preset release
cmake --build --preset release
ctest --preset release

Run a 12-step simulation in a new experiment directory.

Run the example
build/release/rail_main \
  --config configs/rail.ini \
  --config configs/pfcr_dqp.ini \
  --config configs/simulation.ini \
  --fast --max-steps 12 \
  --experiment-dir experiments/example
The 12-step example typically ends with MAX_STEPS and exit code 1. Once the record has been written, run replay separately. Use a new experiment directory for each run.

On Windows, use the corresponding .exe files. Adjust the output path if you use another build generator.

Replay the controller

Replay
build/release/rail_replay experiments/example

Replay checks record integrity, restores the initial state, and compares controller actions, next states and flags. It does not create RailIO or send commands to hardware.

Understand the experiment record

Command reference

OptionPurpose
--rootSelect an installation or source directory.
--configApply a configuration file; repeat to layer configurations.
--experimentsChoose the experiment record directory.
--profilesChoose the rail profile directory.