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.

1 Answer

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

You could use

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