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.