question

Leona E avatar image
0 Likes"
Leona E asked Leona E commented

Pull items from a list and push them to another list

Hello,

I created a list with all the items, which entered the model. At a special Point I want to pull items with a specific label value to another list.

How can I achieve this?

FlexSim 17.2.4
pull from listpush to 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.

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Leona E commented

In pull-from-list-push-to-another-list.fsm you find labels with name "place" and "ID" at the items entering the queue. OnEntry they are pushed to the List "ItemList1" using the ID as a partition number. A ProcessFlow creates in an inter arrival time of 55 a new token, which pulls from the ItemList1 all values where the place value is 3 and the partition matches randomly from the pulling token ID label.
The result is assigned to the label named pulled at the token. This label is used to be pushed to the ItemList2 at the next activity. This activity doesn't contain any partition. You find only items with the value 3 of the label "place"

Alternatively you find in the other model a process flow with an create token activity to split the result array into individual tokens.pull-from-list-to-created-tokens-push-to-another-l.fsm


· 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.

Leona E avatar image Leona E commented ·

Thank you very much for your reply.

I built a testmodel testmodel.fsm based on your attached example. It seems to be a problem with the pushed value in the "Push to list" activity. I assigned the pulled values to the label "pulled" on the token and want to push the Information to the list with the pushed value "token.pulled".

Unfortunately I get an error "invalid pushed value".

0 Likes 0 ·
testmodel.fsm (19.4 KiB)
Joerg Vogel avatar image Joerg Vogel Leona E commented ·

It has nothing to do with the push activity, because the label pulled at the token doesn't contain any data which you can push. It is a problem with your pull activity. The list "boxen im System" consists of partitions. In the pull activity you don't take this into account. If you set the partition value to the Type you want to pull, the problem is solved. And then you don't need the query clause any more, you can delete the line, because the Type is your number of the partition in your list.

0 Likes 0 ·
testmodel-1-jv.fsm (19.4 KiB)
Leona E avatar image Leona E Joerg Vogel commented ·

Thank you, now it works!

0 Likes 0 ·
Kari Payton avatar image
2 Likes"
Kari Payton answered

@Leona E when you create items, push them to a list and use the label value as the partition ID. Then wherever you pull the items, set the partition ID as the value for the specific items you want. pushpull3dprocessflow.fsm

I created a model as an example. In the queue properties:

- Triggers - OnEntry - create a label "Type"

- Flow - Output - Push to List - Set the partition ID as "item.Type"

Then to pull all items with Type = 3, in the process flow I set the partition ID to 3 in the Pull from List box


triggers.png (149.1 KiB)
partitionid.png (77.2 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.

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.