question

Paulina B6 avatar image
0 Likes"
Paulina B6 asked Jeanette F commented

Order of calls through list

Good morning, I want to know if in some way these processors can be configured to serve as follows:


procesor 1 5 4 3 2 1
procesor 2 3 2 1 5 4
procesor 3 1 5 2 3 4


1678486000328.png

In addition to this, I want this order to be able to be changed manually in each processor and that if there are no boxes in any of the queues, it should still call the queues if there are boxes.

thank you so much

Logica.fsm

FlexSim 22.2.1
procesorlist pull from listusing lists
1678486000328.png (305.6 KiB)
logica.fsm (27.8 KiB)
· 2
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 ·
@Paulina B6, assuming your list is a table and numbers are queues and you want to do processing repeatedly, you do this by pulling from port in your processors. But what do you mean by “manually”? Are there randomized events that are interrupting your cycle and processed by priority or do you want to have an interface to activate a different process? Please be precise in your description. And maybe you can review a description to make it understandable even for users that haven’t access to the project documents. Thanks,
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Paulina B6, was Jeanette F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jeanette F avatar image
0 Likes"
Jeanette F answered Jeanette F commented


Hello @Paulina B6 ,

I added your table into your model as a Global Table. I fixed the row headers so that they matched the processor names in your model.

On each processor, you can add a pull strategy that is custom code. 1678571874823.png

This custom code uses a label on the processor to tell what index the processor is at in the pull sequence. This sequence index is initialized as 1 so we first increment if the processor has pulled its first item (This is because the pull strategy is evaluated on reset so we don't want it to increment until the model starts). Then evaluate what port should be used for this index in the sequence as defined in your global table. Lastly this code checks to see if the sequence index needs to be reset by making sure the index does not exceed the number of columns in the table

Object current = ownerobject(c);

/**Custom Code: Port Sequence defined in Global Table*/


int Port = 0;
Table PortSequenceTable = Table("GlobalTable1");
string Row = current.name;
int Column = 0;


if(current.stats.input.value > 0){
current.PortSequenceIndex++;
}


Column = current.PortSequenceIndex;
Port = PortSequenceTable[Row][Column];


if (current.PortSequenceIndex >= PortSequenceTable.numCols){
current.PortSequenceIndex = 0;
}


return Port;


logica_1.fsm



logica-1.fsm (29.2 KiB)
1678571874823.png (8.2 KiB)
· 2
5 |100000

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

Paulina B6 avatar image Paulina B6 commented ·

Hola Jeaneth, muchas gracias por tu respuesta, es lo que estaba buscando, quiero preguntarte sobre una situación que vi porque al ejecutar el modelo se detiene cuando no llegan cajas naranjas por un momento, lo que provoca que el otro colas para aumentar el tiempo de espera espera. Adjunto videos para que confirmes.

También quería preguntarles si debo ingresar más procesadores, cuál es la forma correcta de insertarlos en el sistema y agregarlos al código sugerido.


Capturas.rar


Muchas gracias.


Translation:

Hello Jeaneth, thank you very much for your answer, it is what I was looking for, I want to ask you about a situation that I saw because when executing the model it stops when no orange boxes arrive for a moment, which causes the other queues to increase the time of wait wait. I attach videos for you to confirm.


I also wanted to ask if I should enter more processors, what is the correct way to insert them into the system and add them to the suggested code.

0 Likes 0 ·
captures.rar (8.7 MiB)
Jeanette F avatar image Jeanette F ♦♦ Paulina B6 commented ·

Hello @Paulina B6,

To add in a processor you will need to connect the queues to the processor in the correct order, add the custom code to the pull strategy, and add in a line to the Global Table with the correct name of the processor and the sequence order.

All 3 processors are pulling from port 5. That's why that happens. Its not an issue with how the model was built.

0 Likes 0 ·