question

shanice.c avatar image
0 Likes"
shanice.c asked shanice.c commented

Could I write token.label in list properties field expression?

I'm currently writing a process flow that is from product's point of view. What I'm doing in my flow is to create a task, then the flow will next find an AGV for each task. A product is "token.product".

Firstly, I'm a kind of confused how to connect an item in 3D model to a process flow token. I use On event trigger and use "match" to get the reference from the item in 3D model. But I'm not really sure the difference of using"assign" and "match". Is "assign" only update value whenever status changes from 3D model ? And using "match" could both update any status changes from 3D model and process flow?


Secondly is about getting value. Now,I'd like to use process flow randomly find one AGV for a product, may I do it like below? There are 6 AGVs in my model. I use duniform to get a number, each number correspond to a TaskExecuter. After this, I also want to write the AGV that each product gets( "token.product.transport") to a list field(which is "List for ALL Product" in model), but it seems "token.product.transport" cannot be read, result always get 0.

圖片1.png

p2.png

This is where the custom code mentioned above. Thank you!

p3.png


0902-product point of view.fsm

FlexSim 21.2.0
listflexsim 21.2.0
圖片1.png (47.9 KiB)
p2.png (58.8 KiB)
p3.png (270.6 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.

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

Every event has certain parameters associated with it. For example the entry trigger of the queue has the entering item and the port rank through which it entered as parameters.

If you choose "assign" then that value of the event will be written to the label you type into the "Label Name or Value" field.

If you choose "match", then the value will be compared to that of the token label and the token only finishes the activity if those two match - hence the name. This can be useful if you want to wait for certain item to finish processing for example.

More info can be found here:

https://docs.flexsim.com/en/21.1/Reference/ProcessFlowObjects/SharedProperties/SharedProperties.html#label


Yes, you can get a random AGV that way, but be aware that multiple items might be assigned to the same AGV in close succession that way.

If you only want to assign available AGVs, it would be better to define them as a process flow resource (easiest by grouping them and referencing that group in the resource) and have them be acquired that way. To get a random one you can use "ORDER BY RAND()" in the query of the "Acquire Resource" activity.

1630579943601.png


The list doesn't have a reference to the token that pushed the value onto the list, only to the value that was pushed (and the puller token, when a token attempts to pull something from the list).

You set the label on the item itself though, so you can just use another label field in the list.

1630579904851.png


1630579904851.png (10.3 KiB)
1630579943601.png (14.1 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.

shanice.c avatar image
0 Likes"
shanice.c answered shanice.c commented

May I first ask what should be used in yellow place to get the AGV name? Value is not correct, I have used .valueString and .name, still haven't get the value.


擷取.png


擷取.png (60.4 KiB)
· 4
5 |100000

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