Installation

HAI-CPPS v2.2 can generate benchmark recordings with OpenModelica or run a custom topology as a raw simulation. Run the commands below from the v2.2 source branch on Ubuntu.

OpenModelica and Modelica library

Install the system packages and OpenModelica using its Ubuntu repository:

sudo apt update
sudo apt install ca-certificates curl gnupg build-essential python3 python3-venv python3-pip
curl -fsSL https://build.openmodelica.org/apt/openmodelica-2026.asc \
  | sudo gpg --dearmor --yes -o /usr/share/keyrings/openmodelica-keyring.gpg
. /etc/os-release
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] https://build.openmodelica.org/apt ${VERSION_CODENAME} stable" \
  | sudo tee /etc/apt/sources.list.d/openmodelica.list
sudo apt update
sudo apt install --no-install-recommends omc
omc --version

The v2.2 source was smoke tested with OpenModelica 1.26.1. The models require Modelica Standard Library (MSL) 4.0.0, which OpenModelica manages separately from the compiler. Install and verify that exact MSL version with the OpenModelica package manager:

cat > /tmp/hai-cpps-msl.mos <<'MOS'
updatePackageIndex();
installPackage(Modelica, "4.0.0", exactMatch=true);
loadModel(Modelica, {"4.0.0"}, requireExactVersion=true);
getVersion(Modelica);
getErrorString();
MOS
omc /tmp/hai-cpps-msl.mos

The output should report true for both installation and loading and "4.0.0" for the loaded version.

Python environment

Create a virtual environment and install the dependencies listed in the v2.2 branch’s requirements.txt:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

Activate the environment in each new shell. Check the planned campaign without starting a simulation:

python code/campaign.py --plan

See Using the Simulation for the supported benchmark and custom workflows.