bluechimp
bluechimp

Reputation: 59

In Anylogic, is it possible to send an agent from one storage to another directly?

I have 2 storages (called storageA & storageB) and I want to move an agent (pallet) from one to the other via forklifts. I have set up the following.

enter image description here

A pallet is created at a node and is moved to storageA via 'store'. This part works fine. The pallet is then moved to storageB via 'store1' after a delay. This is when the following error occurs:

Exception during discrete event execution:
root.store1.seizeTrans.freeSpaceSendTo:
Path not found! {agent=2, source={level=level, pos=(1673.3333333333333, 3245.0, 0.0)}, target={level=level, pos=(1857.25, 3160.4845, 0.0)}}

It works if I replace 'store1' with a retrieve block and send it to a node first. However I would like to send the pallet directly to another storage rather than via another location. Is this possible?

Please let me know if I have not provided enough information.

Thanks

Upvotes: 0

Views: 628

Answers (2)

Thanh Mai Vu
Thanh Mai Vu

Reputation: 1

I had the same question today so I landed here. But luckily, only after the second step written above, the whole process needed did already work for my case. We can move an agent from one storage to another by simply set the destination of the 'retrieve' block to the coordinate of the agent and the move to independently instead of by fleets or resources. after that we put the 'store' block.

    Destination is: (x,y,z)
    X: agent.getX()
    Y: agent.getY()
    Z: agent.getZ()
  • after agents being retrieved to a specified coordinate, it seems that fleets do not comply paths in the network anymore

Upvotes: 0

Felipe
Felipe

Reputation: 9376

yeah unfortunately you can't do that as far as I know, the solution I use is the following, which is actually not a super robust solution... but has been ok in applications so far

  1. Place a retrieve block between your delay and your store1
  2. Use the agent you pick up as destination: agent destination
  3. on the on seize action of the retrieve block do:agent.transporter=unit;

4.On the store1 block put the highest priority for the task
5. ON the store1 block use resource custom transporter choice: agent.transporter.equals(unit)
6. The dispatching policy should be nearest to the agent in store1, but doing all the above ensures that the resource continues doing the task no matter what... by only using the dispatch policy your model will work 99.999999% of the time... the problem occurs only if another task with higher priority occurs at the exact same time as the transporter is released in the retrieve block, which is rare, but can happen.

Upvotes: 1

Related Questions