Robustness Reference
Robustness is optional and dataset-driven. If schema["robustness"]["enabled"] is missing or false, CityLearnEnv behaves as before.
Schema
"robustness": {
"enabled": true,
"events_file": "robustness_events.csv",
"random_seed": 0,
"missing_replacement_value": -9999.0,
"modules": {
"observations": {"enabled": true},
"forecasts": {"enabled": true},
"actions": {"enabled": true},
"assets": {"enabled": true}
}
}
events_file may be CSV or Parquet and is resolved relative to the dataset root.
Events File
Column |
Meaning |
|---|---|
|
Stable event identifier used in metadata and audits. |
|
|
|
|
|
Entity id/name, or |
|
Feature/action name. For assets use |
|
Inclusive global timestep window. |
|
Module-specific perturbation mode. |
|
Optional mode parameters. |
|
Missing/telemetry sentinel; defaults to |
|
Action delay horizon; defaults to |
Modes
Module |
Modes |
|---|---|
observation/forecast |
|
action |
|
asset |
|
Observation and forecast corruption is agent-facing only. Rewards, physical KPIs and demand-response settlement still use the real simulator state. Action and asset-control events change the action effectively applied, so they can change physics and normal KPIs.
Entity Diagnostics
Enable the diagnostic bundle when using entity observations:
"observation_bundles": {
"entity_robustness": {"active": true}
}
This adds district features for active state, previous-step corruption counts and active asset outages. Lightweight metadata is also exposed in observations["meta"]["robustness"].
KPIs
When robustness is enabled, evaluate_v2() adds district/building counters for event count, active timesteps, observation/forecast/action corruptions, asset unavailable applications, missing observations and action dropouts.
In MultiCommunityEnv, robustness stays independent per child community. Portfolio rows aggregate robustness _count KPIs in the same way as other count KPIs.