question

hing lung C avatar image
0 Likes"
hing lung C asked Matthew Gillespie commented

How to decide the route using String label?

My model is separating the A workers , B workers and C workers dining in A Area, B Area and C Area.

I have Add the String Label in the source in process flow of arrivals. The labels are A, B C But I dont know what is the code in filling the blank of Send Token To (Conditional Decide) ? Can anyone teach me ?

FlexSim 19.0.0
using label and decide in process flow
canteen-operation.fsm (222.5 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.

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

Rather than using a decide to route the token between different activities, you can use the same set of activities and just acquire a different table based off the person's label. I changed your labelname to "Type" and then in the Table location resource I'm acquiring a table with this bit of code:

Group("Table" + current.Type)

That way people with an "A" Type label will acquire a table from Group("TableA"), "B" Type from Group("TableB"), etc.

See the attached model:

canteenoperation.fsm


canteenoperation.fsm (212.4 KiB)
· 3
5 |100000

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

hing lung C avatar image hing lung C commented ·

Thank you very much! The model you have modified is more user-friendly. Learned a lot. >.<

0 Likes 0 ·
hing lung C avatar image hing lung C commented ·

One more question is that how to change the speed of the person in people module

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ hing lung C commented ·

Open the FlowItem Bin and select the Person flowitem. Double click on the person to open its properties window and then change the Max Speed field.

0 Likes 0 ·
Braydn T avatar image
-1 Like"
Braydn T answered hing lung C commented
@hing lung C

The labels you are creating are on the 3d object and not the token. I would recommend creating the label on the token. Once you have that, the decide will be it token.labelName == "A", or you could do a bit of custom code and have a if else branch that returns 1, 2, or 3. I would also change your process flow to generate the people and maintain a reference to them in a label also.

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

It's fine to have the label on the person. This is how you make people models.

0 Likes 0 ·