Agent is not in a network at Rack Store and Rack Pick - anylogic

i`m trying to take pallets from a conveyor to a Rack and after some time the Picker(Ressource) should take the Pallet out of the Rack to a conveyor again. But if i try to use the Rack Store, i get the error: The agent is not in a network. I think the problem is the Ressource(Picker), because without it the Rack Store is working.
Thanks for helping.

This might work, assuming you are using a conveyor from the material handling library, after the conveyor use a conveyorExit block.
The conveyorExit block allows your agents to move smoothly from a conveyor network to the normal network.
If you are using a conveyor from the process modeling library, then it means that you are not connecting your networks correctly and you should be sure you conveyor path is connected in the same network as the path in which your palletRack is located.

This might fix. In my case: I had 4 process flows of the same type of agent (ie. agent Type: product) coming into the RackPallet. Two is a to model processes before agent:product is stored in Rack, and the other two is to model the initial Stock of the Rack.
This solved my problme: I put the code
agent.setNetwork(network2);
before the RackStore of the initial Stock process flows, and it worked. I think this is because when we model initial Fill, the agent is not set on a on network yet.

Related

AnyLogic - Is there a function like "Move by Transporter to seized resource"?

In this model I want to transport MaterialBoxes (Agent) to the next available workstation by an AGV. I wanted to keep the model as simple as possible, but I did not find a solution to transport the MaterialBoxes to a seized resource (Workstation 1 or Workstation 2) by using the "Move by Transporter" or "Seize Transporter" blocks. Therefore I adapted the solution of the "job shop model" (https://anylogic.help/tutorials/job-shop/index.html) by using the "rack pick" block to transport the Materialboxes from the rack to the seized workstation. How can I adapt the model and avoid the process step going through the rack system with "rackStore" and "rackPick"? And I still have the problem to allocate an AGV to transport the MaterialBoxes from Workstation 1 and Workstation 2 to the Exit. Currently I'm just using the "moveTo" block to transport the boxes without a transport resource to the Exit. I am grateful for any advice. Thank you very much.
current Model
You need to add a custom variable to your agents where you can store the workstation that they seized and then in the move to block you can have them move to the station that they seized.
When the agent then seizes a workstation you save the work station it seized to the variable.
When it is time to move the agent you can move it to the location of the seized workstation.
You can also check out the solution in the example model Trauma Center https://cloud.anylogic.com/model/0c41592c-96d8-4824-b816-c89eccfd79db?mode=SETTINGS
Here agents move to the resource unit home, location of the unit that they seized

Truck (Agent) Hitbox in process modeling library

im creating some paths with the process modeling library. The trucks shall stop in series when waiting for the "go" signal to go on.
At the moment the trucks are waiting "within" each other.
How to tell the trucks to recognize not the stopnode only but also the hitbox of the truck which arrived before him?
Thanks in advance
Chris
The trucks shall stop in series when waiting for the "go" signal to go on.
At the moment the trucks are waiting "within" each other. [...]
How to tell the trucks to recognize not the stopnode only but also the
hitbox of the truck which arrived before him?
AnyLogic allows for agents to queue along a path (from an animation perspective) whilst in a Queue block. So don't make them move to the stop-node (which I assume you are doing explicitly): make them (from a process point-of-view) go into a Queue which is animated via the path from the stop node 'backwards'. (This is the "Agent location" setting of the Queue block.) How you hold them in the queue and release them when they need to depends on the nature of your model; e.g.,
Use a Hold block following the Queue (if it makes sense to release them all at once)
Use a 'dangling' Queue block which you pull agents out of programmatically (e.g., via its removeFirst function) and then add them somewhere else in the process via an Enter block.
Use a Seize block (which has a built-in Queue you can set the location of) with the resource seized representing the 'token' you need to proceed.
NB: From the process perspective, they are in a Queue which happens to be animated as queueing along a path. This isn't exactly the same as modelling the 'spatial reality' of being in a queue: see this question.
Simple solution is to turn your truck agents into Transporters from the Material-handling library. They have build-in collision avoidance.
However, this can slow large models so you may want to convert them only when you need collision avoidance and then convert back to "simple" Truck agents again.
Else, you need to build your own additional stop-nodes and code spatial queuing manually. Possible but not straight forward

Can resources carry multiple agents in Anylogic?

In the below image I am using AGV as resources to carry Containers(agents) in the rackStore and rack Pick blocks. By default, one AGV carries only one agent; Is it possible to set agent carrying capacity of resources such that it can carry multiple agents?
Sure. Just use the Batch element before the pickup and batch your containers together. Then, the AGV will pickup a batch, i.e. several containers.

Pallet Rack Size does not update if using pick-up

I know that for an object to be removed from a pallet rack you need "Rack Pick". However, in one of my models, I have a different configuration where I am using pick up:
Step 1: 10 agents are in the rack
Step 2: Another agent picks them up
The way AnyLogic understands the above is that the rack still holds 10 agents, so I get the error eventually that the pallet rack is full. Is there a simple turnaround for this?
you have to remove the agents from cells with this line of code
palletRack.remove(agent);
put it to your pickup block, "on pickup" trigger.

Moving pallet between racks Anylogic

Is it possible to move pallet between two different racks directly, without adding intermediate point node? For example I have two racks one at the receiving dock and one a the storage, after unloading all pallets to Receiving rack I need to send it to storage rack. So I understand I need to add two blocks Rack Pick and Rack store. Is it possible to combine those two?
You can always combine any number of blocks and make your own composite block. Select them, right-click and choose "create flowchart block".
This tutorial (phase 7) shows you how to do it and how to make it as flexible/reusable as you want.