question

Michael Zabritski avatar image
0 Likes"
Michael Zabritski asked Matthew Gillespie answered

Conditional Barrier Label Syntax

I thought this was going to be easy but I'm having trouble with it and no luck finding examples posted here or in the manual. How do I properly format a rule for an A* Barrier to allow certain label patients thru? In the default rule example it shows traveler.Type == 1. What is a traveler type? What is the rule syntax to read and evaluate a patient numerical label to only allow those patients thru? I entered traveler.ExampleLabel == 1 but the patients (with an ExampleLabel set to 1) are still going around the barrier.

Thanks


FlexSim 20.2.3
flexsim 20.2.3barriers
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

It's a little confusing, but the condition is the condition to block a traveler. From Divider Path Properties:

Check this box to make a barrier conditional, and define the condition that is required for the barrier to be applied. When a barrier is conditional, its condition is reevaluated at the beginning of every travel task. If the condition returns false (0), then the barrier will not be applied in the route calculation algorithm, and the traveler will travel as if the barrier did not exist. Conditional barriers let you define certain barriers as only applicable for certain travelers, or based on certain model conditions.

So the default rule (traveler.Type == 1) will block all travelers who have a Type label of 1, but everyone else can walk through the barrier.

Here's an example using your Dept label from earlier, the divider on the left blocks everyone but Dept 1 (traveler.Dept != 1) and so lets Dept 1 people through. The divider on the right does the opposite blocking all but Dept 2.

BarrierConditions.fsm


5 |100000

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

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.