question

Leah R avatar image
1 Like"
Leah R asked Ryan Clark commented

How to change arrival spacing from parameters table ?

Hi !

Is there a way to to change arrival spacing from parameters table ?

Thanks in advance,

Leah

1644231635500.png

FlexSim 21.0.1
parametersarrival schedule
1644231635500.png (43.9 KiB)
· 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.

Ryan Clark avatar image Ryan Clark commented ·

Hi @Leah R, was Felix Möhlmann'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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

The arrival spacing is represented as a node in the sources tree with the three possible values 0 (at time), 1 (evenly spaced) and 2 (randomly spaced).

1644237052217.png

To open the tree view of the source, right click on it and choose "Explore Tree", then click on the source node and finally on the arrow that appears to the left of it. Then expand the different subnodes as needed.

1644237138889.png

In the parameters table, create a fitting parameter (for example an "Option" type with the possible values 0, 1 and 2).

1644237194941.png

Click on the sampling tool next to "Reference", then click on the "arrivalSpacing" node in the tree and choose "Set Node Value". The source will now the set to the respective setting on each model reset.

ArrivalSpacingParameter.fsm


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

Leah R avatar image Leah R commented ·
Hi ! Thanks you so much :)) I managed to do it ! Is there also a way to activate/desactivate a source from the parameters ?

I want to create two sources : one for my elective patient arrivals and one for the non-elective patient arrivals. Then, I want to be able to make them "work" or not.

Thanks in advance :)

Leah


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Leah R commented ·

Yes, pretty much just like above. The variables node that controls the setting is simply called "enabled" (0 -> inactive, 1 -> active). If it's important that the icon of the source gets crossed out when disabled, add

function_s(ownerobject(reference), "updateIcon");

to the "On Set" trigger.

1644329496783.png


0 Likes 0 ·
1644329496783.png (109.8 KiB)
Leah R avatar image Leah R Felix Möhlmann commented ·
Thank you !!
0 Likes 0 ·
Leah R avatar image Leah R commented ·

I just noted something, I get this message when I write 0 for the parameter. Is it normal ?

1644331112305.png


0 Likes 0 ·
1644331112305.png (5.4 KiB)
Felix Möhlmann avatar image Felix Möhlmann Leah R commented ·

Be sure to set up the parameter according to what it represents. A newly added parameter will default to continuous type with a range from 1-10, so FlexSim will prevent you from entering numbers outside that range. For the source, an integer from 0-1, a binary or an option parameter (values of 0 and 1, names as you choose) would all be fine.

1644337692504.png

These are just examples, so the reference is missing.

0 Likes 0 ·
1644337692504.png (30.5 KiB)