question

Cindy avatar image
0 Likes"
Cindy asked Cindy commented

Match labels in a combiner

Hi, I am currently working on a model wher i hace two sources and it creates objects with two different number labels that goes from 1 to 8, in the process i need to combine these two objects in a combiner but i need that the number of both labels be the same, for example, i need to combine "DONANTE = 2 " = "ST=2", how can i do that. CAMBIOS PROCESO.fsm

FlexSim 23.2.1
combinermodelmatch label
5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Cindy commented

You can activate Pull on Input Pane. A combiner need at least 2 input port connections. They can be from the same queue ahead of the combiner.

You need a logic that allows every item type to enter through input port number 1. And any item Type entering the combiner by input port number greater than 1 must be equal to the item already present from input port number 1

current.first.labels["Type"].value == item.Type

This is a logical test statement to compare first already received item Type label and any other item being able to enter next.

An tested item will be pulled if the return value is true by a value 1 or greater than 1. A tested item is rejected if the return value is 0 or seen as logical false.

You can write the logical test statement directly in a return line for any port greater than 1 condition.

Pull Requirement

default header

Object current = ownerobject(c);
Object item = param(1);
int port =  param(2);

added source code

if (port == 1) return 1; // first item pull everything
if (port > 1) return item.Type == current.first.labels["Type"].value; // further items

You need to add any picklist option and click on the source code editor icon looking like a parchment roll. Edit the code to distinguish between first any following item entering the combiner.

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
You'll need to replace 'Type' in Joerg's example with your own labels - ST and DONANTE
1 Like 1 ·
Joerg Vogel avatar image Joerg Vogel commented ·
0 Likes 0 ·
Cindy avatar image Cindy commented ·

Thank you!

0 Likes 0 ·
Kavika F avatar image
0 Likes"
Kavika F answered

Hey @Cindy, you could try using lists to do this.

First you can create two ItemLists that just keep track of a label.

1701714326463.png

Then you can separate the queues so they keep items and push them to a list.

1701714400553.png

1701714418535.png

Then you can have a Process Flow that pulls any "Donante" from the list and then pull a matching ST from the STList. Once you have a reference to them, you can move them forward to their respective queues.

1701714467147.png


1701714400553.png (148.7 KiB)
1701714418535.png (14.9 KiB)
1701714467147.png (35.5 KiB)
1701714326463.png (26.9 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.

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.