question

Lou Keller avatar image
2 Likes"
Lou Keller asked Joerg Vogel edited

How do I use a Global Variable to determine which resource group to select from?

In the attached model, a Global Variable, "Count_Not_Triaged," is incremented and decremented to keep track of the number of patients that have not yet been triaged. Then, in Activity 46 of each of the five Patient Tracks, which nurse is to be used when it comes time to do triage is determined by the value of the Count_Not_Triaged variable. If the value of the variable is less than 12, then a nurse is selected from a primary group of nurses. If it's greater than 12, then a nurse is selected from an Alternate Group which includes members of the primary group plus one additional nurse. The selection is determined by the "Based on a Condition" Staff Requirement menu option as shown below.

crmh-ed-ver-14.fsm

Unfortunately, the selection process doesn't seem to be working as the alternate nurse is never used even when the "Count_Not_Triaged" exceeds 12. What am I missing?

FlexSim HC 5.0.12
listglobal variablesresourcesresource selection
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

·
Sam Stubbs avatar image
3 Likes"
Sam Stubbs answered Ben Wilson commented

I think your problem may be that you're calling "getvarnum(current,"Count_Not_Triaged")" which is looking for a variable called Count_Not_Triaged on whatever current is referencing. If Count_Not_Triaged is a global variable all you need to enter in that field is:

Count_Not_Triaged>12 

See if that works more as expected. Also just to make sure, you might want to double check to make sure Count_Not_Triaged is incrementing and decrementing properly.

· 1
5 |100000

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

Lou Keller avatar image Lou Keller commented ·

Sam, as usual your answer is exactly correct! Thank you for your support and dedication!

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.