question

Santiago T2 avatar image
1 Like"
Santiago T2 asked Santiago T2 commented

Tomar artículos de racks y almacenar en cola

Saludos. Estoy realizando una simulación en el cual se debe tomar algunos productos de los racks para luego almacenarlos en diferentes colas, estos productos tienen etiquetas las cuales quiero almacenar según su correspondiente etiqueta. Estoy utilizando operarios para que transporten los productos, pero ellos solo los toman de forma aleatoria y no según su etiqueta. Para el desarrollo de este proceso estoy utlizando la herramienta process Flow.

productos.png

Espero puedan ayudarme. Gracias!

FlexSim 21.2.4
processflowqueuelabelsoperatorsracks
productos.png (28.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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Santiago T2 commented

You can use the "Query/Object/Array" field to define conditions that the item has to fulfill in order to be pulled. The query supports two basic SQL commands: "WHERE" and "ORDER BY"

"WHERE" defines a condition, for example a certain label value.

"ORDER BY" orders the eligible list entries by a certain value.

To use these, the list should contain a "field" with the value you want to use in your query. The default "ItemList" has four fields: The "Type" label, the "age" (how long the item has been on the list), the "distance" (physical distance between "puller" and the item) and "queueSize" (how many items are inside the items storage object/location).

1635845221775.png

You can add more fields via the green plus-symbol at the top of the list properties.

These field values can then be compared to static values or, for example, label values on the "puller". The puller is the object that tries to pull an entry from the list. By default, this will be the token when using the "Pull from List" activity.

"WHERE Type = 1" would only pull items with the type label value of 1 from the list.

"WHERE Type = puller.Type" would only pull items whose type is equal to the token's type label value.

The attached model demonstrates this. Each token in the process flow represents a queue and will only pull items whose type is equal to the "Type" label on the respective queue. They are also ordered by "age" in descending order, meaning the item that has been on the list the longest gets pulled first.

ListQuery.fsm

Relevent section of the manual:

https://docs.flexsim.com/en/21.2/ConnectingFlows/Lists/WorkingWithLists/WorkingWithLists.html#queries


Google Translate:

Puede utilizar el campo "Consulta / Objeto / Matriz" para definir las condiciones que el elemento debe cumplir para ser extraído. La consulta admite dos comandos SQL básicos: "WHERE" y "ORDER BY"

"WHERE" define una condición, por ejemplo, un determinado valor de etiqueta.

"ORDER BY" ordena las entradas de la lista elegibles por un valor determinado.

Para usarlos, la lista debe contener un "field" con el valor que desea usar en su consulta. El "ItemList" predeterminado tiene cuatro campos: la etiqueta "Type", la "age" (cuánto tiempo ha estado el elemento en la lista), la "distance" (distancia física entre "puller" y el elemento) y "queueSize" (cuántos elementos hay dentro del objeto / ubicación de almacenamiento de elementos).

Puede agregar más campos mediante el símbolo más verde en la parte superior de las propiedades de la lista.

Estos valores de campo se pueden comparar con valores estáticos o, por ejemplo, con valores de etiqueta en el "puller". El "puller" es el objeto que intenta extraer una entrada de la lista. De forma predeterminada, este será el token cuando se utilice la actividad "Pull from List".

"WHERE Type = 1" solo extraería elementos con el valor de etiqueta de tipo de 1 de la lista.

"WHERE Type = puller.Type" solo extraería elementos cuyo tipo sea igual al valor de la etiqueta de tipo del token.

El modelo adjunto demuestra esto. Cada token en el flujo de proceso representa una cola y solo extraerá elementos cuyo tipo sea igual a la etiqueta "Tipo" en la cola respectiva. También están ordenados por "edad" en orden descendente, lo que significa que el elemento que ha estado en la lista por más tiempo se extrae primero.


1635845221775.png (18.3 KiB)
listquery.fsm (130.0 KiB)
· 7
5 |100000

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

Santiago T2 avatar image Santiago T2 commented ·

Saludos, @Felix Möhlmann

En el caso de querer almacenar cajas, pero este almacenaje se debe basar en una tabla la cual contiene el tiempo, la cantidad y etiquetas: "type" y ''queue''. ¿Como puedo hacer para que los operarios tomen las cajas segun el tipo y lo almacenen en su cola destino tal como lo indica la tabla ?

Estoy usando la herramienta processflow y generando la tabla en (schedule souce)

box.pnglabals.png

model

Item_and_labals.fsm

Muchas gracias!

0 Likes 0 ·
box.png (37.7 KiB)
labals.png (36.8 KiB)
item-and-labals.fsm (53.7 KiB)
Felix Möhlmann avatar image Felix Möhlmann Santiago T2 commented ·

Since the type label on the token determines the type of the item, you use that in the query ("WHERE Type = puller.Type", as the "puller" is the token).

You can use the queue label to reference the correct queue in the "Unload" activity. Either by name with

Model.find("Queue" + string.fromNum(token.Queue))
// Model.find() returns a reference to the object with the given name
// To get the correct name I add the number from the label onto the word "Queue"

or by using the label value the rank in their respective group

Group("Queue")[token.Queue]
// "Queue" is the name of the group containing the queues

I reduced the arrival times in the example model, so the function can be observed earlier.

item-and-labals_2.fsm


Google Translate:

Dado que la etiqueta de tipo en el token determina el tipo de artículo, lo usa en la consulta ("WHERE Type = puller.Type", ya que el "puller" es el token).

Puede utilizar la etiqueta de la cola para hacer referencia a la cola correcta en la actividad "Unload". O por nombre con

Model.find("Queue" + string.fromNum(token.Queue))
// Model.find() devuelve una referencia al objeto con el nombre dado 
// Para obtener el nombre correcto, agrego el número de la etiqueta a la palabra "Queue"

o usando el valor de la etiqueta el rango en su grupo respectivo

Group("Queue")[token.Queue]
// "Queue" es el nombre del grupo que contiene las colas

Reduje los tiempos de llegada en el modelo de ejemplo, por lo que la función se puede observar antes.

0 Likes 0 ·
Santiago T2 avatar image Santiago T2 Felix Möhlmann commented ·

Saludos, @Felix Möhlmann

En el ejemplo anterior se observa a cada operario cargar una caja a la vez, ¿Cómo puedo aumentar la cantidad de cajas que transporta cada operario ?

cajas.png

Eh intentado hacerlo aumentando su capacidad máxima tanto en el operario como en el processFlow pero no funciona.

Muchas gracias!

0 Likes 0 ·
cajas.png (53.1 KiB)
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.