This guide walks through the typical SmartBuildSim workflow using the bundled
office-small scenario.
pip install -e .[dev]
List available presets and export the selected BIM schema:
smartbuildsim bim init outputs/schema.yaml --scenario office-small
The generated YAML includes building zones, areas, and sensor metadata.
smartbuildsim data generate examples/configs/default.yaml
The dataset is written to outputs/dataset.csv. All generation steps are
seeded to ensure determinism. Add an optional determinism section to your
YAML to control the global seed used by the CLI:
determinism:
seed: 2024
See Deterministic execution for component specific overrides.
smartbuildsim model forecast examples/configs/default.yaml
smartbuildsim model anomalies examples/configs/default.yaml
smartbuildsim cluster run examples/configs/default.yaml
smartbuildsim rl train examples/configs/default.yaml
Artifacts are produced under outputs/: forecasting model (*.joblib),
forecast predictions (forecast_predictions.csv), anomaly annotations
(anomalies.csv), cluster assignments (clusters.csv), and RL Q-table
(rl_q_table.npy).
smartbuildsim viz plot examples/configs/default.yaml \
--anomalies-path outputs/anomalies.csv --clusters-path outputs/clusters.csv
An annotated plot is saved as outputs/plot_<sensor>.png.
Customise runs without editing YAML files:
smartbuildsim data generate examples/configs/default.yaml \
--override data.days=5 --override data.seed=2024
Overrides apply to nested keys using dotted notation.
For a quick regression test of deterministic behaviour run ./reproduce.sh,
which executes the CLI pipeline twice and verifies that the generated datasets
match byte-for-byte.
Consult the reference documentation for module-level deep
dives or open examples/scripts/run_example.py to explore the entire workflow
as executable Python code.