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.

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

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

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:

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