question

drckmtthw avatar image
0 Likes"
drckmtthw asked Felix Möhlmann commented

Batch Process - How to stop incoming batch if batch cant go through all process?

Batch Process_High-Test.fsm

1) I would need the WIP_Process1 to immediately have 24 boxes when simulation run. How do I do this?

2) How do I stop Process 1 from processing a new batch (24 boxes) if this incoming batch cannot be processed by all 3 processes? I would need to find out the idle time of Process 1 (and 2).

Background info:

- 6.51 hours of run time

- Batch must complete all 3 processes

- Process 1 cannot run a new batch unless, it is guaranteed that this batch can be completed within the shift


For the process flow, I am unsure on how to start, if anyone is able to help out, your help will be greatly appreciated. thank you

FlexSim 22.0.16
batch processing
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

Here's my approach:

- Based on the process times, calculate how long ahead of the end of shift Processor1 must not start a new batch because it wouldn't finish.

- In Process Flow react to the On Process Finish event of Processor1. Batch the tokens together so you get a single when a complete batch has finished on Processor1.

- Check if there is still enough time in the shift to start another batch. If not, close the input of Processor1 and wait for the next shift to start. Then open the input again.

1687329689455.png

You can use the DateTime class and its associated methods (hour, minute, second) to get the current time of day in the model. This can then be checked against he cutoff time for a new batch or used to calculate how long to wait until the start of the next shift.


1687329689455.png (32.5 KiB)
· 3
5 |100000

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

drckmtthw avatar image drckmtthw commented ·
hi, can this only be done via process flow? what about on the 3D model simulation?
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ drckmtthw commented ·
Hello @drckmtthw,

Simply put, No. You will have a much easier time adding custom logic that is complex like this by using process flow. Please take the time to become familiar and comfortable with it. Here is a link to process flow tutorials.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann drckmtthw commented ·

In theory, anything can be done by coding it. However, as Jeanette mentions, it might end up much more complex than if you built it in Process Flow.

In this example, you would use the triggers on the processor. When the process finishes, a label gets incremented. When it reaches the batch size, the label is reset and a check is made whether the input should be closed. If the input is closed, a delayed message is send that will be received at the start of the next shift. In the On Message trigger the input would be opened again.

As you can see, this logic does the same as the Process Flow. In fact you can think of using Process Flow as 'visually aided programming'. As such I mostly recommend using it rather than coding everything manually, since the visual nature makes following the logic and debugging it easier.

0 Likes 0 ·