question

Leah R avatar image
0 Likes"
Leah R asked Felix Möhlmann commented

How can I change the state of my ORs ?

Hello guys !

I am working on modeling an operating room.

I want to create a custom state profile with 2 options (PlannedOpen, PlannedClosed).

I want my OR to go through these states throughout the simulation :

  • 6pm to 8am + 12am to 2pm : PlannedClosed
  • 8am to 12am + 2pm to 6pm : PlannedOpen

As these states represent a planned/theoretical behavior, I don't want them to affect the functionning of the ORs.

Here is what I thought of doing :

  1. Create a custom state profile with 2 states (PlannedClosed & PlannedOpen) : the issue is that when I try to add a node in the tree to create that it gets erased immediatly. And if copy an existing node and try to change it, it refuses to update with the values I want... ==> Issue solved, see figure below
  2. Create a DownBehavior NoChange : that would allow me to change the state without changing the state of the ORs without changing their behavior. The issue is that if the two first lines are empty the model does not work (cf figure )
  3. Create a Time Table PlannedSchedule where I would model PlannedClosed and PlannedOpen as DownBehavior NoChange.


1655220214460.png

So my two questions are :

  • How can I add a custom profil in the tree ? ==> solved
  • How can I create a down behavior that has no effect on behavior (I know it does not sound to intuitive to I'm open to other solutions)


I hope it's clear, thanks in advance !


Leah




FlexSim 22.1.2
state profilesprofiledownbehavior
1655220214460.png (80.8 KiB)
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

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

When creating a new down behaviour, just delete most code in the 'Down Function', so all it does is set the state of the object. The 'Resume Function' should do nothing (only return 0).

Then you can alternate between two such behaviours in the time table.

1655284562517.png

CustomStateHC_fm.fsm


1655284562517.png (124.1 KiB)
customstatehc-fm.fsm (126.3 KiB)
· 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.

Leah R avatar image Leah R commented ·

Thank you so much, it works perfectly ! One last thing, any idea how to get read of the "other" state in the second diagram ?

1655294940749.png


0 Likes 0 ·
1655294940749.png (92.6 KiB)
Felix Möhlmann avatar image Felix Möhlmann Leah R commented ·
Set the state in the reset trigger, so the object starts the model run in one of the other two states.
0 Likes 0 ·