question

dougdurbin avatar image
0 Likes"
dougdurbin asked Jason Lightfoot commented

Help with Transporter Request from Queue

I'm building the attached model based off of Tutorial 3.1 - Use Sub Flows and Arrays in which the first station is working perfectly fine. I get to a point of needing to assign transporters based on which queue (outbox) has a flowitem waiting. The idea is that a flowitem would be finished processing and then wait in the queue, to which a transporter would pick up the number of flowitems in that queue and transport them to the inbox of the next station. I'm not quite sure what the best way is to approach this. I've thought about adding the flowitems to a list when it reaches an outbox, and the transporter would pull from that list but I'm stuck at the point of sinking that particular token. I have a split activity to solve this issue but I get stuck at this point. I'm trying to avoid the transporter going to each outbox in a round robin fashion if nothing is there and the transporter only going to the outbox that has flowitems in it.

Airplane Exercise Simulation (Push) - Flow.fsm

FlexSim 20.2.2
queuetransporterflexsim 20.2.2subflow
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

Jason Lightfoot avatar image
2 Likes"
Jason Lightfoot answered Jason Lightfoot commented

In the attached model I've created outbox jobs that are then picked up by the operators.

I've put the station in its container and the process for that in a "Station" process flow which now has four members or instances.

To allow the single station process to be generic I've used the standard connections to determine where items should go next. I've also put those connections through the container ports, so it you wanted to create a new station, you just copy one (suggest station 2 or 3), connect it and that's all you should need to do.

So the station logic just looks like this:

And this is the transport logic:

You'll notice the two pulls - the first is to detect a job but the second is to pull it from the list when done, which tells the station that transporters are no longer taking items so if there are more to take it should post another job.


airplane-exercise-simulation-push-flow_jl.fsm



· 5
5 |100000

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

dougdurbin avatar image dougdurbin commented ·

So the processing time is in the "Processing Items" process box, what would be the best way to make it unique to each processor? Is there a way to reference the processing time from the object itself in the 3D model so that whichever flow item uses that processor, it uses that processing time associated with it?

Also, if I wanted the transporter to pull between 1 and 5 items in this instance, would I change the Require Number in the "Pull Initial Items" activity? Or would I need to change the:

token.waitingplanes.length>=2 parameter in the conditional decide to be >=1?

The reason I ask is because when I start changing the processing times of each machine, I want the transporters to pick up the number of items in the outbox queue.

The model works exactly as intended but I just wanted to see what parameters I would change to accomplish the points listed above as I dive in the model's logic a bit more.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Well at the moment - the processing time is what is on the processor and the delay is whatever that says. If the two don't match or the processor has a stoppage then you could get odd behaviour.

You could enter this in the delay in the process flow to use the cycletime that is already on the processor:

current.getVariable("cycletime");

but if the processor has a stoppage or the cyceltime expression is stochastic then the processor then the time the token takes will be different from that of the processor.

It would be better in that case to let the processor do it's thing based on the cycletime it has and have the token detect the processFinish event before continuing. This is done by replacing the delay with a "Wait for Event" activity - and setting the parameters like this:

Alternatively you can use a label on the processor for the processing time and then set the cycletime variable of the processor to match that before it is used (before end of setup - setting before moving the item in is easiest) . This is a good approach if you want the processing time statistics of the processor to be correct. Then use setVariable instead of the getVariable above.

As you implement things like this, it becomes more apparent that the standard object might do what you want and process flow isn't needed for the item processing side of things. Choosing the correct mix is part of the skill here i think.

Yes - if you want to move 1 item then use >=1 and change the Pull Initial Items Required number to 1. If that's the case, could argue for an approach where you load all the items in the queue and you don't need to push them all to a list, but the list makes things visible and flexible if you want to add more complex conditions.





0 Likes 0 ·
1605816099836.png (19.7 KiB)
dougdurbin avatar image dougdurbin Jason Lightfoot ♦♦ commented ·

I was getting an error code with:

current.getVariable("cycletime");

saying the cycletime wasn't a variable. I used the Wait for Event approach and is working well. Thank you for your help Jason!

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ dougdurbin commented ·

Sorry for that - should have been current.stationProcessor.getVariable(“cycle time”)

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
You could also initiate the transport by creating a token when an entry is pushed to the Outbox list instead of having one initialize token which creates the next.
0 Likes 0 ·