I am making an Agent-Based Model in AnyLogic where agent behavior is described in Statechart. I want to allocate certain resources to those agents (primarily rooms, in form of nodes), which is spatially placed in a blueprint of a certain building. Please see picture one, for example.
Currently, the model emulates the effect of limited resources by jumping out of the Statechart by using function calls like "main.enter_SeizeTR.take(this);" in order to get the patient to proceed in following DES-path:
My question is; Is there any way to emulate this purely from a Statechart so that this back-and-forth between these two paradigms is not necessary?
Short answer: There is, but it would be a lot of effort, 99% of cases not worth it.
Do not see switching between paradigms as a pain. It is the opposite: you use the most suitable elements for certain model parts, dancing between them seamlessly. It is one of the key advantages of AnyLogic ;)
Keeping to 1 paradigm is what holds many models back.