question

Helen avatar image
0 Likes"
Helen asked Helen commented

Process Flow Tutorial 3

Hello,

I've been checking Process Flow Tutorial 3 and I have a couple of questions:

  • When defining the SubFlow what does the parameter Quantity refer to?

1712591282062.png

  • When setting the object, why do we use token.MyItem and not token.ProductType? As far as I understood, ProductType is the label of the token and we use MyItem so that we are able to save the time in which the item starts to be processed.


Kind regards,

Helen,

Exercise 8.fsm

FlexSim 23.2.3
processs flow
1712591282062.png (129.1 KiB)
exercise-8.fsm (35.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

·
Kavika F avatar image
0 Likes"
Kavika F answered Helen commented

Hey @Helen, in the documentation page for the "Run Sub Flow" activity, the description says it is

The number of child tokens that will be created in the sub flow.

For your second question, I assume you're talking about Step 2.8 where it says

1712595479465.png

The reason we use "token.MyItem" for the Object section is because the "Change Visual" code requires something of the Object class.

1712595619199.png

It changes the Object's innate color. The "token.ProductType" label only holds a number. We wouldn't know what to change.


1712595479465.png (30.0 KiB)
1712595619199.png (29.7 KiB)
· 6
5 |100000

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

Helen avatar image Helen commented ·

Thank you @Kavika F, but I guess I still don't get it fully.


Regarding the first question, why do we need 3 "Run Sub Flow Activities" and not set the quantity number to 3, if we are creating 3 child tokens in both cases? In the example here the production sequence is 3-2 but is there any other way to do it when sequences are longer (19-15 for instance).


As far as the the color, I'm confused probably because I've mainly been working with 3D objects. Do you mean that the color in based on an activity (wait for event) and the label assigned there is "MyItem"?

Thank you,

Helen


0 Likes 0 ·
Helen avatar image Helen Helen commented ·

I attach a model that using a counter you could produce a sequence in case if useful for someone.

Exercise 8_Contador.fsm

0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Helen commented ·
Hey @Helen, I understand the confusion about why we aren't using the quantity in this example. The reason it's setup like this is so we can run 3 tokens one at a time. We don't want to spawn them all at the same time because then when the Event gets triggered in the Sub Flow, it will release all tokens currently waiting at the event. There's another way to accomplish that with a quantity of 3 and to run the Sub Flow tokens one at a time, but I guess the author of the tutorial felt it simpler to just have the same 3 sub flows in a row.


As for the Object color, the "Change Visual" activity has code in it that takes in (1) a reference to an Object in the 3D space that you would like to change and (2) the color you want the Object to change to. For parameter (1), we supply token.MyItem because that is a label that stores a pointer reference to the 3D Object. The code in the screenshot I supplied above will then run to change the color of that 3D Object.

0 Likes 0 ·
Helen avatar image Helen Kavika F ♦ commented ·
Thanks for the clarification @Kavika F. In the example that I uploaded I found a way to do it, but I did not find the way to do it with quantity three because as you appoint, tokens are released. Is there a place where I can find how to do it with the quantity?

Thanks!

Helen

0 Likes 0 ·
Show more comments

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.