question

Chandler avatar image
0 Likes"
Chandler asked Jeanette F commented

List of Choices with Max wait Timer (Flexsim HC)

I am looking for a more elegant and user-friendly way to do the following:

  1. Patient has a preferred exam room type. Try to acquire.
    1. After max wait timer expires, try to acquire a default exam room instead.
  2. (Keep exam location acquired) then acquire a diagnostic area [imaging, etc. (floor spot in this model)]
  3. After diagnostics, release that location
  4. Walk back to the exam room.
  5. Release the exam room and exit the simulation.

I am wondering how to do this in the way I have labeled "best" (or as close to it as possible)

Good (This is what I have working the way I need)

Acquire from two separate resources, acquire to a label patient.exam. Return the patient to patient.exam and release from that label.

Pro: simple

Con: more wires to manage, no visual connection to the acquired resource

Better (I think this doesn't work fundamentally, but would be OK if there is a way)

Acquire from two separate resources, acquire to patient.Locations. Later references reference a location resource that points to the patient.exam label.

Pro: good for the visual/UI aspect: less technical users can easily identify which location resource is attached to future activities.

Con: doesn't work, seems like having two separate resources at first is just using extra objects


Best (this is my ideal)

Acquire from one resource, using "List of Choices" option in the resource object. Ideally this would have a set amount of time to wait for item 1 before using item 2.

Pro: everything is wrapped up in one resource object, we can just acquire to patient.Locations (no need for a new label, but also could use one)

Con: I don't think it's possible to put a wait timer in there.

---

Preferred outcome is list of choices with wait timer . Is there some way to do that with some script in the list options? Or an easy way to do it with code?


Thanks as always!


FlexSim 23.1.2
healthcarescriptresourceslocations
· 2
5 |100000

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

Chandler avatar image Chandler commented ·

Error uploading the file before, here it is:

location_choices_with_delay.fsm

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Chandler, was Matthew Gillespie'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

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Matthew Gillespie commented

Here's an example of how you could use the By Condition option with just one resource.

location-choices-with-delay_1.fsm

The resource is set to use the Beds group unless the ConsiderBackup label is set on the token, then it uses the AllExams group. If the max wait timer expires the ConsiderBackup label is set to 1 and then it goes back to the acquire, but this time it will consider all the beds and chairs.

1694213935694.png


· 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.

Chandler avatar image Chandler commented ·
I love it. Simple and versatile. Thanks Matthew!
0 Likes 0 ·
Chandler avatar image Chandler commented ·

This works, but it highlights another problem with looping - generally unless I add a substantial delay/breath, loops like this tend to bog down the simulation. If I'm doing something like this:

  1. try to acquire, fail
  2. check if patient can use default
  3. set default label
  4. try to acquire default, fail
  5. go to waiting
  6. breathe
  7. (Go to #1 until successful)

I end up being able to run the simulation no faster than maybe 10x or 20x real time. This is the result of cumulative loop delays... just maxing out computation power I think.

Eventually I will need to run this for dozens or even hundreds of simulation hours but need to avoid the slowdown, and I don't want to introduce a delay of more than say 5 seconds, or 30 at max, so that I don't have people skipping past one another. (It might be effectively stable even if they do, but I'm always trying to move away from that squishy logic)

---

What might be the right tool to handle that? My gut says the waiting area could be a list (or possibly a zone), and I could use a Wait for event triggers to pull people from a common pool of waiting based on what they are waiting for, when resources that they need free up.


0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Chandler commented ·

I don't understand why you're looping like that. In the example model I attached, after the first max wait time it then tries to acquire any of the beds or chairs. You can then leave the token there until a bed or chair opens up.

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ Chandler commented ·

Hello @Chandler,

Matthew is correct in that once you cannot acquire the first group resource the second does not need to be looped through. The token should just wait for a bed or chair to be available. I modified Matthews example so that when the patient fails to acquire a bed it then goes to a new acquire resource activity that does not have a wait time. The token will wait there until a bed or chair is available.

1694791952242.png


location-choices-with-delay-1_1.fsm

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

I realized that my example sends the token back to the Acquire activity with the max wait timer, which wasn't what I intended. I didn't want the token to have a max wait timer the second time. So instead of sending it back to the same Acquire activity we should send it to a 2nd activity that doesn't have a max wait timer but is also connected to the Exam resource.

location-choices-with-delay-2.fsm

1694792721387.png


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.