Warm tip: This article is reproduced from serverfault.com, please click

Keep resource seized after Rack Pick in AnyLogic

发布于 2020-12-19 21:58:31

I can't seem to find a way to keep a resource seized after "rackPick". In the "rackPick" block I am choosing "Use resources to move". So I want a resource to move the agent from the pallet rack to a certain node. When reaching the node, I want the same resource to stay there to work on other activities (e.g. pick-up block). However, there is no option not to release the resource after picking. I also don't want to use a seize block before rack pick because I want the agent to move at the speed of the resource during picking. Any suggestions?

Thanks.

Additional details: The exact process is as follows:

Rack Pick --> Pick-up --> Rack Store

I need the same resource to do the three steps.

Questioner
Emile Zankoul
Viewed
0
Felipe 2020-12-20 19:57:47

what you have to do is reserve the resource. You can have a link to agents in the resource called agentLink... it will be connected if reserved and disconnected if not reserved.

in the resourcePool on seize unit action you can connect agent and resource through the agentLink (unit.agentLink.connectTo(agent))

You do also in the rackpick block custom choosing of a resource based on the condition !unit.agentLink.isConnected()

then in the rackstore you use the condition of the resource as unit.agent.equals(agent.resourceLink.getConnectedAgent())

And that's it :)