question

Amy avatar image
0 Likes"
Amy asked Logan Gold edited

Elevator Bank Conditional Rule

I'm trying to create an elevator system that only transports specific floors. I want to use a divider's conditional rule to achieve this. My idea is to create patient labels called `start_floor` and `end_floor`, and then use a conditional rule so that when staff is transporting a patient, they can select the appropriate elevator based on the patient's labels. However, this approach results in an error. How should I modify it to work correctly?

traveler.Patient.start_floor == "b1" || traveler.Patient.start_floor == "1"

screenshot-2024-06-03-at-72915pm.png


FlexSim 21.2.4
elevator bank
· 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.

Logan Gold avatar image Logan Gold ♦♦ commented ·

Hi @Amy , was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

You are currently trying to access the "Patient" label on the traveller (Tech). The error message tells you that this label does not exist. You probably still need to assign it after the tech is acquired.

Also, be aware that the conditional rule controls when the divider is active. So in the example above, if the "start_floor" is equal to b1 or 1, the tech would not be allowed to pass the divider.

· 4
5 |100000

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

Amy avatar image Amy commented ·

@Felix Möhlmann , thank you for your answer.
Is there a way to achieve this without acquiring the patient to Tech? For example, when the patient is not acquired, they cannot pass through the barrier, and when acquired, they can choose whether to pass based on the patient's label.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Amy commented ·
There is no easy way to check if the Tech is moving a patient or not by default. You'd have to check the current task sequence for this.

What I'd do is to create a label (let's call it "PatientLabel") on the techs whose value is reset to 0 on model reset. In the Process Flow, after a tech is acquired to transport a patient, set that label depending on the patients labels. Then use this in the divider rule, for example "traveler.PatientLabel != 1", so only techs with a label value of 1 can pass.

0 Likes 0 ·
Amy avatar image Amy Felix Möhlmann commented ·

@Felix Möhlmann , Thank you.

How would I set that label depending on the patients labels in the process flow? Can you show me an example?

0 Likes 0 ·
Show more comments