question

sau_fui.e avatar image
0 Likes"
sau_fui.e asked Felix Möhlmann answered

Different process time for nth rework

I am trying to make it such that certain items when being reworked will have a different processing time. In my case, item types 1 and 2 will pass after processing on any one of the 8 processors, but item types 3, 4, and 5 after being processed will be sent to a different processor (any one of the other 7) and be processed with different timings before accepting it or discarding it.


I thought of using increment, but that only works with labels and I am using set item type by percentage trigger as there is not option for set item label by percentage, I saw another question that said to add a code snippet, but I just got a few errors as shown below, and I am not proficient enough with C++ to understand the errors (I also had a "Set object color", "Set item type by percentage", and "Set label" in the trigger that I put the snippet in). https://answers.flexsim.com/questions/83499/set-label-by-percentage-in-flexsim-1900.html this is what I copied into the code snippet.


Flexscript Error MODEL:/Disk>variables/creationtrigger Line 59 unknown variable "Object"

Flexscript Error MODEL:/Disk>variables/creationtrigger Line 59 syntax error, unexpected identifier, expecting ';'

Could not finish parsing because of previous errors.

FlexSim 16.0.9
reworkincrement label
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
1 Like"
Felix Möhlmann answered

The code from the linked post uses syntax that is not available in version 16.

You can simply copy the itemtype value to a label though. No need to assign the label directly by percentage.

1666271943627.png


1666271943627.png (14.5 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.

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.