question

Miguel V6 avatar image
0 Likes"
Miguel V6 asked Miguel V6 commented

Avoiding empty stations with task executer

Hello Everyone!

I'm working on a model, that requires the AGV to transport material to different departements, according to the attached diagram .


Each department (A,B, C and D) has a Dropoff Point and a Pickup Point, that are connected to a "Next Look For Work" Loop. The goal here is to transport the material from all the "QueueX_Y" to the respective "SinkY_X", in the minimal distance possible only loading and unloading the material in the BL (Blue Zone) of the respective departement. In order to do so i'm using the "Next Look for Work". On of the issues that I notice when I run the simulation is that when it reaches the "07h0min0sec 01/05/2021", in the simulation runtime, the "QueueX_Y" from department D and A are empty, however, the task executer keeps going there even though it knows that there is no work to do. What i'm looking for here is a way to prevent that happeing. So when the "QueueX_Y" are empty, the task executer should only go to those departments for dropoff material in the respective sink. Is that possible to implement? If possible, how can I make it?

Thank you for your atention!

Modelo 1.fsm

FlexSim 21.0.0
flexsim 21.0.0agv routingnext look for work
esquema.png (71.4 KiB)
modelo-1.fsm (197.4 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Miguel V6, was Eric M's answer helpful? If so, please click the red "Accept" button at the bottom of one of their answers. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Eric M avatar image
0 Likes"
Eric M answered Miguel V6 commented

Hi @Miguel V6, work forwarding is something that should allow you to control your AGVs better. The problem right now is that the AGVs will always travel to the "next look for work" point to see if there's something to pickup there. When they get to the point, they check if there's something to do and then move on if there's not. LookForWork points allow the AGV to check if there are items to pickup even when they aren't at the pickup location. There's some information in the manual that can explain this further as well as the description under "LookForWork Forwarding" in the process flow. Let me know if you have more questions about this.

· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Miguel V6 avatar image Miguel V6 commented ·

Hello @Eric M,

Thanks for your help, I just would like to know a few more things. Was it possible to transport

the boxes from de QueueX_Y to the respective SinkY_X, whithout using a "NextLookForWork" loop or the "WorkForwarding" loop?

I also would like to know if I could use a Dispatcher to tell the AGV which station should it go pickup and drop off items.

0 Likes 0 ·
Eric M avatar image Eric M Miguel V6 commented ·

Yes, using a dispatcher would work as well. Just connect each of the Queues connected to the processors to the Dispatcher with an s-connection. Then connect the dispatcher to the AGV with an a-connection. You also need to change the "use transport" of each queue to use the "object connected by center port" option.

0 Likes 0 ·
Miguel V6 avatar image Miguel V6 commented ·

Thanks for your atention! I followed your suggestion and it works, however I would like to make one more improvement to the model.

I wanted to make that whenever the AGV drops a box in one of the four departements, his next action should be pickup a box from the same departement, for example, if he dropped a box in sinkA_D, then his next action should be pick a box from QueueA_B, QueueA_C or QueueA_D. Is it possible to do so? If yes how can I make it?

Modelo 1.4.fsm

0 Likes 0 ·
modelo-14.fsm (219.3 KiB)
Eric M avatar image Eric M Miguel V6 commented ·

It was challenging to try to make this happen using the dispatcher method. As such, I went back to using lists. The idea is to sort the list by travel distance. To calculate the distance, I added a label to the AGV, Processors, and Sinks (queues) called CP that specifies which CP the object belongs to. The AGV CP is updated each time it unloads an item. I added a column to the AGVWork list called TravelDistance which calculated the distance between the AGV's CP and the CP that the items are assigned to (the CP label on the processor holding the item).

I then created some simple process flow that pulls from the list and completes a task sequence (travel, load, unload) and repeats. Under the "Query" option on the Pull from List activity, I specified that the list would be ordered by the travel distance.

Now, whenever an AGV unloads an item, it finds the closest item on the list to load and drop off. This should also solve the original problem of AGVs looping around the look for work path since there are no look for work points.

modelo-1.4 em.fsm

0 Likes 0 ·
modelo-14-em.fsm (231.1 KiB)
Miguel V6 avatar image Miguel V6 commented ·

Hello @Eric M

That's exactly the solution that I was looking for since the beginning! Thank you a lot, I just had a few more questions, could you how explain me better how does the script work? For example why do we use "Model.find("ProdB_D").CP;"?

0 Likes 0 ·
Eric M avatar image Eric M Miguel V6 commented ·

Great! I was simply using the script to help in building the model logic. The script only runs when you push the green "run" button above the script, so it doesn't do anything when you just run the model. In this case, I was just using the script to make sure the CP label on ProdB_D was what I expected it to be. It can be deleted without any issues since it doesn't do anything with the model.

I will explain a little about the distancetotravel code in the AGVWork list as well. This command just calculates the distance the AGV would need to travel between two objects. The first entry in the command, AGV.CP, is pretty simple. It just gets the CP label on the AGV (which is the CP that the AGV last unloaded at). The next entry, value.up.CP, is pretty much the same but might need some explaining. The "value" is whatever is specified in the push to list activity, in this case the item. The "up" command has to do with the node in the tree which is basically saying what is holding the item right now (the queue). So all in all, the code here is just finding the label CP on the queue that the item is in.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.