question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Ankur A3 commented

How to add Providers (created using process flow) to Staff Resource ?

Hi Team,

I am creating 3 providers using process flow. I want these providers to serve for Patient. But I am not able to add it in staff group since these provider are created every time when I reset model.

What is the right way to do it?

1657554603280.png

Also I want to create utilization chart for all providers.

HowTo AddProviderToStaffList.fsm

Note: The purpose of creating providers using process flow is to provide flexibility for adding or removing provider.

Thank you!

FlexSim 21.0.10
processflowresourcestaffgroup
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

Regan Blackett avatar image
1 Like"
Regan Blackett answered Ankur A3 commented

I think you can get what you are looking for by using a parameter table, provided the provider group will always have at least 1 member. In the attached version of your model, I created a parameter with an integer Type, and set its reference to your staff group. The OnSet trigger is using the Delete and Copy Group members option. I tweaked the line of code in that trigger that sets the name of the new objects to look at your global table’s names, it could be tweaked a little more if you want them to have different reset positions. This creates your new objects just fine.

However, you will get some errors related to the People stats collectors when the model is reset if you have a state-based dashboard chart (except the Utilization (Combined) box plot). The data gathered by those charts seems correct still, despite the errors. You can still see the results being gathered in the stats collector tables directly without dashboards without any errors. I don’t know why they come up, but it feels like a bug. Maybe @Jordan Johnson or @Matthew Gillespie can shed some light on that.

Hope this helps!

adding staff with parameter table_1.fsm


· 5
5 |100000

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

Ankur A3 avatar image Ankur A3 commented ·

Hi @Regan Blackett,

Thanks for your answer!

I am looking forward if I can plot the state chart as well.

Also, I am trying to set up location for objects in the code but it seems there are some issues. Here is the code which I am trying:

1657609868088.png

Can you help me what is going wrong here?

Thank you!

0 Likes 0 ·
1657609868088.png (80.2 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ankur A3 commented ·

Use newObj instead of the array - everything but the first staff member in the array was destroyed.

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Jason Lightfoot ♦♦ commented ·
Hi @Jason Lightfoot,

I am not able to access location property with newObj.

Can you make changes in model if it is working?

Thank you!


0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ Ankur A3 commented ·

Like Jason said, use the newObj variable to manipulate the newly created objects. Also with the HC objects you will need to clear and re-set their resetposition properties:


newObj.as(Object).resetPosition.clear();
newObj.as(Object).location.x = firstObj.as(Object).location.x + i;
newObj.as(Object).resetPosition.set();

You can put this right below where the name property is being set.

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Regan Blackett ♦ commented ·
Thank you! @Regan Blackett
0 Likes 0 ·