question

Anutt K avatar image
0 Likes"
Anutt K asked Anutt K commented

Assign token label value decide by object in group

Hello. I want to create logic for decide to acquire difference resource. Want to conditional by object in groups.

1667213659518.png

From attached model. I have 3 Queue and create 3 groups for each 3 Queue per group like the picture and add 1 group for all Queue name "All".

I have global list as name "Queue" it has initial content as member of Group : All inside.

In process flow it will pull from list "Queue" and assign value of token.pulled as Queue1, Queue2, ...... Queue9 .

Then I want to assign label after pull from list : Queue. Like this.

if : token.pulled = Queue1 or Queue2 or Queue3 (Queue in Group 1)

new label will has value = 1 .

if : token.pulled = Queue1 or Queue2 or Queue3 (Queue inGroup 2)

new label will has value = 2 .

if : token.pulled = Queue1 or Queue2 or Queue3 (Queue inGroup 3)

new label will has value = 3 .

The purpose is use difference Operator by each group of queue.

I will attached file here. Thank You so much.

Answer1.fsm

FlexSim 22.2.2
tokengroupassign label
1667213659518.png (254.2 KiB)
answer1.fsm (49.8 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.

1 Answer

Jacob W2 avatar image
0 Likes"
Jacob W2 answered Anutt K commented

Hi @Anutt K,

One way that you could do this is by adding a label on the queues that refer to which group they are in, 1,2,3 etc...

You can then use this label to decide where the token that pulled that queue from the list will go. In the model that I am attaching, I set a label called "Group" on each of the queues with a corresponding value of 1,2, or 3. Then in the decide activity I sent the tokens to the port 1, 2, or 3 based on the value of token.pulled.Group. This works because pulled is a pointer reference to the queue and by adding the ".Group" to the end of that pointer you will get the label value "Group" from that queue.

answer1_JW.fsm


answer1-jw.fsm (52.1 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.

Anutt K avatar image Anutt K commented ·

thank You. I get it.

0 Likes 0 ·