For logic testing purposes, I am using a clickable button triggering "source.inject()." The preceding logic for the agents is dependent on agent characteristics. Thus, it is preferable to have control over which characteristics they get during initiation when testing the model logic. Searching the AnyLogic documentation on the source block's inject()-function does not show any way to mandate the initial characteristics.
I have tried using "add_patients();" this allows for the creation of agents, and I can specify the characteristics inside the parentheses as I like. However, the agents will not enter the statechart if I use this function.