Search code examples
simulationanylogic

Change machine delay time for rejected source in AnyLogic


Agent moving from machine block (machine block delay is 9 minutes) to milling block. At the milling block, 7 percent gets rejected and goes back to the machine block. Now rejected agents move from machine to milling block, but this time the machine block delay time is 12 minutes. The question is, how can I achieve this 12 minute delay time now?

*** The logic image is given below:*** enter image description here


Solution

  • In the agent type of of your agents going through the process, create a variable of type boolean and call it rejected with initial value false. On Exit (false) of the your selectOutput1 write:

    agent.rejected = true
    

    The delay of the machine block should be

    agent.rejected ? 12 : 9