question

Ksenia F avatar image
0 Likes"
Ksenia F asked Jason Lightfoot commented

Error in the model

Hello! I can't understand why the error comes out when starting the model. The model continues to work correctly, but the error still pops up. Could you help me figure it out? And how can you make the children 50/50 boys and girls.

Thanks in advance! Model attached

Kids.fsm

FlexSim 20.2.0
healthcareflexsim 20.2.0
kids.fsm (364.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.

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

It's because at line 6 of the Random Appearance for the children arrivals you have a reference to token.Person and there is no label Person on the token.

The easiest way to do 50/50 is probably like this:

Where the decide condition is bernoulli(50,0,1).

Updated model attached.

kids-jl2.fsm


1605612835498.png (22.6 KiB)
kids-jl2.fsm (365.7 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ksenia F avatar image Ksenia F commented ·

If you show me how to get rid of this error in the model, I will be grateful to you.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ksenia F commented ·

I fixed it in kids_jl2.fsm, but you should be able to erase all code for Change Visual and then choose another option (like set shirt color). Or delete this activity.

0 Likes 0 ·
1605614574866.png (10.1 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

You can alternatively use percentage for the decide logic:

0 Likes 0 ·
1605630100082.png (15.9 KiB)