Idea

Przemyslaw Pasich avatar image
0 Likes"
Przemyslaw Pasich suggested Przemyslaw Pasich commented

Getting pulled value directly when using SELECT on a list

When using a SELECT [field_name] statement in the query when pulling from a list, you can subtract a required value from the field of specified name, making for a very good way of modeling picking an amount from a container represented by the list entry. However, the only reference saved by "Assign To" option are the affected list entries, thus only giving access to their state after the pull (so in other words amount left in the containers after picking). As per

https://answers.flexsim.com/questions/31586/how-do-i-see-how-much-of-a-given-thing-i-pulled-fr.html

if you want to get a reference to how much you actually pulled from each of the list entries, you need to do a "snapshot" of the state of the list before pulling, then pull, and then compare the state of the list after with the "before snapshot" to figure out the pulled quantities.

I find it problematic as saving a "snapshot" of a list that contains many entries in the local memory and then looping through it to find the before vs after difference is impacting my model in a negative way performance-wise - I do it multiple times per simulation period I divide my sim into. Could I please request a way of getting a direct reference of the pulled amounts using the SELECT statement that will do away with the "snapshotting" workaround?

listssql querypulling from listsselect query
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 Comment

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann commented

That is how it works already since version 19.2, when options where added to lists which determine the behaviour of the SELECT clause. If the first value is a quantifier and also assigned as a label to the token, the assigned value will reflect the pulled value.

1699356211214.png

list-select-label.fsm

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

Przemyslaw Pasich avatar image Przemyslaw Pasich commented ·
Hi Felix, thanks for the immediate response! You are right - the feature is implemented. I should have reached out before I spent all that time racking my brain about implementing the "snapshotting"
0 Likes 0 ·

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.