How to copy a label from one item to another using the process flow

How to copy a label from one item to another using the process flow

kauan_santos
Not applicable
46 Views
5 Replies
Message 1 of 6

How to copy a label from one item to another using the process flow

kauan_santos
Not applicable

[ FlexSim 23.1.0 ]

How to change the label of an item using the process flow. I have a simulation that contains 2 sources that create 3 different models, and they work by orders. When a model from my source 1 goes to processor 31, I would like to move the items from my source 4 from processor 51 to processor 48. I can do this easily. What I'm having trouble with is when my product from source 4 leaves processor 51, I want it to change color to match the color of my models from source 1. How can I do this?

versao42.fsm

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

joerg_vogel_HsH
Mentor
Mentor
@Kauan santos, If you have a mutual reference then you can assign color reference of item to the other by obj.color property.
0 Likes
Message 3 of 6

kauan_santos
Not applicable

@Joerg Vogel I understand, but how can I make the trigger change color to the product in my source4 only when my product that comes out of my source1 is in processor31.

Can you give me an example of this?


0 Likes
Message 4 of 6

moehlmann_fe
Explorer
Explorer
Accepted solution

You can use a "Wait for Event" activity to wait until the item has finished processing on Processor51 before you change the color.

I adjusted your logic to be a bit more robust. It no checks if there is an item on Processor52 and if not, it waits until one is available.

versao42_1.fsm

0 Likes
Message 5 of 6

kauan_santos
Not applicable

Hello ! @Felix Möhlmann

Thank you, One last question, how do I reference items with port by case with this logic of yours? In this case I created a queue that will separate the items into 3 queues for each type, I am trying to use port by case but without success, how do I manage to use it?

1716290225169.png1716290278315.png

I'm doing this because when the items intersect they need to be of the same type, but I can't separate the items here.

versao42-1.fsm

0 Likes
Message 6 of 6

moehlmann_fe
Explorer
Explorer

The "Type" label does not exist on these items. And on the items from the other source "Type" is equal to the RGB color values of the item, which is probably not intented (?). In the "Set Label and Color" option, the value should be the intended label value. The color will be determined as if you used "Color.byNumber()".

capture1.png

You can then copy the type label to the other items in the Process Flow, so they can be sorted into the queues.

capture2.png

Other issues that I noticed:

- "token" is not a valid variable name outside of Process Flow activities. So the exit trigger of processor 51 produces an error.

- Station3 (the one after processor33) is set to open the output of its first centerobject, but it doesn't have such a connection.

0 Likes