question

Gerardo M4 avatar image
0 Likes"
Gerardo M4 asked Matthew Gillespie answered

How can i make my model to use subflow?

david.fsm

I need to reduce my model through subflow but I don´t know what I can use, I have a student license and I still have to put some activities.

Thank you

FlexSim 19.1.1
subflow
david.fsm (77.9 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

I recommend, you do the tutorials of Process Flow:

3- Sub Process Flow

4- Process Flow Instances

if you have done them already, then do them again, until you understand how to transform a process flow sequence to be used in instances.

You get into trouble with your current "travel, move object, travel, move object" - activity sequence, because you transfer an array of pulled items to those activities. Now only the first of the five elements in the array gets evaluated. It would be better if you set an element of the array to be transferred in the activities directly by adressing it with the square brackets [ ]. Or you adjust the array that the first element changes after each finished sequence before you start over again. You find suitable methods in the FlexScript class reference for arrays. (for example pop(), shift()).
You can replace the loop by a sub process flow.

And secondly you start your load unload sequence by an event that fires for every item, but you pull 5 items for the repeating sequence. The squence must get starting tokens only for each fifth item.

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered

In this model I made an instanced flow and attached it to both of the planes in the model. I then connected the plane to the queue it pulls from with a center port connection. That way each instance of the flow can just listen to the On Entry of its center object. I also added two process flow variables to the flow for the group of operators and the group of processors that process should use.

subflowandinstances.fsm


5 |100000

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