question

shanice.c avatar image
0 Likes"
shanice.c asked Felix Möhlmann commented

Label assignment/match value problem

In "match", token will keep going through following activity only when the value of token label is same as the text in yellow area. What filled in yellow field is the parameter that is being reference.

1635647833139.png


In "assign", it will assign the involved parameter value to the token's label value. Ex: when on entry a Queue, the token is assigned the flow item's label value. So my understand is the "involved parameter value" is also what filled in yellow area.

I have used above two operations before, But in "match value" description, it says it will match the "involved parameter value" to "the value in the Label Name or Value column". Until here, I'm confused if I misunderstand the description literally means, and found less example model that use match value operation in this forum. May I ask what's "involved parameter value" means? When is the occasion to use "match value"? Thank you!

1635647542626.png


FlexSim 21.2.0
match value
1635647542626.png (117.5 KiB)
1635647833139.png (18.4 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

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Felix Möhlmann commented

An item object is entering a queue. For a better understanding I call it now iObj and any other items, which can possibly entering, are called part.

iObj is a reference to itself.
token.item is a label with a value as reference to on existing item in the scope of your model.
If the references of iObj and token.item matches the token will leave the activity, otherwise it will stay until a part is entering the queue. The involved parameter is item as the name of the label of token.item. It is here just the name and you may have called it differently. So you would compare your name of your label with iObj.

If there is a match, then you need not to assign iObj to for example token.item, because it exists already.

· 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 Joerg Vogel commented ·

In cases when there is a difference to the meaning of “item” as a direct pointer name or label name and a reference to the object flowitem, it would have been nice to call the label at tokens in process flow tutorials and templates differently like “part”.

It is very confusing, if you assign item to token.item. The value you assign labels to is evaluating a source code snippet template in the background. This source code snippet has got a header with a declaration of some variables. Those are often current and item. It looks like they are functions or commands, but in fact they are just names for declared variables. And in edit fields you parse the declared variable name into the label you want assign a value for.
Most confusing is today, there had been a command in the past of FlexSim which was named item.

Sometimes it is not clever to overload names with different meanings, if someone want to learn a new scripting language.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Joerg Vogel commented ·
To add to the answer:

"match" compares the event data (Entering Item or Input Port) to the value of the given label on the token and only reacts if the values match.

"match value" on the other hand compares it directly to the value you entered in the "Label Name or Value" field. It's used if the value you want to match is static.

Let's take the example of a queue with multiple inputs. An activity should only react to an item entering through a specific input. In that case, you'd choose "match value" and write the rank of that input port in the "Input Port" field. So, if you enter "1", the activity would only react to items entering through the first port.

0 Likes 0 ·

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.