There are four types of products in the following scenario, and the machine that can be used by each product is written in the table "ItemType_Processor". In the table, 1 means this product can be produced by this machine, and 0 means this product cannot be produced by this machine. Example: Product 2 can be produced by Processors 2, 4, and 5.
My question is how to randomly (e.g. uniform) assign which machine an item is produced with according to the "ItemType_Processor" table constraint?
My current idea is to set item lable "Processor" in OnEntry of Queue2, and select "Port By Case" in "Send to Port". But I am not sure how to write an efficient program/code that restricts assignment of machines according to the "ItemType_Processor" table.
File link:
https://drive.google.com/drive/folders/1cS5SfJ1H5ccRbyP6GaLKCjoY-KodD5fr?usp=sharing