Search code examples
delayanylogic

Unable to use agent parameters in delay block


In my source block/move to block I can use agent parameters to for example tell the agent to move to a specific node by coding the location node as agent.locationnode. But somehow in the delay block I'm not allowed (see image below) to use the agents parameters in the agent location. Is there a way to fix it, or is there another option to create a delay with using agents parameters. What I want is that my agents wait at there current location for a specific uniform distributed time. But when I just use the delay block, my model gives the error that it can not leave the delayblock, since there is no agent location I guess.

enter image description here

The next error


Solution

  • The issue here is not related to the delay, rather to the source. In delay, you have capacity 1, and the next created agent cannot enter this block. You need to increase the capacities, as mentioned in the error message.

    If you click Forced pushing, the error message might go away. But it might not be a good solution.

    Usually putting a queue (with max capacity) before the delay solves the issue.