question

iceagesimulator avatar image
0 Likes"
iceagesimulator asked Matthew Gillespie commented

Process Time Using SubFlow, referencing value from table

I have a model where boxes are assigned a label called Type, then combined onto a pallet. The first processor is using a SubFlow for the processing time, however the times are hard coded into the labels and do not change. I want the second processor to vary the times, based on what label value of Type is on the box, which is on the pallet. There are three tasks for each processor in the SubFlows that make up the total processor time. For the second SubFlow, the task times need to be set by looking up a value in a Global Table "Timing", where the column is the Type of the box, and the row is the task number.

How can I go about using the SubFlow to set the total processing time of the processor, by looking up task times from a global table based on the label value of the box on the pallet of said processor?

QuestionProcessingTimeSubFlow.fsm


FlexSim 23.1.1
subflowprocessing time
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

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Matthew Gillespie commented

The keyword item isn't defined in the sub flow, you need to get a reference to the box yourself. In this case, current in the subflow refers to the processor that executes the subflow. So you can get a reference to the box inside the pallet inside the processor using

  1. current.first.first

Here's a version of your model where I get the Type label value off the box and put it on a Type label on the token in the subflow. Then I can just use token.Type from then on in the subflow.

1685726799674.png

questionprocessingtimesubflow_1.fsm


· 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.