Match labels in a combiner

Match labels in a combiner

est_cindyorj
Not applicable
1,461 Views
5 Replies
Message 1 of 6

Match labels in a combiner

est_cindyorj
Not applicable

[ FlexSim 23.2.1 ]

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

0 Likes
Accepted solutions (1)
1,462 Views
5 Replies
Replies (5)
Message 2 of 6

kavika_faleumu
Autodesk
Autodesk

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

0 Likes
Message 3 of 6

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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.

0 Likes
Message 4 of 6

jason_lightfoot_adsk
Autodesk
Autodesk
You'll need to replace 'Type' in Joerg's example with your own labels - ST and DONANTE
Message 5 of 6

joerg_vogel_HsH
Mentor
Mentor
0 Likes
Message 6 of 6

est_cindyorj
Not applicable

Thank you!

0 Likes