Search code examples
anylogic

Reassigning seized resources when split in Anylogic


Before entering a split block, my agent have already seized 2 resources. However, after the split, I want the original agent to take the first seized resource while the copy agent to take the second seized resource. How can this splitting of resources be performed?


Solution

  • that is not possible, you need to release one of the resources before the split block and then the copy has to seize it after its creation.

    Some hints to do that would be

    • make the resource have a variable equal to some key
    • the copy will seize only a resource that has a variable equal to that key
    • ensure no other seize or service block is able to seize the resource with that key