BobDyn/BobLib Setup
This page lists what you need to work on BobLib directly: the source, OpenModelica, the Modelica libraries, and a Python environment. For a guided first run, see the BobLib Startup guide.
Get the source
Clone BobLib directly for model development and debugging:
git clone https://github.com/BobDyn/BobLib.git
cd BobLib"Repository root" in the BobLib docs means this BobLib directory. It holds:
| Path | Contents |
|---|---|
BobLib/package.mo | The production Modelica package |
Tests/BobLibTest/package.mo | The sibling package of regression and component fixtures |
Tests/ | The Python test harness and baselines |
makefile | Check and dependency targets |
msl_setup.mos | The Modelica library install script |
See Package Map for the full layout.
Install OpenModelica
For CLI use, you need:
omconPATH- a C/C++ compiler toolchain that OpenModelica can use
- Modelica Standard Library
4.1.0 - VehicleInterfaces
2.0.2
For OMEdit, install the full OpenModelica GUI stack, not only the compiler. BobLib CI uses the container openmodelica/openmodelica:v1.26.3-ompython.
Official OpenModelica links:
Install both Modelica libraries at the exact versions:
make modelica-depsThis target runs omc msl_setup.mos, which installs Modelica 4.1.0 and VehicleInterfaces 2.0.2 through the OpenModelica package manager.
Check the compiler:
omc --versionSet up Python
The test harness needs Python with pytest and ruff. The versions are pinned in Tests/requirements-dev.txt.
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip -r Tests/requirements-dev.txtOn Windows PowerShell, activate the environment with:
.\.venv\Scripts\Activate.ps1Check the install:
python -c "import pytest; print('ok')"Run a first check
A small first check:
make modelica-smoke PYTHON=.venv/bin/pythonThe full local gate takes longer:
make ci PYTHON=.venv/bin/pythonSee Tests and Checks for every target.
Use BobLib inside BobSim
BobSim includes BobLib as a Git submodule at:
_0_Utils/external/BobLib/BobSim uses it as a static Modelica library. Vehicle data comes from checked-in Modelica records. There is no Python or YAML generation step.
