Diagnostic system for both pre-run validation and runtime component health events.
Exception hierarchy
PremiumError:
Diagnostic levels
Diagnostic carries:
Graph validation
GraphValidationError carries a full list of Diagnostic objects:
Common wiring errors
Validation checklist
Before callingengine.run(), ensure every required input port is:
- Connected to an upstream output, or
- Has a default value, or
- Appears in the
inputsdict passed torun()(andvalidate())
Runtime component faults
During simulation, components with fault rules emitWARNING and FAULT diagnostics. These are collected in SimulationResult. They do not raise exceptions unless fault_mode=STOP.
Built-in fault codes (stdlib)
DCMotor
LiPoCell
See Component Faults and Health for parameters, degraded output behaviour, and how to add faults to custom components.
Simulation errors
Deserialization
DeserializationError is raised when loading a saved graph with an unknown component class, incompatible schema version, or corrupt JSON. Ensure all custom components are registered before calling SimulationGraph.from_dict().