question

joey avatar image
0 Likes"
joey asked Joerg Vogel commented

Set Item Type

Hello everyone. I have something to know. I want to create a list of type 1 and type 4 in the same "source" I tried to create with the "Set Item Type" method, but it looks like it creates type 1, type 2, type 3, type 4. Come out, but what I want is just type 1 and type 4. How should I solve this problem?

Thank you for your help in advance.

FlexSim 19.0.4
set item type
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

Instead of creating the types by a duniform distribution directly you do it indirectly over an array:

Array typesToChooseFrom = [1,4];
item.Type = typesToChooseFrom[duniform(1,2)];
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

you choose the pick list option "Set Item Type by Percentage" from Data in OnCreation trigger.

0 Likes 0 ·