Processing Times
First, assign the columns containing the distributions to be of the type FlexScript (right click column, assign data > assign FlexScript data). Then insert your desired distributions for each type and processor. Now you can change the processor's Process Time property to By Global Table Lookup and insert the reference to the table.
This works fine, but you really want a different random number stream for each processor, so each processor's time is independent of the others. To do this, I referenced Matthew Gillespie's answer here which shows how you can make sure the random number stream is being generated using the processor the item is in. I followed suggestion 1. Now, the Processors will reference the GlobalTable and determine their process time based on the item type all while using their own random number stream.
_____________________________________
Setup Times
I created a new table called SetupTimes that you can insert your desired distributions for (note: you can follow the example in row 1, column 2 for the random number stream since this table is only referencing ProcessorB). I then created some process flow that will tell the processor what value in the table to look at for its setup time.
The process flow works by creating a token when an item enters ProcessorB. Labels are created on the token that reference the processor and the "toType" which is the label of the item entering. The token then looks at the "Variable: Last Item Type" and records that in the label "fromType." The token then fires the custom code. The code records the value of the table SetupTimes based on the labels fromType and toType on the token. It then sets the "SetupTime" property of the processor using that setup time. Finally, the leaving token sets the Variable to the leaving Type so the next token can reference this for the "fromType" label.
_____________________________________
Priority
I created a new label on the items called Priority that is 1 for the pink items and 0 for the other items. I then changed the Pull Strategy of ProcessorB to pull the maximum Label Value where it looks at the label item.Priority. This means that the processor will always check the incoming item's priority label and pull the highest one first.
I know this is a lot of information, so I would suggest changing the values in the table to things like 1 or 0 to get a good feel for what is going on before you set your distributions which will make it harder to see what's happening. Let me know if you have any questions!
workplacewith-setup-time-em.fsm