I'm working on a supply chain project with AnyLogic. In my model which is similar to product delivery example in AnyLogic examples, there are two agents which are Retailer
and Fulfillment center
. Both have their own vehicles. What I'm trying to do is to share vehicles so retailers
and Fulfillment centers
use the vehicles of each others. What I did is to create two Ressource Pool
in each agent. So in the seize block as it shown below in picture, I added two ressource sets
. In each statechart of each vehicle as it shown below and after delievering products, I informed my vehicle to go back to his initial location and in this case it can be Retailer
or Fulfillment center
. However after simulation, I got an error message in console that tells me that my agent which is the vehicle
is trying to move to unknown source
A question about seizing more than one ressource in Anylogic
253 Views Asked by Chloe At
1
If you put 2 ResourcePools into 2 agents, you have 4 pools in total. But you only want 1 shared pool, right?
Only add 1 ResourcePool to Main and use that from both agent's
Seize
elements. You will not be able to select the pool in the usual dropdown list (as there is no pool in either agent) but you can easily use the dynamic code to specify it. Note that the code below assumes both agents are embedded in Main: