solve() method. Hardwave provides a decorator for quick authoring and a manual registration path for full control.
Using the @component decorator
ComponentMeta and registers the class with ComponentRegistry.
Manual definition
Parameters
Parameter defines static configuration on a component instance:
self.get_param("t_min"). Override defaults when adding instances to a graph:
Optional ports
Mark input ports as optional with a default:Aggregating input ports
When several upstream components should drive the same input, useaggregating_input_port(). The engine gathers all connected values and produces one value for solve().
SUM, MEAN, MIN, MAX, PRODUCT, FIRST, and LAST. Optional min_connections and max_connections enforce wiring limits at validation or connect time.
Aggregating Input Ports
Full guide with graph wiring, disconnect APIs, and serialization notes
Testing in isolation
Callsolve() directly before wiring a component into a graph:
Injecting a custom solver
Replace the defaultsolve() logic without changing ports or wiring:
Runtime fault diagnostics
Components can emitWARNING and FAULT diagnostics when operating limits are exceeded during simulation. Implement two optional hooks:
health and fault_code output ports so other components (e.g. an MCU) can react to faults:
Component Faults and Health
Built-in fault rules, FaultMode, and result inspection
