question

Troy M3 avatar image
0 Likes"
Troy M3 asked Matthew Gillespie commented

Conditional Barriers for patients (w/ or w/o staff)

We would like to set up a conditional barrier that allows staff only to pass through. Currently we have a condition rule for 'staff only' stated below. This works for staff (allowing them to pass through), however it also allows patients escorted by staff to pass through. We would like to limit this to only staff, and force patients traveling with staff to go another way.

treenode traveler = param(1);
/**Staff Only*/
return !isclasstype(traveler, "People::Staff") || traveler.TravelingWithPatient?;


Any help would be appreciated.

FlexSim 20.1.3
flexsim 20.1.3conditionalbarrier
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
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

This is exactly how the Staff Only condition works. Do you have a model where this isn't working for you?

Here's a simple model that shows it working as you described:

StaffOnly.fsm


staffonly.fsm (54.5 KiB)
· 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.

Troy M3 avatar image Troy M3 commented ·

Matthew, you're example works exactly as we would like. However when I apply that to our model it does not limit staff escorting patients to go around like your model does. Note our 'Rule 1' is 'Staff only'

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Troy M3 commented ·

@Troy M3

From your screenshots it doesn't look like the grid is being affected by that barrier (the yellow pluses are full pluses and aren't missing any sides). Can you attach your model?

0 Likes 0 ·
Troy M3 avatar image Troy M3 Matthew Gillespie ♦♦ commented ·

See attachedStaffOnly.fsm

0 Likes 0 ·
Show more comments

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.