question

Miguel Pereira avatar image
0 Likes"
Miguel Pereira asked Miguel Pereira edited

Pull from List

Hey everyone,


I'm trying to do a pull from list but i want the task executer to load all of the items he push and not just a part of it. Is there a way for it to pull everything from the list instead of putting a request/require fixed number?


The number of items that needs to pull isn't always the same.


Thanks, Miguel Pereira.

FlexSim 21.0.5
listsflexsim 21.0.5list pull from listpush and pull listitem list
5 |100000

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

1 Answer

·
Eric M avatar image
1 Like"
Eric M answered Miguel Pereira edited

Hi @Miguel Pereira if you want to pull all the entries off the list, just make sure the list is a global list and then use this code in the Request Number of the pull activity:

List("YourGlobalListName").entries().length

In general, a good option for pulling different numbers off the list is to use labels. The label would go in the Request Number. You would just need to figure out how to assign the right number to pull to the label before entering the pull activity.

· 11
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 Pereira avatar image Miguel Pereira commented ·

In my case i push to list in the same process flow that i pull, i mean. When other task executers leave items they are pushed to a list, but when i want the AGV from another circuit to take it i'm trying to pull from that list, but what i want to do is to go just one AGV and load all bags in one time. That code didn't worked on my project because it isn't a global list.

I've tried that but this error occurs:

1626784571926.png

Also in the project i get the prompt error:

1626784673480.png

Is there another way to fix it?

Thanks.

0 Likes 0 ·
1626784571926.png (9.3 KiB)
1626784673480.png (9.2 KiB)
Eric M avatar image Eric M Miguel Pereira commented ·
Try creating a global list in the toolbox and then connecting the list in process flow to the newly created list. Then use that new list name in the code. The pop up error looks like the location isn't correct in the travel activity.
0 Likes 0 ·
Miguel Pereira avatar image Miguel Pereira Eric M commented ·

I've did that but i'm still receiving the error:


time: 0.000000 exception: FlexScript exception: Invalid variant type used with [] array operator at MODEL:/Tools/ProcessFlow/Transportes/Travel~7>variables/involved1.


The thing is it works if i put a number in the request field instead of the code...

the next activity is a travel and is to "token.GrupoDesteAero[1].up", this token is given by this task of pull from list.

0 Likes 0 ·
Show more comments

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.