Trouble with the Storage and Retrieve System - anylogic

Description of a Model :A week before i started Learning Anylogic and Developing a WareHouse Model, which take Pallets from a Truck and unload it by unloaders and place it at someplace then Transferer will pick that pallets and then put it on a conveyor. At the end of the Conveyor the Forklifters will pick and place it in a storage area. After a delay then Forklifters will Retrieve it and place at somepoint then loaders will pick that up and loaded in to a RetailTruck.
Error: showing error in retrive system as
root.retrieve: Cannot reach cell [Cell: [Storage: storage, Rack: 0, Bay: 1, Shelf: 0, Depth: 2]] to remove agent [150] from storage.
Error : If i increase the quantity of loaders and unloaders or incoming Trucks then i am getting an error as root.moveTo6.out
this i dont have a screenshot to show it.
Can someone please Help me in this.
[Retrieve][1]
[TranspoterFleet][2]
[Storage][3]
[Logic][4]
[Error][5]
[1]: https://i.stack.imgur.com/ywphY.png
[2]: https://i.stack.imgur.com/ASsnU.png
[3]: https://i.stack.imgur.com/CftFx.png
[4]: https://i.stack.imgur.com/nEsBF.png
[5]: https://i.stack.imgur.com/DmtRJ.png

Related

How to use Resource pool for for cleaning the tank in AnyLogic

When the tank gets empty the valve get close for 30 minutes (this 30 minutes is for cleaning the tank) am using dynamic event for that. as showmen in image below.
Now what I want to do is
use Resoucrepool (a worker) for cleaning the tank.
Use Resoucrepool (a worker) for opening and closing the valve.
Its there any way to achieve that?
what you can do is that on the "on empty" action in the tank, you generate a token, which is an agent called cleaningRequest that goes into a flow that requires a resource (enter-service-sink), and you close all the valves to avoid using that tank.
When the resource is released, or when the token gets to the sink, you open the valves again.
I only answered question 1, but question 2 should follow the same technique

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.
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
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
Place a retrieve block between your delay and your store1
Use the agent you pick up as destination:
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.
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

The resource jumps home after being released instead of using the path

In my model I have used the moveToBy block introduced in the jobshop model. I use this block to deliver the agents(product) to the destination by the resource (forklift). I set all the speed options I saw to one meter per second. The problem that occurs in time of running the model is that the forklift suddenly jumps home after getting rid of the product, while I want the forklift to return home through the path and at the same speed. this is picture of the moveToBy block and where I use it.

How can I simulate a border of a parking place?

I am currently working on a parking place simulation. Before entering the parking place, a car has to cross a border. To simulate that, I added a "carMoveToBorder" block, where the car moves to a stopline. Then I added a service block to simulate the time getting served by the borderService. Now that I am having a car network, I dont really know how to specify the location of the delay or the queue inside the service block. I tried specifying the location of the delay by entering the name of the stopLine but I got an error message saying: Type mismatch: cannot convert from Agent to AnimationStaticLocationProvider
Pictures are below.
Help is appreciated.
Thank you for your time.
borderServicePicture1
borderServicePicture2
why dont you try to use Delay instead of Service. One of the difference between them is that Service has embedded queue. But maybe in your case the car will never use that queue, i mean if its right in front of border but not quite there, it means its still in CarMoveToBorder block. And i guess in Delay you just dont have to set any agent location. (btw, what happens if you leave agent location blank in Service?)

Anylogic- Placing agents on other agent's location

I am having two agents, agentA(evStations) (initial location and numbers are loaded from a database), and an AgentB(eVs) (initially empty and the number of agents is specified by the user).
At the model start up, I want to place AgentsB at the locations of AgentA (exact latitude and longitude). How can I do that? Knowing that the number of AgentB is much larger than AgnetA.
What i have tried(based on an existing anylogic example), on the main> Agent actions> On startup
for(EV ev: eVs){
ev.set_lat(
selectFrom(evstations)
.where(evstations.id.eq(ev.getIndex()))
.firstResult(evstations.latitude)
);
ev.set_lon(
selectFrom(evstations)
.where(evstations.id.eq(ev.getIndex()))
.firstResult(evstations.logtitude)
);
ev.setLocation(ev.lat, ev.lon);
}
[enter image description here][1]
i am not sure how to do it correctly, I think this only works if both agents are having the same size.
Please advise?
thanks
first define all the evStations as agents, you can read them from the database.
Then
for(EV ev: eVs){
EvStation evs=evStations.random();
ev.setLocation(evs);
}