use Statechart
Select the active statechart. Allowed only when the current chart (if any) is not started — for a PermanentAgent that means between replications / simulate() calls (the chart is stopped at afterReplication). The selected chart is started by initialize at the next replication. See Agent.useStatechart.