question

Ricardo G9 avatar image
0 Likes"
Ricardo G9 asked Ben Wilson commented

Como crear elementos desde la fuente

Por favor me podrian ayudar, necesito simular 13729 cajas en 53 tipos los cuales tienen porcentajes con decimales, he tratado de realizarlo desde triggers one creation set item type by percetage o por la global table y no he tenido resultados ejemplo para un tipo de caja tengo como porcentaje el 1.6% el cual deberian ser 220 cajas y cuando lo simulo en flexsim solo me saca 193 les agradeceria que me explicaran como realizar bien este proceso.

FlexSim 19.2.4
sourceflexsim 19.2.4triggers
captura.png (190.8 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @ricardo.g9, was joerg.vogel's or joerg.vogel's answer helpful? If so, please click the red "Accept" button on one of their answers. Or if you still have questions, add a comment and we'll continue the conversation.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

I push the Type of each empirical data product onto a list and create a random chosen number as a field. While I create an item I choose a value from the list which is my Type. Because I want to get a random Type value I order the list by the random field value. If the list gets empty, I run the reset trigger function again by source code which has filled initially the list.

draw_Type_by_emprical_sample.fsm


· 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 find here a model which draws from a table, that I update continously, while the model runs, to keep the available Types limited to a standard range.

draw_Type_by_emprical_sample_table.fsm

You may improve it still, if you replace the duniform statistical distribution by another discrete function, which take into account the available amount of same Types.

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

I assume you create products by a statistical distribution. Statistically means it has got a more randomly than absolute static character. On the other hand you want to replicate a given fixed input in a model but with a nearly perfect matching ratio during the run time. This is not easily to implement because the ratio will not fit perfectly until the input of products reaches the sum of all least common denominators of the ratio or the multiple of it during the simulation run time. You can build a logic that creates a defined order of types which fits best suited to your probabilities by code or a list. Or you choose randomly values from a list and decrement them until the list gets empty to start with a new full list again.

5 |100000

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