question

mm_y_2406 avatar image
0 Likes"
mm_y_2406 asked mm_y_2406 commented

Access to state of a location in people object

Hello, I like to ask how do I access the state of the location object to use it in decide activity? I tried Model.find("Plane1/DrinksStation").as(Object).stats.state().value == 1 but it does not work. I tried calling it with the stringvalue, but it still doesnt work. Please can anyone help?

1687871818879.png

FlexSim 23.1.2
location states
1687871818879.png (99.5 KiB)
· 2
5 |100000

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

Julie Weller avatar image Julie Weller commented ·

Hi @mm_y_2406, was Jason Lightfoot'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 comment back to reopen your question.

0 Likes 0 ·
mm_y_2406 avatar image mm_y_2406 Julie Weller commented ·
This did not work with the wait for event - state change but I created another post and was answered in there instead
0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

It looks like you need to pass in the state profile rank into the state() method - so for Availability that would be 1.

· 2
5 |100000

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

mm_y_2406 avatar image mm_y_2406 commented ·

Could you explain further what do you mean by that? Do you mean Model.find("Plane1/DrinksStation").as(Object).stats.state(1).value like this?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ mm_y_2406 commented ·
Exactly - here's the user manual reference.
0 Likes 0 ·

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.