Sofia G21 avatar image
Sofia G21 asked Sofia G21 commented

Deciding source of combiner container based on a label

Hello FlexSim answers, below is what I'm trying to do, but can't seem to find a way.

- A combiner can pack two types of product. One has label A and one has label B. These labels are also reflected on a Global Macro.

- Product A is packed onto a pallet (container = yes). Product B does not need to be packed onto a pallet (container = no).

- I am trying to make it so that when my combiner reads the Global Macro indicating what product I am running, it can make the decision to either include or exclude the container when combining.

- I need to collect the number of pallets that are consumed by the combiner when the product being run is Product A, and show as 0 when it's Product B.

- At this time, during a simulation run I would only run one type of product. Thus, why i am using Global Macros. So I can reference them at Simulation Start.

I had a series of ideas, but I have not managed to make this work...

- Connect 2 sources and set them as Port 1 and Port 2... The second source would be an invisible item, to at least make it work?

- closeinput and openinput to the combiner based on the Global Macro. (Can't close a specific input port; it's all or nothing)

- closeoutput of each source based on the Global Macro. (The combiner will not pack when I do this)

- Have the container quantity change to 0/1 based on the Global Macro. (Can't change the quantity of container)

- Maybe have the Combine Mode change based on the Global Macro? (I don't even know where to begin to make this work).

Are there better ways of approaching this? The model I have attached has both container sources, but the solution does not need to have both. It's just what I've tried.

I appreciate any help possible!


Combiner Help Model.fsm

FlexSim 23.0.2
combinersinput portoutput portcontainers
· 1
5 |100000

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

Julie Weller avatar image Julie Weller commented ·

Hi @Sofia G21, 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
Felix Möhlmann answered Sofia G21 commented

I'd use the Parameters table to set the mode rather than a Global Macro. If you want to use the Experimenter you don't have to make any extra changes. But if you prefer the macro then you can of course also use that.

Without building a Process Flow and combining the items in a Queue that way, I'd build this by having intermediate queues between the sources and the combiner and add more than one connection between the first and the combiner. That way it can provide both the 'container' as well as the other items for the case without pallets.

The rest is setting the Send to Port options accordingly, so that all items are send to the correct place depending on the mode. And adjusting the combiners component list in its reset trigger.


· 7
5 |100000

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

Sofia G21 avatar image Sofia G21 commented ·
Hey Felix, I am not able to open your file. My Flexsim version is 23.0. Could you please upload with an older version?
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Sofia G21 commented ·
0 Likes 0 ·
Sofia G21 avatar image Sofia G21 Felix Möhlmann commented ·

Thanks Felix! Sorry it took me so long to respond; I've been trying to incorporate your code and logic into my model, but have not been fully successful. I was able to make the Pallet YES vs. Pallet NO work. But since some of the logic transferred from items, I am not able to make some of my old logic work.

Before I was able to pack the items on the pallet in a 'square' fashion, but I was doing it at the Robot. Your logic only works when I Update the Boxes position with the Combiner. However, I cannot replicate the logic from my Robot at the Combiner, so both Pallet YES and Pallet NO pack in a square fashion (See 'What My Model Looks Like')

Attached the model with the logic I am referring to. It has my current model, my attempt at your solution, and your solution, so it is easy to see the progression.

My robot from the left is capable of packing in a square fashion. I cannot make this work at the combiner. Do you have an idea on how I can transfer that to your new logic?

Thanks again for all of the help!


0 Likes 0 ·
test.fsm (56.8 KiB)
Show more comments

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.