Command-Line Interface and Configuration
HAI-CPPS v2.2 has two supported launchers. Use code/campaign.py for a validated benchmark release and code/simulate.py for one raw simulation of a custom topology. Run both from the repository root.
Campaign launcher
python code/campaign.py [--dataset ds1] [--jobs 4] [--plan]
[--config code/benchmark_setup.json]
[--output output/v2.2]
[--build-root build/v2.2/campaign]
[--logs <directory>]
--plan prints the recording count and initial queue without writing output. --dataset restricts work to one topology. --jobs is the maximum number of concurrent recordings and defaults to four. The launcher resumes complete compatible recordings on rerun, then validates each shard and the selected campaign. An incompatible existing manifest or changed release artifact is an error; use a new destination for a changed campaign.
The build and output roots must be separate. The launcher refuses to write into protected release locations, including data/v2.2. Worker logs default to <build-root>/logs/.
Benchmark configuration
code/benchmark_setup.json defines ds1 through ds10. Each dataset has ds_name, model.modules, model.edges, and sim_setup. A module lists its Modelica files, type, and supported faults; optional campaign_faults narrows the fault proxies selected for a campaign. Each edge joins an output endpoint to an input endpoint. The simulation settings include startTime, stopTime, numberOfIntervals, faultStart, and seed.
The canonical v2.2 benchmark uses times 0–25,000 with 25,000 intervals and fault onset at 2,500. The campaign planner assigns healthy seeds and reserves seed 42 for each topology’s healthy test control and paired fault recordings. See Campaign Output and Data Directory for the split, scenario names, and fault windows.
Custom raw launcher
python code/simulate.py --config examples/custom.json --dataset custom1
[--output output/custom]
The --dataset value is the top-level key in the JSON configuration. The example configuration shows the required structure for a new module. code/config.py and code/schemas/benchmark_setup.schema.json validate module types, ports, file references, fault names, and simulation timing. A custom module has type: custom, an explicit Modelica class and port lists, and no configured faults.
Reading a benchmark recording
The v2.2 branch does not supply the former dataset_io loader. Read a chosen Parquet measurement view with pandas, and use permitted_inputs.json as its diagnostic input policy:
import json
from pathlib import Path
import pandas as pd
recording = Path("output/v2.2/ds1/ds1/ds1_016_healthy")
policy = json.loads((recording / "permitted_inputs.json").read_text())
measurements = pd.read_parquet(recording / "hybrid/measurements.parquet")
X = measurements[policy["measurements"]]
# Add controller commands only if your experiment assumes they can be logged.
commands = pd.read_parquet(recording / "commands.parquet")
X_with_commands = X.join(commands[policy["commands"]])
scenario_id, simulation_step, and simulation_time align the tables but are excluded identifiers, not diagnostic features. oracle_states.parquet, fault labels, and verification data are offline information. See Campaign Output and Data Directory for each artifact’s role.