question

Ana S20 avatar image
0 Likes"
Ana S20 asked Benjamin W2 answered

Can I pull from list multiple times in a process flow?

I'm making a model in which operators unload processed items onto a queue and I push those items to a list. In another process flow, I have one operator loading 3 of those items (from the queue) at a time and unloading them onto a task executer, then loading again and unloading onto another task executer and so on. So I have multiple 'pull from list', before every loading activity. The first 'pull from list' works fine, I can pull the items and load them successfully, but then the following 'pull from list' doesn't work anymore.

What am I doing wrong?

Ps: I use a list so it's easier to load a batch of 3 items at a time, but you can suggest an easier/more efficient way of achieving this.

Thanks in advance.

FlexSim 19.1.0
pull from list
· 2
5 |100000

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

Sebastian Hemmann avatar image Sebastian Hemmann commented ·

@Ana S20 The idea you have should work fine. Could you probably upload your model so we can have a look what settings you´ve made?

2 Likes 2 ·
Ana S20 avatar image Ana S20 Sebastian Hemmann commented ·

Thank you for your answer.

My model: test37upload.fsm

Best regards.

0 Likes 0 ·
test37upload.fsm (172.5 KiB)
Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered

Hi @Ana S20,

I think the main issue is that you are pulling continuously from the lists, but you are not replenishing the lists with items. However, I think there is an easier way to accomplish your goal.

  1. Create a global variable with an Array data type. Add the Task Executors to this array in the order that you would like your operators to load them in.
  2. Instead of using an Event Triggered Source to fire the unloading/loading sequence, initialize the token as an operator. You can then have this operator pull 3 items from the list, grab them, and move them. See the following process flow:
  3. Here is the key to this scenario, Assign a label to the token initialized to 0. After each sequence, increment this label by 1. You can then alternate between your task executors by using the following code in the destination field of the second Travel activity and the second Move Object activity:
AGVs[token.Destination % 3 + 1]

This should give you the behavior you are looking for.

pickandplace.fsm


globalvar.png (12.1 KiB)
newpf.png (19.3 KiB)
pickandplace.fsm (161.4 KiB)
5 |100000

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

Braydn T avatar image
0 Likes"
Braydn T answered Ana S20 commented

@Ana S20

This will work good, but I would make a few changes. Instead of a create tokens, move the pull from list to be above the acquire and add a batch task after the source. Then you can get rid off the other pull from lists because the token maintains the reference to the three items. That will simplify things and for me got rid of your issue.

The other things you need to fix are your release tasks. You need to release the resources before you push to a list because the tokens sit in the push to list task until they are pulled.

If I understand correctly, that should take care of your issues.

Let me know if this does not work.

· 3
5 |100000

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

Ana S20 avatar image Ana S20 commented ·

Hi, @Braydn T.

The problem with getting rid of the other pull from list activities is that after loading the first batch and unloading at the task executer, the operator goes back to the queue and ends up loading the same first batch from the task executer, instead of a new one.

test37uploadupdate.fsm

0 Likes 0 ·
Braydn T avatar image Braydn T Ana S20 commented ·

@Ana S20

I dont think I understand what your process is, but if you want to pull from the same list you need to push something back on. You could push the three items in an array.

0 Likes 0 ·
Ana S20 avatar image Ana S20 Braydn T commented ·

The process is quite simple. I want 2 operators to load flowitems from 2 different queues (1 operator for each queue) onto 3 task executers in a specific order. My issue is that instead of loading 1 flowitem at a time, I'd like to load batches of 3 items. For that, I use push to/ pull from list activities, but I'm not achieving the result I want.

Thank you for your answers, I'll keep working on this one.

Best regards.

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.