Blocking Multi-Batch Processing

Blocking Multi-Batch Processing

selin_steiger
Contributor Contributor
1,186 Views
11 Replies
Message 1 of 12

Blocking Multi-Batch Processing

selin_steiger
Contributor
Contributor

Dear Flexsim Team,

 

I am currently working on a simulation of a hard soldering oven which can take batches of different sizes (small batches are large pieces and larg batches are with lots of small pieces) 

 

Oven.png

 

The parts get created using a basic process flow with inter-arrival sources and create part blocks. the batching is currenty happening in the Queues. In order for the max batch size of 250units to enter the processor i have to set the internal limit to 250. the problem im having with this is that it is allowing mix batches of the smaller batch types to enter the processor (the extreme case would be 250x Batchsize 1). would it be possible to create a kind of blocker maybe in process flow that would block items from entering the processor while it is working?

 

Update: I figured out how to block the input of the processor using triggers (shown below) but it seems to only allow only one item through instead of one batch of items from one of the queues and I am not 100% sure why that is yet.

 

Oven Update.png

 

 
@moehlmann_fe @wproctorPG49C @kavika_faleumu @joerg_vogel_HsH @mike_mayer @PabloCASP would be very grateful for your help 🙂

0 Likes
Accepted solutions (2)
1,187 Views
11 Replies
Replies (11)
Message 2 of 12

FelixMoehlmann
Mentor
Mentor

Without seeing what you put into the trigger options I can't say why it is not working. The input should be closed when the processor content reaches the batch size of the current item type. So that information needs to be available as a label on the item. (Condition: current.subnodes.length == item.BatchSize). The input is opened when the last item exits (current.subnodes.length == 1). This method has the potential downside that the ports have an inherent priority ranking. The processor will receive items through the first port that has items available.

 

Another option is to set the Send to Port option to "Do Not Release Item" and manage the release of items in Process Flow.

Message 3 of 12

selin_steiger
Contributor
Contributor

Thank you for your advice. I would need to edit a bunch of the data in order to be able to share it publicly but ive found a fix that works in almost all cases and only breaks when the queues fill up at exacly the same time. I used  OnEntry: Send message with a 0.01s delay and then closed the ports with the OnMessage Trigger. The ports get opened with a simple on exit trigger 🙂

0 Likes
Message 4 of 12

FelixMoehlmann
Mentor
Mentor

I think that solution will also not work if more than one batch is ready when the processor opens its input. If its not filled by the first batch, items from the next will also be able to enter.

If you don't want to use Process Flow, I would still recommend my other approach of writing the batch size to the items, so the processor knows when to close the input.

 

0 Likes
Message 5 of 12

selin_steiger
Contributor
Contributor

@FelixMoehlmann Thank you for the Input, im not 100% sure what im doing wrond but i tried setting it up with the conditions you gave above but its now accepting partial batched. Im guessing I missunderstood something. I simplified the setup for just this step in the process  it would be amazing if you could have a quick look. you mentioned using process flows earlier. Im not against it i just have very little experience with using it at this point as all of my previous models were based on Object flow. 

Oven Set-up.png

 the "Model_To_Share" is the way i solved it originally and the adjusted version was me trying to implement your conditions for opening and closing the ports.

0 Likes
Message 6 of 12

FelixMoehlmann
Mentor
Mentor
Accepted solution

It's important have a delay between the exit trigger and opening the input, which is why I send a message in the exit trigger and only open the input when that message is received. Otherwise the next batch starts to enter while the last item of the previous one has to left yet, causing one item of the batch to not make it to the processor. A 0s delay is enough to let the last item exit before the input is opened.

I added a Statistics Collector to the model to confirm that the batch sizes are correct.

Message 7 of 12

selin_steiger
Contributor
Contributor

Oh I understand now, it all works as intended and the priority ranking is actually a nice side effect that models how things get done on our production floor nicely. Thank you!

0 Likes
Message 8 of 12

selin_steiger
Contributor
Contributor

@FelixMoehlmann  I did the update to version 2026 yesterday and it seems to have broken my logic a bit. I tried fixing it myself and it seems to work as intended in the beginning but rapidly breaks down when multiple batches are waiting in the queue at the same time.  Would be fantastic if you could give it a look. The logic is contained in the red processor labled "Löten" which is supposed to symbolise a big oven that can take large batches of products.

0 Likes
Message 9 of 12

FelixMoehlmann
Mentor
Mentor

The entry trigger of the Löten processor contains text in the condition field that shouldn't be there ("Condition: "). 

The exit trigger should only send a message if the processor is about to be empty ("current.subnodes.length == 1" as condition).

The items created at the left most queue do not have a "Type" label which prompts an error message when they exit machines later down the line where the Type is used to determine the output port.

 

0 Likes
Message 10 of 12

selin_steiger
Contributor
Contributor

Oh i seem to have sent a previous save, yes i was a bit embaressed when i saw the Condition: inside the condition. but the problem still persists even with the corrected entry and exit requirements. 

 

Multiple batches in Oven.png

 thats a batch of 24 getting mixed with a batch of 250. One thing ive noticed is that when the system runs as intended, the arrows at the entrance of Löten Innenteil remain green, only the red bar appears but in this case the bar is red and the arrows. (might be because the processor is at max cap)

Update: I have the system running with downtimes set to a weekly repeat. the oven can run independant of those downtimes and s therefore excluded from that list. while the other processes are down it seems to be allowing batches in smalled than the "BatchSize" lable. 

Multiple batches in Oven2.png

right here, for example, the processor allowed 24 items in from the BatchSize: 250 group and i cannot explain why...

Update 2: I believe I have found the issue, the queues seem to be releasing partial batches so when a partial Batch of the size 250 goes in (lets say 25 items with the lable BatchSize=250) it will allow other queues to make up the difference with their items (worst case 225 items from the queue with batchsize 1). @FelixMoehlmann is there any way of forcing the queues to only release full batches (I'd assumed that that's what the batch size setting was for but it does not seem to be working reliably). @kavika_faleumu 

0 Likes
Message 11 of 12

selin_steiger
Contributor
Contributor

I've been working on a ProcessFlow work around for the multi batching problem and it seems to work as intended... the only thing i cant wrap my head around is why 5 tokens keep getting stuck on the move object step.

Multiple batches in Oven_ Processflow.png

 I tried adding a breathe step before in the hopes that it was just ticking by to quickly and the next step was interrupting the moving of the tokens to the sink but that doesnt seem to be the case

0 Likes
Message 12 of 12

FelixMoehlmann
Mentor
Mentor
Accepted solution

The model is (still) only missing the condition in the exit trigger of the Löten processor. If a message is send for each item, the first message will open the input and allow the next batch to enter. If the full batch enters before all message have been received the input will be closed by the entry trigger and then opened again by a message. This then allows more items to enter until the processor capacity is reached. If only the last exiting item triggers a message, the input is only opened once and the batches can not mix.

Screenshot 2026-03-12 151811.png

I am happy to see that you tried to solve the issue using Process Flow. In the Move Object activities you are refering to items of a specific rank inside the queues. The activity where the tokens get stuck is supposed to move the twelfth item. If there are fewer than twelve items remaining this prompts an error and the token does not continue.

Items should be always be stored in labels on the tokens. Trying to move the correct item by specifying a path is bound to lead to problems. The item label can be initially created in the Event-Triggered Source. In the Batch activity the individual labels are then merged into a single array label. The Move Object activity supports using an array for the objects that should be moved (other activities, especially task activities generally do not!).

 

0 Likes