question

Bryan Armstrong avatar image
0 Likes"
Bryan Armstrong asked Jason Lightfoot commented

Setting a label value based on value of another label

In my model I have multiple testers (processors) that have unique reject rates. A flowtiem is routed to some or all of the different testers depending upon its item type. When test is complete (Process Complete) I am setting the value of a label (1 = pass; 2= fail) based on a percentage. I also want to set the value of another label (Reject) to equal 2 if the value of the test label also equal to 2. Otherwise, I don't want to set this Reject value. I am looking for some help in writing the code for assigning the value of the Reject label.

FlexSim 24.0.0
label value
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Hi @Bryan Armstrong, was Felix Möhlmann'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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

An if-condition in a code snippet should do the trick.

if(item.testLabel == 2)
{
    item.Reject = 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.

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.