question

Leah R avatar image
0 Likes"
Leah R asked Jason Lightfoot commented

What is the difference between People Settings and State Tables ?

Hello !

I work on an operating room model.

I play a lot with object and patient states but I am not sure I'm doing it correctly.

For instance, I have this in the tree view (4 state profiles per operating room):

1695896351683.png

This in people settings:

1695896417011.png

I use code similar to this to change my OR's states during simulation:

  1. string newState = "Waiting for Anest";
  2. Object OR = patient.Locations;
  3. if (patient.caseType == 1){
  4.     OR.as(Object).stats.state(4).value = newState;
  5.     }else{
  6.         OR.as(Object).stats.state(4).value = newState + " (non-elective)";
  7.         }

I have no state tables.


It feels a bit disorganized.

  • Could you please indicate what are the good practices to follow while working with states and state profile?
  • What is the difference between "people settings" and "state Tables"?
  • To what state profile are the people settings linked to?
  • What is the best way to add a state profile?
  • What is the best way to add a state?


EDIT : and how can I use the function setState() with custom states?


Thanks in advance!

Leah

FlexSim 23.2.1
statesstate profilespeople settingsstate tables
1695896351683.png (33.9 KiB)
1695896417011.png (33.7 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.

1 Answer

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Matthew Gillespie commented

The People state dashboards look at the HC States state profile. The People Settings object is also tied to the HC States state profile and lets you configure whether each custom state counts as a Utilized state for Utilization calculations. So you usually just want to add custom states in the People Settings and then set the state of an object's HC States state profile.

  1. Object obj = Model.find("OR1");
  2. obj.stats.state("HC States").value = "Waiting for Anest";

You can add other state profiles to objects if you want, but then you need to manage that all yourself and you'd probably need to make your own stats collectors to make any state dashboards using those profiles.

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