CLI Workflow
Use the CLI path for translation, initialization checks, regression checks, and direct simulation. It does not require OMEdit.
Make Targets
From the BobLib repository root:
make helpImportant targets:
| Target | Action |
|---|---|
make lint | Run Ruff over the Python test harness |
make test-python | Run Python coverage and regression harness tests |
make modelica-deps | Install OpenModelica library dependencies |
make modelica-translation | Translate standard entry points and BobLibTest fixtures |
make modelica-initialization | Initialize BobLibTest fixtures and compare the baseline CSV |
make modelica-regression | Simulate signal-level regressions and smoke-check BobLib/BobLibTest |
make test-modelica | Run all Modelica checks |
make test | Run Python and Modelica checks |
make ci | Run the full local CI suite |
For public release confidence, run:
make test PYTHON=.venv/bin/pythonLoading Smoke Test
From the BobLib repository root:
omcThen in the OpenModelica prompt:
loadModel(Modelica, {"4.1.0"});
loadModel(VehicleInterfaces, {"2.0.2"});
loadFile("BobLib/package.mo");
loadFile("Tests/BobLibTest/package.mo");
getErrorString();A clean load should return true for both loadFile(...) calls and an empty or non-critical getErrorString() result.
Translation And Simulation
To translate and build the active maneuver simulation without running it:
loadModel(Modelica, {"4.1.0"});
loadModel(VehicleInterfaces, {"2.0.2"});
loadFile("BobLib/package.mo");
buildModel(BobLib.Experiments.Standards.VehicleSim);
getErrorString();To simulate the checked-in active package as-is:
loadModel(Modelica, {"4.1.0"});
loadModel(VehicleInterfaces, {"2.0.2"});
loadFile("BobLib/package.mo");
simulate(BobLib.Experiments.Standards.VehicleSim);
getErrorString();The same pattern works for:
BobLib.Experiments.Standards.FourPostSimStatic Vehicle Templates
Vehicle architectures are checked in as Modelica records, subsystem models, four-post adapters, and standard templates. The default entry points are:
BobLib.Experiments.Standards.VehicleSim
BobLib.Experiments.Standards.FourPostSimThey extend or redeclare templates under:
BobLib.Experiments.Standards.Templates.Vehicle
BobLib.Experiments.Standards.Templates.FourPostTo switch the front-facing vehicle architecture, update VehicleSim.mo or FourPostSim.mo to extend or redeclare the desired template. Project/year- specific standard models can also extend the desired template and redeclare explicit values there.
BobSim Handoff
When BobLib is used as the BobSim submodule, BobSim consumes the checked-in Modelica package. BobSim owns the workflow YAML, case generation, result extraction, plotting, and reporting; BobLib owns the physical models and records.
From the BobSim root, use:
make standard-build
make standard-build-four-postScratch Builds
Scratch-directory OMC builds keep generated C, executables, XML, logs, and result files out of the repository.
From the BobLib repository root:
BOBLIB_ROOT="$(pwd)"
RUN_DIR="/tmp/BobLibVehicleSim"
mkdir -p "$RUN_DIR"Create a build script in that scratch directory:
cat > "$RUN_DIR/build_vehicle_sim.mos" <<MOS
OpenModelica.Scripting.cd("$RUN_DIR");
loadModel(Modelica, {"4.1.0"});
loadModel(VehicleInterfaces, {"2.0.2"});
loadFile("$BOBLIB_ROOT/BobLib/package.mo");
buildModel(BobLib.Experiments.Standards.VehicleSim);
getErrorString();
MOSRun it:
omc "$RUN_DIR/build_vehicle_sim.mos"Run the generated executable from the same scratch directory:
cd /tmp/BobLibVehicleSim
./BobLib.Experiments.Standards.VehicleSimFor the four-post model, use a separate scratch directory and replace the model class with BobLib.Experiments.Standards.FourPostSim.
