question

Hugo avatar image
0 Likes"
Hugo asked Jeanette F commented

How to create a label for just the item with no labels?

trying to consider the seasonality effect, I'm considering probabilities distributions curves in the creation of items (with labels) by percentage, (from the Expertfit) but as the total should be 100%, it seems that doesn't always work. I have 9 items with probability curves, when the total is less than 100% it looks like Flexsim creates an item for got the total of100%. However, this created item does not receive any label and passes like a "ghost" through the next stations, that is, zero processing time. How could I create a label just for this new item?

FlexSim 23.0.1
labelby percentageprobability distribution
· 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 ·
@Hugo, can you upload an example model, that behaves as described! Thank you. But I think you expects from a statistical function a behavior that does not correlate with absolutely precision in comparison to a relation. The idea behind a statistical distribution is its uncertainty.
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Hugo, 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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Joerg Vogel commented

You could use

item.labels.assert("labelName", value);

This checks if the specified label is present on the object. If not, it creates the label with the value set to the second parameter. That parameter can also be an expression like a statistical distribution. (The command returns a pointer to the label treenode)

Though the more prudent solution would probably be to just edit the "Labels By Percentage" code so that the upper limit of the random variable is actually equal to the sum of your probability weights.

1677485096194.png


1677485096194.png (66.6 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
  1. item.labels.assert("labelName", value) = value;

You find often in picklist options this code line. It asserts new labels AND it updates existing labels.

0 Likes 0 ·

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.