question

christian.n avatar image
3 Likes"
christian.n asked Matt Long commented

How do I see how much of a given thing, I pulled from a list?

Hi all.

I have a list where tokens are pushed onto, each with a QTY label between 1 and 20.

I wish to pull between at least 1 and up to preferably 15 units of QTY from this list and add the given quantity to a label on the pulling token to keep track of this.

Pulling from the list works as intended, but I can't seem to find a reference to how much QTY I managed to pull. I looked rather thoroughly through the 'assign to'-functionality, but I found nothing to indicate if I pulled the required 1 QTY or more.

Did I somehow overlook a way to reference the QTY that the puller pulled? (Flexsim 16.2.2)

Best regards. Christian

Edit: I have read through the This Thread (24220), bit it deals with references to the token that are pulled themselves, not a value pulled from the tokens.

Choose One
pull from listlists
screenshot0049.jpg (32.3 KiB)
screenshot0048.jpg (38.6 KiB)
listpull.fsm (22.1 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.

christian.n avatar image christian.n commented ·

@Matt Long Hey Matt. You are usually full of good ideas. Can you offer any advice here? Thanks in advance.

0 Likes 0 ·

1 Answer

Matt Long avatar image
1 Like"
Matt Long answered Matt Long commented

Unfortunately, to do this you have to manually figure it out yourself. There isn't currently anything implemented with the List that allows you to get the quantity pulled when using the SELECT statement. It is on our to do list to add this feature.

For now, the work around is to manually sum up the label values before you do your SELECT query and then sum them up again after. This also means you have to ensure that a token is not waiting on the Pull from List if the require number is not met. In this event, send the token to a Wait for Event activity that waits until another token is pushed to the list, then recalculate the total QTY.

It's not pretty, but it does work.

3944-listpull.fsm


sumqty.png (88.3 KiB)
3944-listpull.fsm (27.6 KiB)
· 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.

christian.n avatar image christian.n commented ·

Thanks, Matt.

0 Likes 0 ·
martin.j avatar image martin.j commented ·

Bump! Is this issue still present in FS2017? I seem to be having the same problem. @Matt Long

0 Likes 0 ·
Matt Long avatar image Matt Long martin.j commented ·

This feature has not yet been added.

1 Like 1 ·