question

Manuel R26 avatar image
0 Likes"
Manuel R26 asked Jacob W2 commented

Distribute labels

Hello,

in my model I am trying to combine 24 x Object A with 1 x Object B.

I would like to set a label on the exit of the combiner that gives the first 10% of Items the value 1,
the second 10% the value 2,
and so on, the 10th 10% the value 10.

Is this possible somehow?

Thanks in advance!

Best regards

Manuel

FlexSim 22.0.1
labels
· 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.

Jacob W2 avatar image Jacob W2 ♦ commented ·

Hi @Manuel R26, was Jason Lightfoot'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

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

I don't see the relevance of the 24+1 in your question.

The label value can be

combiner.stats.output.value%10+1;

Update - this may not be correct for this model - FlexSim doesn't use the statistic output to record items that leave the combiner through an output port in pack mode (which the model is using). So for example if you use stopoutput on the combiner the output stats will continue to increase as the items are 'combined'. That's not the case when they are joined.

· 16
5 |100000

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

Manuel R26 avatar image Manuel R26 commented ·

Yeah the 24 + 1 was unnecesarry information i guess.


Does that line go in here?

1651504859016.jpeg

0 Likes 0 ·
1651504859016.jpeg (4.6 MiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Manuel R26 commented ·
yes but change 'combiner' to current
0 Likes 0 ·
Manuel R26 avatar image Manuel R26 commented ·

Hey jason, thanks for your quick answer.
I have tried your input, but it was still assigning the labels randomly.

Would it also be possible to set the labels on the source that assigns to the first 10% name "A", to the second 10% name "B" and so on?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Manuel R26 commented ·

No you can only count how many you want of a certain type and then switch to another type. If you know the total quantity then you know how many to count for each 10%, but if you don't know how many in 100%, you can't perform that count.

0 Likes 0 ·
Manuel R26 avatar image Manuel R26 Jason Lightfoot ♦ commented ·

That would be no problem. The 100% i know.

How can I perform this count and switching to different types?


I have attached the model.

YPP.fsm
Thanks!

0 Likes 0 ·
ypp.fsm (54.6 KiB)
Show more comments

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.