question

Amy avatar image
0 Likes"
Amy asked Amy commented

Help with using By Case

by_case.fsm

When creating a Patient, I want to set the destination as "By Case" so that if it's "Start," it starts from Group("Start"), and if it's "Start2," it starts from Group("Start2"). However, it's not working well.

I want to randomly start from one of the locations in Group("Start").
Similarly, I'm facing issues with setting the destination in Transport Patient.

I would appreciate your assistance.

1711034108672.png

FlexSim 24.0.0
by case
1711034108672.png (182.3 KiB)
by-case.fsm (72.7 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 Amy commented

The destination has to be specific object. To choose a random object from a group, use an expression like the one below.

Group("..")[N] returns the member of the group at index N. In this case N is a random number between 1 and the number of objects in the group, as determined by the distribution function duniform.

Group("Start")[duniform(1, Group("Start").length, getstream(activity))]
· 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.

Amy avatar image Amy commented ·
Thank you so much!!
0 Likes 0 ·

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.