seize and release transporters in any logic - anylogic

[Model]
https://i.stack.imgur.com/xRIhB.jpg
I am trying to model a batches loaded by 2 cranes (service block) on a transporters fleet. then transporters move to unloading area by another 2 cranes (for now represented in flow chat as a delay2 block ).
the problem i am facing with transporters i want them to have a first stop (delay 1) before they(loaded) carried the batch and move according to the path. i tried to model the first stop by a seize transporter ( destination to delay node), delay , after they stop, they carry on to their agent location ( batch) to be loaded i represent that by another seize( destination is agent) , move by and release transporter after second delay.
i got a miss behavior after transporters been delayed and released in first delay ,as they didn't see the agents and carry on on their path ( some times they go to load and some time they don't).

Related

logic and actions to my transporters fleet in the flow chart in anylogic

Iam trying to build a model represented as shown but the main problem is how to put my hands on transporters and can do sequence logic on them while been loaded and unloaded along the path among my flowchart sequence.assign queue and delay blocks to my transporter type.
error while doing that.
First, i wanted to make a queue and delay before reaching loading point but when i ran the model i had an error as i tried to cast the delay and the queue to my transporter agent (forklift) and not the material item type(agent) , and when i tried to cast it to my agent (material item type) it didn't respond or see the delay or the queue and the transporter didn't stop.
After loading i want to make a second stop (delay) and queue of transporters out side it but , the model only see the delay and (loaded transporters) ran through the queue and stop in the delay block and i want to investigate the queue but the transports didn't stop in it.
Not quite clear what you need but it sounds like you want to explore preparation flow charts as part of Seize and Release actions, see https://anylogic.help/library-reference-guides/process-modeling-library/resourcetaskstart.html.
With these, you can make your resources (forklifts) follow some flow chart logic before they are actually being seized by your agents. This also works with transporters afaik

seizeTransporter Block out port stop working

I am modelling earthmoving operation. Every trench agent seize two transporters, one excavator, and one truck. When truck is released it will do some other job before been seized again by the same trench. So this process repeat until the trench will be empty.
The process is occuring for two three times without any problem but after two three times the trench agent is not go out of the seizeTransporter block (the one that seize truck). I have a delay block after the seizeTransporter block and it use Maximum Capacity. So it should not be a problem and it should not prevent the seizeTransporter block out port to push the trench out.
I noticed this is hapenning when the truck stop to resolve a collision. It looks like the collision cannot be resolved and the truck stay where it is for ever. :))
I have tried so many things that could solve this problem but none of them works.
There is an option in the material-handling library TransporterControl element to override transporter conflicts after some time. Maybe reduce the default timeout of 10 model time units, see below:

Assign priorities for multiple Seize Blocks for the same resource in AnyLogic

I have a not so typical scenario for which I am not sure how to proceed:
There are two stations located at two different locations.
Both stations require the same resource.
The resource moves from station to station once released. So it keeps going from station 1 to station 2 to station 1, etc. until it is seized again. This is modeled by adding a link from the resource process port of the release block. So it is not completely released unless a condition applies. The condition is that there are agents waiting in the queue of the seize block of that same resource. So it should keep moving until it is needed again. The tricky part is that there are two seize blocks for that resource, one for each station. It is possible that agents are ready and waiting in the resource's seize element at both stations. I am adding an image of the resource's process at release. So at "selectOuput4" it checks whether station 1's seize element has agents waiting, if so, the resource is released and can be seized. Otherwise, it moves to station 2 and checks the same but for station 2.
My concern is that there might be a situation where both stations have agents waiting in their respective seize blocks. How can I make sure the resource will be seized by station 1's seize element and not station 2's, and vice versa. Is there a way to control where the resource is going in a case where two seize elements are waiting for it? Or is it always random?
I apologize for the long post, and I hope I managed to deliver my idea properly.
First, I think your design is a bit weird because you keep the resource always seized.
What I would do is first have a statechart in the resource that controls the resource movement from one place to the next so you have more control over it. The statechart would be used to move your resource ONLY when it's not seized. This will allow a case in which your resource is moving from station 1 to station 2 but something comes to station 1 queue and the resource can immediately react and come back to station 1 before it reaches station 2 (if you think it would be a good idea to do that)
The second is that the seize block defines the priority for a task when the agent arrives to the seize block, and your situation requires changing that priority dynamically, which can't be done as far as I know, so the wait block before the seize block is unfortunately a good option.

Stacking agents in nodes/end of a path

Agent Comparison/ Priority for queue
I'm building a model in Anylogic I have a question about visualization.
I have a model that looks like this: Source -> delay -> queue (with preemption option that goes into a delay2) -> seize -> delay3 -> release -> sink.
What I would like to do is make the agents enter the queue but visually keep moving along a circled path while waiting. In my model, I put the queue to a capacity of 1 and then added a preemption option which goes into a delay where the agents move along a circled path. I am able to make them take a lap along the path this way, but since the capacity of the queue can't be less than 1 there is always 1 agent standing still (not going in the preemption option). I would like for all of them to keep moving on the circled path while in the queue. How can I fix this?
Also, since the seize block has an embedded queue, and it starts where the queue before ends, there are actually two agents standing still at the same place.

How can I call for transporters earlier?

I have a model that generates a total of 5 loads, each load generated every 2 seconds. When the 5 loads are waiting to be transported, only 1 transporter is called. The transporter fleet has 9 vehicles here.
I have tried to use a seize transporter block before the convey block, but that only results in 5 transporters queuing at the conveyor for the loads to be generated and picked up.
How can I call a transporter for each of the loads? (In the solution, 5 transporters should be called when they enter the conveyor) Thanks for your help in advance, I am stuck.
EDIT 1
I tried out a suggested approach, but my method only generates new transporters with the agent name "Car". How can I call Cars from the existing transporter fleet?
As usual, many ways :-)
One could be to create a separate flowchart for your transporters. When a package enters the top conveyor, it can trigger 1 transporter to MoveTo the end of the conveyor location. For that, add a MoveTo block into the new, separate transporter flowchart.
This will make transporters waiting at the conveyor exit, ready to pick up stuff.
Be careful, though, to only summon transporters that are idle anyway.
cheers