I am currently working on modeling a manufacturing system where the set-up types are job sequence dependent. This means that the required set-up time depends on the type of order (entity) previously processed on the server. Specifically, I would like to know how I can store the entity type that was previously processed, compare this to the entity arriving at the server and assign a required set up time to the system. What I would like to achieve is the following: type 1 arrives and sees that a type 2 has been previously processed refers to a matrix or code block and sees that a 3 hour set up time is required to switch from type 2 to 1. Alternatively, when a type 1 arrives and sees that a type 1 has been processed before a set up of only 30 minutes is required. Does someone have an idea how this problem can be addressed in SimEvents or Simulink?