question

Tee Hiett avatar image
1 Like"
Tee Hiett asked Matthew Gillespie commented

Convert a string to use in keepresource command


2018-05-15-9-36-06.png

In the attached file, I have identified as a string the name of a receptionist I want to use in a keepresource command. How do I do this?

Thanks,

Tee

FlexSim HC 5.3.4
parameterscommandstree nodes
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

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

keepresource() wants to see an Node reference as it's first parameter so you just need to turn the name into an Node by using the node() command and use that as the first parameter:

keepresource(node(RepName, model()), patient);

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

You could also use the executestring command since there's a global variable with the same name as every resource:

keepresource(executestring(RepName), patient);
1 Like 1 ·

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.