Set color by case

Set color by case

daniele_s
Not applicable
2,286 Views
8 Replies
Message 1 of 9

Set color by case

daniele_s
Not applicable

[ FlexSim 17.0.12 ]

Hello,

How can I set the color of an part?

I have a processor and I would change the color of the part (on exit of the processor) according to a percentage. Red for the 95% of components, Orange for the remaining 5%. So I want assign a label to that object according to the color because, at the end, I have to perform a separation.

11003-color.png

Thanks for the support

Daniele

simulation-model-with-batches-color.fsm

0 Likes
Accepted solutions (1)
2,287 Views
8 Replies
Replies (8)
Message 2 of 9

kari_payton
Not applicable
Accepted solution

@Daniele S change the value on your "Set Color by Case" trigger to item.Type.

11005-set-color-by-case.png

0 Likes
Message 3 of 9

daniele_s
Not applicable

thank you 🙂

But the question is a bit different.

In this way I have changed only the color, and no kind of label had been assigned to the object.

For example: Suppose that now I have two processors; one for the polishing and a second one for the washing operation. Each process has a fixed percentage of wastes (which is known). Each waste exits from the processor with a different color with respect a ''good'' component. Red is the color I choose for wastes from the first machine (Cerclage) and Acqua for the second one (Lessiviel).

11006-color2.png

Whenever a component enters inside the second machine, its color is changed. So, at the end, on the final batch, I will never find a red component. This happens because, if it was red, its color is changed in yellow or Acqua.

11007-color3.png

How can I solve this problem?

simulation-model-with-batches-4-12m03.fsm

0 Likes
Message 4 of 9

joerg_vogel_HsH
Mentor
Mentor

You can assign instead of a single label value an array. Each time you change the value of a color, you add a value to the array in front of the array. At the end of the process you evaluate the array.

0 Likes
Message 5 of 9

kari_payton
Not applicable

So you want to keep the red ones from changing? I don't understand the issue.

0 Likes
Message 6 of 9

daniele_s
Not applicable

I want to keep the red color.

Briefly: I want to see the damaged component during the entire process.

If the component is damaged at the first station, it is colored with red (because I choose the red color for the first station). If another process damages the same component, i will change its color (according to the color I of that workstation). If the component is not damaged, it does not change color

0 Likes
Message 7 of 9

daniele_s
Not applicable

Could you give an example (with Flexsim)

0 Likes
Message 8 of 9

joerg_vogel_HsH
Mentor
Mentor

Here is a sample. Please look into the triggers of the objects.

0 Likes
Message 9 of 9

kari_payton
Not applicable

Oh ok. I think I understand now. The way I would do it is add a small flow to your process flow. See the attachment in box "final batch color".

When the item exits the processor, if it's red the token will go to "Do Nothing" and if it's not red it will go to "Custom Code". The "Custom Code" has the same logic... if Type =1 then color yellow, if Type = 2 color aqua. This way the red items are not changed.

Also I added a "Color" label to the item on the processor exit trigger. 11008-simulation-model-with-batches-4-12m03-solved.fsm

0 Likes