cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting pulled value directly when using SELECT on a list

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?

2 Comments
moehlmann_fe
Enthusiast

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.

Image.png

list-select-label.fsm

pasichp
Not applicable
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"

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea