question

Ashlee W avatar image
0 Likes"
Ashlee W asked Andrew O commented

Dot Syntax for Stat Collector Issue

Hi There,

I am having trouble figuring out the syntax for this stat collector. I have copied the internal stat collector called "Person Wait For Location History" and all I want to do is add the patient's location at the time the request for their next location was made. Here is what I have attempted. It doesn't throw an error but it doesn't fill in "CurrentLocation" when it runs. I have also tried data.puller.Locations[1].

Any help would be appreciated. Thanks!

1663076145850.png

1663076112509.png

1663076332554.png

FlexSim 22.2.1
statistic collectorlocationdot syntaxsyntax
1663076112509.png (56.5 KiB)
1663076145850.png (56.2 KiB)
1663076332554.png (73.6 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.

Andrew O avatar image Andrew O commented ·

Hi @Ashlee W, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

By default the "Locations" label is assigned to the patient in the HC environment, not the token. So you would have to access it with "data.token.instance.Locations[1]".

Alos, the storage type of the column is currently set to "Double" (double precision floating point number) and "Raw". It should either be set to "String" (to display the name of the location) or "Double" and "Object". In the second case the value would have to be "StatisticsCollector.getID(data.token.instance.Locations[1])" (how the original Location column is set up)

5 |100000

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