question

Arvind J avatar image
0 Likes"
Arvind J asked Logan Gold commented

Creating Logic on Triggers

Hi please advice which approach i should used.

3D model or Process Flow?

Given situation as below.
1. One batch will produce 18 box only. followed by subsequent batch.

1725948624865.png

2.The 18 boxes from ItemName 1 will go to Process A and vice versa.

Trial Run.fsm

FlexSim 21.1.5
triggersevent triggerquantities by case
1725948624865.png (11.4 KiB)
trial-run.fsm (29.4 KiB)
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Arvind J,

Thank you for contributing to our community! We couldn't identify a maintained license or subscription linked to your account.

You may need to update your profile information to identify yourself as a license owner or their associate. Check out our article for how to ensure you receive timely support. If you update your profile comment back to let us know - we'll adjust the priority of your post accordingly.

If your current license is expired, please contact your local distributor to renew.

0 Likes 0 ·
Logan Gold avatar image Logan Gold ♦♦ commented ·

Hi @Arvind J, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered

What works 'better' will depend on what information is available when, the detailed process and also personal preference.

I would always use Process Flow if the information what batch an item belongs to is not available beforehand and thus batches are formed during the run time of the model. This would be easiest by using list and managing the information is easier to follow if you have a persistent object that represents the batch (token), in my opinion.

If the batches are fixed then all that is required is choosing which processor will receive which batch. In the attached example I use a map label to assign output ports to the batches. In the Send to Port code of the first queue, the logic first checks if the batchID of the label is already present in the map. If so it increments a counter so it can know when the batch is finished and sends the item to the assigned port. If it's not yet part of the map, the batch is assigned a port (Round Robin) and added to the map.

This code would also work with varying batch sizes, though because the processors are assigned in a round robin fashion you would end up with unnnecessary idle times. Here a Process Flow might be better suited again, as the processors bould be acquired as a resource or pulled from a list.

With equal batch sizes and process times the example model works well enough I would say.

trial-run_1.fsm


trial-run-1.fsm (35.2 KiB)
5 |100000

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