question

Raashid Mohammed avatar image
0 Likes"
Raashid Mohammed asked Matthew Gillespie answered

How to make 6 wait events and assign label to One Wait Event instead

attached is the model

I have arrival schedule from Source 2 with labels F01,F02,F03,S01,S02,S03 with value

I want the only One wait until to activate instead of 6 at Processor3 Onentry, to check for all 6 labels and their values if its 0 then delete and if greater than 0 then assign (F01,F02,F03,S01,S02,S03) label name to "Chute" label and its value to count label

Please help

Thanks model1.fsm

FlexSim 16.1.1
wait for event
model1.fsm (23.3 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.

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

Check out the attached model.

I converted the 6 Event Triggered Sources into a single Source that then uses a Create Tokens activity to make a token for each of the labels.

On the Create Tokens activity I set the Quantity field to be the number of labels on the item minus 2 (ignoring the first 2 labels):

  1. content(labels(getlabel(token, "item"))) - 2

I also assigned a Chute label with this value:

  1. getname(label(getlabel(token, "item"), creationRank + 2))

And a Count value with this value:

  1. getlabel(getlabel(token, "item"), creationRank + 2)

These tokens are then sent to a decide where any tokens with a count of 0 are destroyed.


5 |100000

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