question

Julien L2 avatar image
0 Likes"
Julien L2 asked Julien L2 commented

How can I link the processor in my simulation to tables?

I’ve created a simple model in which 2 different types of items are being processed and later on they arrive at their respective queues. I have also created two different tables. The first one describes a sequence in which I want the processor to pull items from the first two queues, based on their LoadType. The second one describes the process time related to each LoadType.

Unfortunately, I haven’t been able to correctly link the processor to these tables so far so I was wondering if I could get a little help here.

tableproblem.fsm

Thank you!

FlexSim 19.2.3
processor table
tableproblem1.png (71.2 KiB)
tableproblem2.png (16.9 KiB)
tableproblem.fsm (33.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 Julien L2 commented

The Proccesor pulls the items of the queue. The Pull Strategy looks up from the Table "Sequence". You need a label that tells the processor the row. There are different aproaches you can use: The classic increments the label on a repeating event of the process like OnSetupFinish, OnProcessFinish, OnExit,... You need to write some code in such a trigger:

current.yourlabelname += 1;

If the label exceeds the available rows of the table, you need to reset the value back to the first row.

if(current.yourlabelname > Table("Sequence").numRows) current.yourlabelname = 1;

On Model Run Start you must be sure the value of this label must start with the first row, too.

The process time uses the look-up of a global table, too:

You can use for the row the label "LoadType" at the item

item.LoadType

tableproblem-jv.fsm


tableproblem-jv.fsm (32.3 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 ·

An alternative approach with array. I copy the table Sequence to an array through a query. The Pull strategy return the first element and delete it from a label. If the array length drops to zero the array is filled by the query again.

tableproblem-as-array-jv.fsm

0 Likes 0 ·
Julien L2 avatar image Julien L2 Joerg Vogel commented ·

Thank you for your efforts! It really helped me a lot so far. I was wondering if I could use the same methods with a combiner or a separator but I will make another post for this particular question.

0 Likes 0 ·