question

Alejandro Cevallos avatar image
1 Like"
Alejandro Cevallos asked Alejandro Cevallos commented

How I can make all reprocessed products go directly to the client (sink) without being distributed to the production lines A and B?

In a production line there are three types of products (Item Type 1, 2, 3) of which a percentage of them are going to the production line A, the other to the line B and the rest to the client. A percentage of products of the line B are accumulated in a queue to return to the processor (Reprocessing). How I can make all reprocessed products go directly to the client (sink) without being distributed to the production lines A and B?

Here attached the base model

FlexSim 7.5.4
outputreworkreprocessing
model.fsm (17.7 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.

1 Answer

·
Sam Stubbs avatar image
3 Likes"
Sam Stubbs answered Alejandro Cevallos commented

I was able to accomplish this by adding a trigger on the Queue. In the Queue, in the On Entry trigger, I had it set a label on the item coming in called "processed" and set the value to 1. Then in the first processor, in Send to Port flow I entered this custom code: (To access the custom code, click on the little script icon next to the dropdown arrow.)

if (getlabel(item,"reprocessed")==1)  {
	return 3;
}

This tells the logic of your Send to Port function that if an item has the "reprocessed" label, to send it to port 3, (the Client)

I've reattached your model below.

model.fsm


model.fsm (17.9 KiB)
· 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.

Alejandro Cevallos avatar image Alejandro Cevallos commented ·

Thanks Sam. It worked very well.

0 Likes 0 ·

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.