Process Flow Tutorial 3

Process Flow Tutorial 3

myriam_srdg
Not applicable
58 Views
7 Replies
Message 1 of 8

Process Flow Tutorial 3

myriam_srdg
Not applicable

[ FlexSim 23.2.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

0 Likes
Accepted solutions (1)
59 Views
7 Replies
Replies (7)
Message 2 of 8

kavika_faleumu
Autodesk
Autodesk
Accepted solution

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.

0 Likes
Message 3 of 8

myriam_srdg
Not applicable

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
Message 4 of 8

myriam_srdg
Not applicable

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
Message 5 of 8

kavika_faleumu
Autodesk
Autodesk
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
Message 6 of 8

myriam_srdg
Not applicable
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
Message 7 of 8

jason_lightfootVL7B4
Autodesk
Autodesk

It would look like this:

1713193014452.png

Note that you can also specify the type on the runsubflow by adding the label there instead of using the AssignLabels activity. Then your main loop is just this:

1713193110799.png

Message 8 of 8

myriam_srdg
Not applicable

I didn't click "Run Tokens Once at a Time". Thank you very much.

0 Likes