question

Tom J avatar image
0 Likes"
Tom J asked Tom J commented

Schedule Processor

Hi there. I did post my questions in a reply to a similar thread of mine but figured best to ask it on its own topic.

I have a processor that I want to be able to schedule. I want to take items from 6 different queues, in different batch size, and process at different times depending on the item, in different order as the week goes on.

It would be nice to have it in a simple table and it pulls the data from that. Here is a sample of what I need it to do. The order changes and so does the amount from the ports at different times. There will be about 100 lines to go through the whole week.

Port 1 - 4 items - 20 second each
Port 2 - 4 items - 20 second each
Port 3 - 3 items - 25 second each
Port 4 - 3 items - 25 second each
Port 1 - 5 items - 20 second each
Port 2 - 5 items - 20 second each
Port 5 - 4 items - 15 second each
Port 6 - 4 items - 15 second each

I had someone come up with something similar which worked good for 4 ports on repeat. But now i have a new line i have to put in and this is where it doesn't work any more. I have attached my model and you can see how its currently set up.final-newest-real-times.fsm. It takes items 1 at a time, and even if the total is not at the queue yet. It will arrive Just in Time.

Thanks for any help :)

FlexSim 17.1.3
schedule processor
5 |100000

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

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered Tom J commented
@Tom J

The reason it works for four ports now is because processor G4 has four input ports. If you added more input ports to G4, it should work just fine. It actually looks like this could be my code. If you add more item types, then you would also have to add more rows to the BatchNProc global table, a row for each item type.

So it looks like you have six item types? If so, you need to add another row to the BatchNProc table. And if you have six input ports, you need to add those input ports to G4.

If you have any problems or questions, please don't hesitate to ask.

Thanks.

· 13
5 |100000

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

Tom J avatar image Tom J commented ·

Hey Jeff, yes this is your code, you were able to help me when I first started working on my line. I was hoping I would be able to expand on it myself but at this point is unable to. I did that and it does work at first. But I don't have items in Port 5 & 6 until Day 2 of the simulation, so the processor is waiting for parts there and the line shuts down.

What I'm more getting at is that it wont always be in that order, Port 1, 2, 3, 4, 5, 6. It might be port 1 ,2,3,4,1,2,3,4,1,2,5,6. Also be different quantities. Some times port 3 takes 4 parts, next time it takes 6.

It would be nice to have a big table the processor takes from that might be 100 rows, 3 columns with the itemtype, qaunity, and process time that way i can set the order i want it to take from.

I just started doing the tutorials on Process Flow last week to learn it and see if maybe that is the better way of doing this. Not sure yet.

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren Tom J commented ·

@Tom J

I've modified your model to add the fifth and sixth queues. Here is basically what the model will do now. It is pretty much a round-robin, if available. It will take the first item that arrives in any queue. After the batch is complete for those items, it will look to the next input port. If there is nothing there it will continue looking through the input ports. If it finds nothing in any of them, then it will be set to take whatever flowitem, from whatever queue, that arrives first (first available).

So what I'm thinking is you change how flowitems get to the pre-processing queues of the processor so that they already have a label on them (or at least the first one in the batch) that has the batch quantity. Then rather than having a global table that the processor somehow reads, you have a source that produces your flowitems with the batch quantity on the label of the flowitems. Then you just modify the source table to generate the flowitems in whatever order.

Am I missing something or do you think something like that would work? Take a look at the model and see what you think. All the changes were made to the processor G4. If you have any questions or problems, please let us know.

Thanks.

final-newest-real-times-jn1.fsm

0 Likes 0 ·
Tom J avatar image Tom J commented ·

Honestly, yes and no. Well, running the model, at 7:30PM on monday, it pulls from Port 3, but there is only 1 item there and there wont be any more until half way through tuesday, So the Processor is just sitting there. I am looking for it to do a specific way so I try out different scenarios to ensure our plant floor is running the most efficient.

Here is a picture that shows how i think the BatchNProc table could look like to get what i am looking for, just don't know how to code it to work.

This would tell the Processor which port to take from, how many, and the process time. I would be able to add more rows for the full weeks run.

Do you think your code can be easier modified to do this? I don't want to get you to do work for me and it not work. I hate wasting other peoples times.

Thank you for all the help though. It is very much appreciated.

0 Likes 0 ·
Tom J avatar image Tom J Tom J commented ·

Just checking in to see if anyone has a solution, thanks - Tom

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren Tom J commented ·

@Tom J

Sorry, just noticed it. I will look at it.

0 Likes 0 ·
Show more comments
Tom J avatar image Tom J Tom J commented ·

No worries Jeff, thanks for replying though :).

It would follow it. Instead of "pushing" the product down the line and out the door, we want to "pull" what is needed for the order. We know our weekly and daily orders. If there is a time there is no product at the processor, then I will be adjusting the source before it to ensure there is the product. Or i can change it so it skips a port so it has time to build up. Really engineering it in reverse for what we are doing.

Everything would be the same before, might only have 3 in the queue and requires 4, but the 4th will be in the queue before it gets to it. The final chart will most likely be like 50 rows for a full week, but that will be for me to keep adding to it for the week.

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren Tom J commented ·
@Tom J

So what you are saying is that the model should work "as is"? Because there will never be a shortage in a queue for a complete batch for very long. Is that correct? Or did I miss something?

The way it works now is that the Processor finds a queue with a flowitem in it and uses that input port (queue) until that batch is completed. And uses the BatchNProc table to find out how many should be in a batch for that row (or itemtype). But that's not what you are really after, is it? You want that table to be any number of rows (orders)? If so, you would have to change the table somehow to add the queue to pull from (if that can be known ahead of time) and/or what itemtype the batch applies to.

I guess what I'm saying is that I'm not sure what the "end goal" here is. Can you straighten me out?

Thanks.

0 Likes 0 ·
Show more comments
Regan Blackett avatar image
0 Likes"
Regan Blackett answered Tom J edited

Here's a sample that I think does what you are asking for, but I did it in a way that may not be what you expected, so I'll explain my approach below. And in light of your ongoing clarification with Jeff, it may not be what your looking for, but just in case...

The Model layout is a simple interpretation of what you are describing; I have 6 Queues that are receiving things randomly from the source, a queue for the batch members waiting to be processed and a Processor, and finally a finished goods Queue for the completed batches.

I set up a table that has 3 Columns and as many rows as you have "pulls" that need to be made. Column one has a reference to the location you want to pull from, column two is the amount you want to pull,and column 3 is the time it takes to process each member in the batch.

Next I set up an item List in the toolbox tab on the library panel. I added a field to the List that makes the location of the item a quey-able field on the list:

Flowitems are being added to the List when they execute the "Send to Port" field on the Queues. this might seem counter intuitive since the queues don't have output ports,but that's ok; they will still evaluate the send to port logic even though there are no ports.

At this point I turn control over to a Process Flow. I create a Token at the very start of the model that will control which row from the Table we should look at for the "pull". The token gets a couple of labels assigned to it, one that tells us the row number of the table,and one that tells the location we should pull from. My token then goes to execute the pull, where the Request number on the activity indicates how many items to pull which is given by the table (the Require number should be set the same as the Require number in this instance). The Pull Query allows me to filter what I can pull from the List based on where they are located by saying look at where the items are and if it's the same as the location in the table, it can be pulled:

WHERE Location = puller.PullLoc

When the control Token can pull all the members of the batch, they are moved to the pre-processing Queue, and they are processed according to the Table. If there are no more rows int he pull table, the control token goes to a Sink activity.

pull-from-location-with-list-alternate.fsm


· 4
5 |100000

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

Jeff Nordgren avatar image Jeff Nordgren commented ·

@Regan Blackett

Am I running the right version of FlexSim (V17.1.4)? Because I'm getting an exception when running your model in this version. Here is the error:

time: 452.331224 exception: Error: Invalid triggering event, event rank 1, at wait for event activity "Wait for Last Batch member to Process" in "ProcessFlow"

And then I run it again and don't get an error... strange.

0 Likes 0 ·
Tom J avatar image Tom J commented ·

I ran the model. It is very close to what i am looking for. Only issue is that we dont always have the full batch size before it starts. So it yours, once it has the total batch size, it brings it to the "Batch Queue", but this wont work for me. If the processor took from the 6 queues instead of the "Batch Queue" i could see it working to what i need. I have some queues start with an amount in them from the start so that way they dont have to wait to build up at the start.

0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ Tom J commented ·

So rather than pulling the batch all at once you would like it to pull as parts are available? We can do that too:

pull-from-location-with-list-alternate.fsm

0 Likes 0 ·
Tom J avatar image Tom J Regan Blackett ♦ commented ·

At first glance, it seems to be doing what i am looking for. I have just started doing process flow tutorials last week so in the process of learning it. I will look over everything you did and bring it into my model and see how well it works all together, if i don't mess something up, lol. I know my model is more completcated as it has 3 difference sources feeding the 6 Queues so it will be a bit untill i get everything working with this approach. Thank you for an alternative way of doing this. I know we are close with the other way Jeff has also. Nice when the same can be done different ways.

0 Likes 0 ·

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.