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.

Joerg Vogel avatar image Joerg Vogel commented ·

You can add a tracked variable to support this exploration. You can add a Statistics Collector. Such instruments are supporting you to collect data in your model.

0 Likes 0 ·
HK avatar image HK Joerg Vogel commented ·

What I want is overall statistics across entities but a process time assigned to a specific agent and want to check it real time (before the end of the simulation.). process times will be generated based on the distribution I use and I want to know what value was generated for a specific agent. could you let me know how I check this information?

0 Likes 0 ·
Logan Gold avatar image Logan Gold ♦♦ commented ·

Hi @HK, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of the 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 ·

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:

Object processFlow=Model.find("Tools/ProcessFlow/ProcessFlow");
Object o;
forobjecttreeunder(processFlow){
    o=a;
    if (classes(o).first.name=="People::Process"){
        Group("ProcessActivities").addMember(o);
    }
}

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.