How to combine transporter related blocks with Delay, Queues and other blocks from Process Modelling Library? - simulation

A source is producing "productA". "productA" is moved by a transporter called "agv" from node1 to node2. On the way between the two nodes I want to put several tasks like for example delay or queue. These tasks can be implemented by Process Modelling Library blocks. When using them you have to set an agent type. Which type do I use now? "productA" or "agv"? When using "agv" an error accurs because that type is not equal to the source agent. When using "productA" tasks from the process Modelling blocks are only executed for this agent, not for "agv". How to deal with that? Is there a way to create a new agent which contains "productA" and "agv" and overwrites the source agent? How will that not contradict with the transporter fleet block?

You need to use ProductA as this is the main agent flowing through the blocks. It just "uses" an AGV to be moved around, similar to a resource.
If you want to stop and do things with the product and the AGV, you use the SeizeTransporter block first, this makes your product seize an AGV.
Then, you can make them do anything by dropping blocks: queues, delays, Move By Transporter. Just make sure to finish up with a Release Transporter block when all is done.

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

Agents not leaving the queue before a transporter is free

in my model I have a queue were multiple agents from different sources come together to seize an transporter ( see picture). But now they leave immediately after they enter the queue to the seize transporter block. But I want to keep them in to queue until a transporter is free and then the first one in the queue should seize a transporter and so should move to the seize transporter block. How should I fix this?
There are several ways:
After the queue, add a RestrictedArea elements to limit the number of agents in the Seize seizeTransporter4 element. In the queue, you can sort the agents.
Instead of a queue element, use a Wait element, in which case you need to write the logic for extracting agents and sending them to seizeTransporter4 element.
The second way is more flexible in terms of writing logic.
seizeTransporter has its own embedded queue. You can access that value with seizeTransporter4.size(). If you insist on having them separately, instead of queue, use delay block, with stopDelay option. Whenever the seizeTransporter4.size() drops below number of available transporters, run the stop delay function. Like
if (seizeTransporter4.size()<=3){
myDelay.stopDelay(myDelay.get(0));
}

Anylogic: avoid unwanted execution of process in seize block

I am trying to simulate manufacturing process by using statechart. And i have created agents for particular machines by statecharts and connecting those agents according to manufacturing process with help of resource pool, seize block and release block
My agent is passing through the resource pool and seize block. And I am expecting to run the model one after another seize blocks. However, when I run the model my all three statcharts are active at a same time, which I do not want. can anybody suggest me a possible way to avoid simultaneous process?
I'm assuming your manufacturing processes don't take 0 time. You're missing Delay blocks, causing all your blocks to execute at the same, instantaneous moment.
On a side note, what you're showing us isn't a statechart, but a flowchart.

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

Request entity from Anyogic Process Block and wait until it's available if there is not currently one

I'm trying to emulate what QUEST does when a buffer is queried for a certain Part. In there if the part is not in the buffer the request is left pending and if a Part arrives to the buffer it's released to the machine requesting it. I have also seen this behavior in SimPy which is another DES engine.
I can't seem to find a simple way to do this in AL. The queue block has the following methods:
release(agent): Will return false and forget about the request if there's not an agent as the one specified
remove(agent): Will return null if there's no agent in the queue
So those methods won't do what I want...
It gets a little more complicated as the queue contains agents with parameters and I want to request a specific set of parameters (let's say the agents have a number parameter that can go from 1 to 3 and I'm only interested in agents in the queue if this parameter has the value 2).
Also there's a series of agents pulling this agents from the queue simultaneously and I'd like a priority to be set (let's say FIFO)
so there's a couple things that I've tried and have lead me nowhere:
Using a seize block instead of queue and adding the agents to the embedded queue in the seize block. -> I can't find the proper method to seize from the buffer in a different way from a buffer block (so I moved to option 2) but seize does have a promising customize resource choice that could help with the parameter down-selection
Using a seize block and storing the agents in a pool as resources. issues with dynamic creation of resources, seizing the appropriate one etc...
Creating a queue of requests that have returned null from a queue. This sounds like an overkill but I'll look into it
All of those appear to be a bit complex for such a simple thing in other softwares for simulation so I'm wondering if I'm missing something or if someone has come across this issue before
Suggestion 1: may it helps you to store the agents in the queue in a collection (or different collections, according to the parameter settings). Events: "on enter" and "on exit"
Suggestion 2: may the Wait - block helps you here?