question

HK avatar image
0 Likes"
HK asked Logan Gold commented

Object's detailed information

Hello,

Where can I find values (not labels) assigned to objects (e.g., patients) within a model? For examples, if a patient has gone through three different processes, where can I find specific process times assigned to the patient? I tried to find the information through properties or model tree but only see values assigned for labels.

Thank you.


FlexSim 24.1.1
patient flow
· 3
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

You could listen to the process activities entry and exit time using a statistics collector. To simplify that you might want to create a group and add the relevant activities using a script like this:

  1. Object processFlow=Model.find("Tools/ProcessFlow/ProcessFlow");
  2. Object o;
  3. forobjecttreeunder(processFlow){
  4.     o=a;
  5.     if (classes(o).first.name=="People::Process"){
  6.         Group("ProcessActivities").addMember(o);
  7.     }
  8. }

If you're stats collector is detecting the token entry and exit times it will capture the duration but not necessarily the process time as staff may be preempted away.

To combat that you could edit the code of the process time field to add a label to the token which the stats collector reads containing the process time.

If you're happy editing the code, you could also just write the values to a table, map or array somewhere.

5 |100000

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