How can I change the state of my ORs ?

How can I change the state of my ORs ?

leah_r
Not applicable
127 Views
3 Replies
Message 1 of 4

How can I change the state of my ORs ?

leah_r
Not applicable

[ FlexSim 22.1.2 ]

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




0 Likes
Accepted solutions (1)
128 Views
3 Replies
Replies (3)
Message 2 of 4

moehlmann_fe
Advocate
Advocate
Accepted solution

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

0 Likes
Message 3 of 4

leah_r
Not applicable

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
Message 4 of 4

moehlmann_fe
Advocate
Advocate
Set the state in the reset trigger, so the object starts the model run in one of the other two states.
0 Likes