question

Bryan Suharik avatar image
0 Likes"
Bryan Suharik asked Adrian Haws commented

Number of Operators depending on item type from Global Table?? via code

Hello,

I thought i had the right command for my processor to choose the amount of operators needed depending on the item type that was on the processor.

setvarnum(bayrepair,"nrofprocessoperators",gettablenum("ProcessTimes",getitemtype(item),3));

This script seems to return a value of 0 as no operators move to the processors during the runtime.

ProcessTimes is the name of my global table.

IS this possible, or do i have to use an onentry trigger of some kind. if so, how would that code look? I'm a bit new and still getting the training wheels greased.

Thanks!

FlexSim 16.0.6
global tableoperatorprocessorcode
· 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.

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Adrian Haws commented

You have asked this source code line in another question. The source code is a part of a source code string you are placing inside a process time function of a processor. Please test the functionality in the string with an easier content.

setvarnum(bayrepair,"nrofprocessoperators",2)

After that insert a print output console command which evaluates the stored value of the variable.

pd(getvarnum(bayrepair,"nrofprocessoperators "));

Then you look into the output console to check if the value is going to change. In the next step you print the value of the table ProcessTimes of one suitable row 3rd column to the output console by a command string in your source code for the process time function. Then you can be sure that asked code line is correct.

Then my following question is the last test.

Has you already add to the model structure a dispatcher object to transfer the Tasksequences to more operators as I mentioned in my answer.

· 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.