question

Ricardo G9 avatar image
0 Likes"
Ricardo G9 asked Joerg Vogel edited

Como generar elementos desde la fuente

Por favor me pueden ayudar, tengo un modelo de 60 cajas distribuidas en 5 tipos de cajas a cada una de ellas le corresponden un valor de 20% del total de cajas eso quiere decir que a cada tipo le corresponden 12 cajas y cuando simulo esto no logro cumplir esta condicion ni por set item type by percentage tampoco por global table. observo que la simulacion toma es valores aleatorios. por favor me podrian ayudar

prueba1.fsm

y esta fue la configuracion para set item type by percentage

prueba2.fsm

FlexSim 19.1.2
sourceflexsim 19.1.2triggers
1595822328230.png (63.6 KiB)
1595822638983.png (101.6 KiB)
prueba1.fsm (27.1 KiB)
prueba1.fsm (27.1 KiB)
prueba2.fsm (27.2 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

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

There are two systematic alternatives.

You create Type in alternate order 1,2,3,4,5,6,1,2,3,4,5,6,1,2,..

  • You add a set label picklist option in On Creation Trigger tab of a source. Name is “Type”, value is
    current.stats.output.value%6+1 
    It is done by a modulus operator, which returns the rest of an integer division.
  • You assign a Type value from a given list by extracting it. If the list gets empty, you fill it again.

if you need further assistance, then please come back and describe what you don’t understand or where we should go more in detail.

Si es un problema de idioma, intente con un traductor de internet. Como si hubiera usado uno aquí.

· 12
5 |100000

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

Ricardo G9 avatar image Ricardo G9 commented ·

En que parte del modelo coloco lo que me dijiste?

current.stats.output.value%6+1 


Me podrias mostrar como un paso a paso en imagenes por donde me puedo meter para aplicar estos cambios porque en realidad no se donde meterlos . gracias

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Ricardo G9 commented ·

Replace the source code statement from where you haven taken the picture

dempirical(“pi”, getstream(current))

by

current.stats.output.value%6+1 


1 Like 1 ·
Ricardo G9 avatar image Ricardo G9 commented ·

Hola @joerg.vogel,

Entonces debo colocar en la formula dempirical("p1", current.stats.output.value%6+1) para que entonces puede var 12 cajas en cada uno de los tipos de cajas? o como seria. Muchas gracias por ayudarme.

0 Likes 0 ·
1596164742228.png (66.2 KiB)
Joerg Vogel avatar image Joerg Vogel Ricardo G9 commented ·

For a range of 1..12 insert just

current.stats.output.value%12+1 

insert not a command name “dempirical” or “pi”.

0 Likes 0 ·
Ricardo G9 avatar image Ricardo G9 commented ·

hola @joerg.vogel,

realice lo que dijiste quitando el comando: dempirical"p1" y deje solo el codigo: current.stats.output%value12+1 pero todas las cajas se fueron para un solo tipo de caja y no a las 5 que deberia ser por favor me ayudas para saber como ingreso de manera correcta la formula


0 Likes 0 ·
1596337214803.png (380.9 KiB)
1596338354237.png (425.6 KiB)
1596338416309.png (57.9 KiB)
1596338468883.png (59.4 KiB)
Joerg Vogel avatar image Joerg Vogel Ricardo G9 commented ·
0 Likes 0 ·
Ricardo G9 avatar image Ricardo G9 commented ·

Hola @joerg.vogel,

Veo que la formula funciona siempre y cuando el source esta en la opcion inter arrival time pero, yo necesito trabajar es con la opcion arrival Schedule porque mi modelo solo debe trabajar con 60cajas agrupadas en 5 grupos de 12 unidades, y cuando aplico la formula current.stats.output.value%6+1 todos se colocan de color rojo como te mostre en la foto anterior. Te agradezco nuevamente tu colaboracion, si se puede hacer algo.

0 Likes 0 ·
1596594809806.png (40.8 KiB)
Joerg Vogel avatar image Joerg Vogel Ricardo G9 commented ·

Here is an example: I use the modulus division to set the label "Type" by assigning the rest of this division as the value. I also increment a label value at Source1 each time the rest becomes 0 of this division. I convert this result by a negation into a true value by the "!" operator.

All codes are in the On Creation trigger of the source.

create_12_alternate_types.fsm

0 Likes 0 ·
Ricardo G9 avatar image Ricardo G9 commented ·

Hola @joerg.vogel muchas gracias por la ayuda, tengo otra consulta:

Como se deberia hacer el modelo en donde me llegan 60 distribuidas de la siguiente manera:

tipo 1: 30%

tipo 2: 15%

tipo3: 25%

tipo 4: 20%

tipo 5: 10%

Como hago para el modelo aplique bien esos porcentajes lo realice por set item type by porcentage y no aplica bien los porcentajes pareciese que los tomara de manera aleatoria ej:

tipo 1 que es del 30% le corresponden 18 cajas pero cuando simulo me saca 23 cajas y asi me pasa con los demas tipos de cajas. te agradeceria que me ayudaras otra vez y que pena abusar tanto de tu confianza, saludos.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Ricardo G9 commented ·

You need two different label names though.

  1. A label that keeps the distribution data of percentages amount of 60 items
  2. A label that is responsible to keep all items in a lot of 12 items.

The lot label sends the items to 5 destinations. Each destination receives 12 items.

The percentage label stores the different types in your set ratio.

If you have further questions about the source code, I’ll help.

0 Likes 0 ·
Ricardo G9 avatar image Ricardo G9 Joerg Vogel commented ·

@joerg.vogel Esto como seria en estos dias he tratado de realizar lo que me dices pero no he podido siempre me saca la distribucion de manera aleatoria. gracias

0 Likes 0 ·
Show more comments

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.