question

mary avatar image
0 Likes"
mary asked Jeanette F commented

How to label by percentage

Hi I have a model where in the processor1 and processor2 on exit I want to assign a label of "Repair" and "Production" and set a percentage like for repair 20% and Production 80% should go to particular station of repair and production using process flow how can I do it. Please help with logic.

pallet-rack-fm.fsm

FlexSim 20.0.10
by percentagelable
postt.fsm (36.8 KiB)
pallet-rack-fm.fsm (38.9 KiB)
· 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.

mary avatar image mary commented ·
please refer pallet-rack-fm model.
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @mary, was one of Jason Lightfoot's or mary's or Joerg Vogel's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jason Lightfoot converted comment to answer

You can add a comparison as a label value like

duniform(0,4) == 0 

duniform choose a value randomly in the range 0 .. 4 compared to a value like 0 only 20% are returning a true which is an integer value of 1 all other returned values will be 0.

EDIT: in Send To Port you can apply the same strategy for port by case

condition: duniform(0,4)

default port to destination without repair

any chosen value like 0 to a port number for repair.

· 5
5 |100000

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

mary avatar image mary commented ·

Thank you for the reply but this not I'm looking for I want to assign label as repair and production to items by percentage and then to there station.

0 Likes 0 ·
mary avatar image mary mary commented ·
should be done in process flow


0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel mary commented ·

here is an adaption:

  • assign label for destinations as an array
  • assign label for an index of this array to get statistically a relation of 1 to 4.

add-labels.jpgevaluate the destination of the array destination by value of randomIndex.

set-destination-by-labels.jpg

Be aware of that a statistical distribution only return valid relations for a really large number of events (eg. > 1000). Your current amount of entry events won't sufficiently be enough.

0 Likes 0 ·
Show more comments
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

If it's repair or production you can just test if one label "Repair" is true or false which you can set with a percentage using the AssignLabels activity:

1655988448365.png


You could also use a decide to go to two different process routes with explicit travel activities - one for each destination. The condition option of the decide could just be:

token.Repair

or you could choose the percentage option of the decide activity and not implement the Rapair label:

1655987729985.png



1655987729985.png (11.8 KiB)
1655988448365.png (7.3 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.