How do i recreate a loading truck case with a limited number of trucks? - simulation

I have a warehouse with many palletrack which contains raw materials that have to be loaded on trucks and moved to a second warehouse. The loading zones (where trucks are loaded) are the green rectangular nodes (see image). The problem is that I don't know how to recreate the loading. If I use a seize then every single agent will seize a truck, but if I used the pickup block (like the pickup model tutorial), the source would create more trucks than I want(they are limited).
Any tips? (i want to say thanks to all the people who are helping me this week by the way)

Although there are many ways to model this I think the best option would be to batch your agents into truckloads and then to seize the trucks. Trucks must live inside a resource pool, so that you can have a fixed number of trucks.
Since you are using a network model I would then suggest you attach the truck to the batch you created and move it around and then detach the truck and release it afterward. You can however simply seize the truck and have the batch object use the animation of a truck.

Related

Batching multiple agents based on location of agent

In my model I only want to batch agent which are at the same location. So my source block generates the agents according to a database to a specific node (which is sometimes different for agents), now I want the agents that occur at the same node to batch in sizes of 2 and the one that are left over need to be batched alone.
How can I model this, I know that I can use the selectoutput (which says for example if location=node1 use this output etc) option, but do I than have to add for example manually 100 outputs if I've 100 different locations where the agents start or is there a more simple solution for this problem?
Added later:
Or is there another way to model my idea:
So I'm simulating an hospital environment, where logistic employees (in this case the transporter) based on predefined times collects the thrash on certain areas for example the databaserow I show in the picture below:
At 9:50, the thrash at thrash collection point at LAB_Office_2_H_T_N can be collected by the logistic employee.
So in my model I create this 2 agents (which are 2 containers, last column) based on this time and seize a transporter to collect this thrash. Since a logistic employee is able to collect 2 thrash in one time I want to batch it and let the logistic employee collect 2 thrash containers at once.
After that he transports it to the thrash dump area and is released.
The colors changed after the added information. You can use pickup and dropoff blocks instead. You can define your node requirements in the condition cell. You can use local variables like container and agent to code whatever you want. Or use "Quantity (if available)" option. There you can programmatically define how many units will be picked up by using your own function.

Increasing model simulation speed with big number of agents/transporters Anylogic

I've a question. In my model I want to model patients/employees in a hospital environment as agents. Due to the big amount of patients/employees in the hospital (>4000), my model runs very slow (which is logical, I know). Because I want the patients employees to block eachother and AGVs, I let them move by a transporterfleet (which has >5000 capacity), by doing this method I can make it possible to let them block eachother.
Now what I want is that when the patient or employees arrive to the location departments they disappear for hours/minutes as long as there appointment or workschedule is saying to them. The most perfect is to just delete them for example 4 hours of runtime, so that I will only have the moving agents in my model, is there a way to do this? So that when a patient/employee arrives at an appointment, the agent and transport disappears for 4 hours and returns after this delay, keeping in mind that it should speed up the run-speed of my simulation (otherwise I just can use a delay block, but than my model keeps very slow). The transporters are making the model really slow.
Or perhaps another method will be better to model the patients and employees with the feature that they are blocking AGVs? An option which I should think of is that an moving agent is constantly checking if there is an agent close to him every second, but I do not know if this will be speed up the runtime or just will slow it down even more with >4000agents.
Or another option is that I only let the AGVs check if there are agents around them every second just by coding(this will only be around 40 agents).
Also you see that it is only using 5% of my memory data..
Thanks.

How can I use rackPick block to seize more than one item at once? - Anylogic

I'm developing a project with Anylogic and I have an AGV with a Kuka cobot on top of it (a sort of mechanical arm used to pick item from a shelf, in this case) which should pick some items from a rack store. I would like the cobot to pick more than one single item at once.
The blocks I already put are shown in the picture and I thought that specifying "seize whole set at once" in the rackPick block would have helped but it did not.
Could you help me, please?
Thank you in advance.
The RackPick logic is agent-centric, i.e. the items in the rack are the active entities. They, essentially "pick themselves", optionally using your robot as a help.
So if you want your robot to pick several, it is best to batch your agents together before putting them into a rack (using Batch) and then let your robot pick that batch agent. You can unbatch into the original agents afterwards.
PS: That "seize whole set at once" option is again from the agent perspective: if it would need several resources to be picked, then this option would have an effect. In your case, with only needing 1 robot, it is meaningless

Rackstore and rackpick multiple agents at a time in anylogic

I am trying to develop a model that essentially shows the movement of material in the warehouse.
I want the rackstore block to move multiple boxes at a time in the rack using crane. In the current model, crane takes one box at a time, stores it in the rack and comes back to take next box.
Not sure if RackStore supports that, but as always, you can find a solution in AnyLogic.
One simple fix: bundle your packages together into 1 agent using the batch object. Then, they stay together until being taken out by the crane at the end (via RackPick) and you can un-batch them to their original agents. Have a look at some example models using batching.
cheers
Depending on the details of your model, one option is to use batch as Benjamin stated, but I think I feel the pickup dropoff blocks would work better because with the dropoff you can drop the boxes one by one, while the batch forces you to separate all the boxes at once...
So with the rackstore you can't do this, but if you use the pickup and then dropoff, you will have to store somewhere in your model what rack positions are free though, because when you move the crane you will have to choose the rack position yourself, while the rackstore does it automatically...
Nevertheless, the batch may also work... it depends on the details of your model

Moving one agent within another agent in Anylogic

I am making simple distribution center in Anylogic.I did make truck agent and i am able to move it from one gis point to another gis point.
But I want to load some other agents(Let's say banana agent) into my truck agent and then trucks start their journey(if truck is full of banana).How can i do this?
I hope you have already solved your problem from almost a year ago. However, since there is no specific answer, I'll leave it here for anyone who might get stuck with the same problem.
Anylogic's Process Modelling Library (PML) has an element called Pickup and its opposite, Dropoff. This is used to do exactly what you asked: to load some element into a transporter (either a truck, a forklift, or even a person).
To use the block as you asked you would need a topology like in the picture:
The Queue elements are necessary to hold elements until the pickup occurs.
The Pickup element might pick elements in three modes:
While a given condition is True;
An exact amount (if available);
All available agents.
I'm assuming all trucks must be completely filled up to its maximum capacity. Hence, the chosen mode will be the second one where the exact amount will be TruckCapacity, a parameter of agent Truck.
The selected mode picks up agents (in this case Bananas) up to the desired amount. However, if nothing is available or the present amount is inferior to the desired, the native behavior of the Pickup block is to allow the container element to simply go through it and pick only what's available.
To prevent such behavior, I've created a restricted area where only 1 Truck can be at a time. Additionally, the Hold block WaitFullyLoaded (set to initially blocked) forces the container agent Truck to be fully loaded. Whenever a Banana enters the Queue waitTruck, a verification is performed to check if 1 Truck can be filled. If so, allows passage for that one truck:
if(self.size()/TruckCapacity>=1){
WaitFullyLoaded.unblock();
}
To block WaitFullyLoaded again, when the truck passes through the restrictedAreaEnd block, it performs WaitFullyLoaded.block();
The main idea is this. However, many features can be added and changed.
Hope this helps,
Luís