question

Antonio R8 avatar image
0 Likes"
Antonio R8 asked Antonio R8 answered

How to constrain a Processor to start and finish within the shift

I have 3 processors working 7h per day. However one of them can only start the process if it has enough time to finish its process within the same shift.

Is there any way to set up a constraint so if there is not enough time it will start on the following day?

Choose One
shift
· 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.

Aaron C avatar image Aaron C commented ·

I want to make sure I understand the "rules" of what you're looking for. Are you saying that if a job takes, for example, 8 hours, then it won't start THAT day, but it SHOULD start the very NEXT day?

0 Likes 0 ·
Aaron C avatar image Aaron C commented ·

One more question: can a job "skip" another job if there is time for that one, but not the one before it? Or should jobs always be worked in the order that they come?

0 Likes 0 ·
Aaron C avatar image
1 Like"
Aaron C answered Benjamin W2 commented

pretimingjobs.fsm
This should give you what you're looking for. I had to make a lot of edits to get it to happen. One of the biggest edits is that I assigned all the job's processing times up front on the jobs themselves. I also added three pseudo-physical queues allow the handling of logic for allowing or disallowing jobs based on remaining time.

Key objects to look at:

Additions to the Process Flow, Source OnExit trigger, Processor's process times, and the Decision Queue OnEntry trigger.

Hopefully this helps!


pretimingjobs.fsm (216.3 KiB)
· 11
5 |100000

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

Antonio R8 avatar image Antonio R8 commented ·

Aaron,

Thank you for doing that. That was quite clever.

Just to clarify your queries:

1. You are correct. The third processor is the only one that cannot leave a job half way done and complete it in the following shift. If the shift is 7h long and to process a job takes 3h and there are only 2 hours remaining in the shift, that processor should not start the process and wait until the following day to start it.

2. A job cannot skip another job. Jobs should be working in the order than they come.

So, let me see if I understand your model. A job gets to the 'Decision Queue' and establishes if there is enough time within the shift to complete the job. If not, it goes to the 'Temporary Holder' queue and if there is enough time goes to the Processor or to the 'Jobs for later today' queue? what is the Jobs for later today queue for?

Also, is it possible that the text displaying the time, shows only the time whithin the shift, instead of the daily 24h?

0 Likes 0 ·
Aaron C avatar image Aaron C Antonio R8 commented ·

You're assessment of what's happening is 100% correct! And yes, the "Jobs for Later Today" queue is for jobs that DO have enough time to be completed that same day, so they will sit in that queue until the Concreting Crane is free.
By "text displaying the time", are you referring to the "Run Time: " in the top toolbar?

0 Likes 0 ·
Antonio R8 avatar image Antonio R8 Aaron C commented ·

Thank you Aaron. Yes I am referring to the "Run Time". I just wanted to know if in Flexsim you can run the simulation showing only the hours of operation on each day instead of running the whole 24h every day.

0 Likes 0 ·
Show more comments
Antonio R8 avatar image Antonio R8 commented ·

@Aaron C Aaron, I've just noticed in the model that you attached that the last job is still being processed when the shift finishes and according to the process flow, it should not start if there is not enough time within the shift to finish it.

Why is it working for the rest of the jobs but not for the last one?

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 Antonio R8 commented ·

Hi @Antonio R8,

I believe this is happening because the Queue used to decide if there is enough time does not take breakdowns into account. It calculates if there is "Ideally" enough time, but once the flow item gets on the crane, it will break down. These breakdowns push the Concreting Crane finish time past the shift.

Do you need to program MTBF and MTTR in your model? If not, removal of these should solve the problem. If so, what would you like to happen to the Concreting Crane flow item if it gets pushed past the shift?

0 Likes 0 ·
Antonio R8 avatar image Antonio R8 Benjamin W2 commented ·

Benjamin,

That makes a lot of sense. Thank you for your answer.

I do need MTBF and MTTR in my model, it is quite important as I have to play around with it.

If the Concreting Crane flow item gets pushed past the shift, it'll have to start again with the same item from scratch, the following shift. Is that possible?

0 Likes 0 ·
Show more comments
Antonio R8 avatar image
0 Likes"
Antonio R8 answered

That's perfect. I can open it now. Thank you so much!!!!!

5 |100000

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

Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered Benjamin W2 commented

Hi @Antonio R8,

I apologize that this took so long, but I think I finally figured out how to get the behavior you are looking for. Since there were quite a few changes, I will only give you a high level overview. Let me know if you have any questions.

  1. I switched the logic for calculating if there was enough time to process flow instead of the "Enough time to concrete?" Queue. This way I could make sure to push the items to their final destination before evaluating the next item.
  2. I added a Queue called "ReadyToProcess" in front of the processor. This way, I could move items using code and the proper processor events would fire on the "Concreting Crane".
  3. I added a block of process flow that analyzed if there was enough time in the shift to process an item in the event of a breakdown. If there isn't enough time, the item gets moved to the "No" Queue for reprocessing.
  4. I added an "OnProcessFinish" trigger to the Concreting crane that would re-evaluate and check if there is enough time for the items in the "Yes" queue. If there isn't, then it moves them all to the "No" queue.

Here is the model. Let me know if you have any questions!

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

Antonio R8 avatar image Antonio R8 commented ·

Benjamin, I've tried to open your model with different versions of Flexsim but there is something wrong with it. Would you mind to upload it again?

0 Likes 0 ·
Benjamin W2 avatar image Benjamin W2 Antonio R8 commented ·

Hi @Antonio R8,

I think that I created that model in 19.1.2, which is what I thought your original model was created in. I will upload it again though. concretedecisiontree.fsm

0 Likes 0 ·