Agent Signal
A broadcast trigger that statecharts can listen for. Unlike AgentMessage (point-to-point) and onCondition (a predicate tested in the C-phase), a signal is an explicit notification fired by user code — typically at the end of a transition, a phase change, or an externally-driven schedule event.
A signal is a POJO: not a ModelElement, no automatic lifecycle. Create one wherever it's convenient (typically as a property of the AgentModel), share it across as many states and statecharts as needed, and call fire when the event occurs.
Subscriptions are managed automatically by the statechart runtime: states with onSignal(s) { ... } subscribe when entered and unsubscribe on exit (including via stop() at end-of-replication). Users do not interact with the subscriber list directly.
Differences from KSL's ksl.modeling.entity.Signal:
That one is a
ModelElementthat holds suspended entities and resumes them. It's a process-view primitive.This one is a statechart broadcast — observers, not coroutines. It cannot be waited on with
waitFor.
To fire one later, schedule it from the AgentModel: schedule({ signal.fire() }, t).
Parameters
optional display name for diagnostics