question

Chandler avatar image
0 Likes"
Chandler asked Jeanette F commented

Set maintenance condition for all locations using script? (healthcare)

I have built a model with roughly 65 exam rooms and treatment spaces. In order to expedite the building and testing of the model, I haven't set maintenance conditions for these exam rooms.

Now I would like to set all of these conditions as well as a custom conditional logic that I am using to determine which staff is responsible for maintenance (Roughly: if custodial staff is busy and more than 3 nurses are available, use a nurse. Else, use custodial staff)

Normally, because it would be time consuming to set these one by one, I would change things like this using script (for all x in Group, assert something) but I don't know how this particular info is referenced on a location object (I can't find it in the tree, or sample it from the script console).

Also, I don't know how I would assert a custom code as the value for the "maintenance staff" field. Is that possible?


Is it possible to do all of this with code or do I have to change each one manually?

FlexSim 23.1.2
healthcarescriptmaintenance
· 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.

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
0 Likes"
Matthew Gillespie answered

You can set this value on multiple objects at once by selecting (with a red box around them) all the objects you want to change and then changing the value on one of them. You can select objects by Shift lassoing a bunch of objects, Ctrl clicking on individual objects, or selecting them from a Group properties menu and pressing the Select object button:

1695059597493.png

To use custom code for the Maintenance Staff field, click the dropdown arrow next to the field and then choose Code Editor from the menu.


1695059597493.png (9.1 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.