'Combine two resources and then send to a node in Anylogic
I am simulating a warehouse inspection model where an inspection-officer (present as node1) needs to go to a different node (node2) to collect tools and then go to node where object to be inspected is laid out.
I am using a resource pool for both inspection-officer as well as tools.
Using the following blocks:
source -> seize -> delay -> release -> sink
In the seize block I have configured to use resource-sets (1 inspection-officer and 1 tool) I have checked the following configs:
- seize units one by one
- Attach seized resources
- Send seized resources
The issue is, both tool and inspection-officer start going to the source separately and then get combined as one unit at the source (and also keep combined while returning to their location), but what I need is the inspection-office should go to the tool, then they should get combined and go to the source node
What am I doing wrong?
Solution 1:[1]
You need to use the resource start task block. That way one resource will seize the other before being seized by the agent.
Solution 2:[2]
resourceTaskStart(to start inspection-officer) -> Seize (to seize the tool) -> moveTo (move to tool node location) -> ResourceAttach(to attach operator and tool) -> moveTo (to send attached unit to source node)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Emile Zankoul |
| Solution 2 | Ankit Sahay |
