msalemip Posted September 21, 2016 Share Posted September 21, 2016 How I can define a state variable only for the workers. For example if I want to check whether the worker had his lunch break or not. I am creating a dummy entity as lunch and it will call workers based on some schedule. I want to make sure the entity calls some worker which did not have lunch yet. How can I do that? The lunch entity will seize a worker from a list, however there should be a condition that makes sure the worker did not had lunch before. Note that I do not want to model this my setting the lunch hour in the off-shift period. The worker should be on shift and a lunch entity will seize the worker for one hour. There are 5 workers. 3 of them will have lunch from 12 to 1 and 2 of them from 1 to 2. I am creating 3 entities at 12 and 2 at 1. They should seize the workers and make sure they did not have not been seized for lunch before. Link to comment Share on other sites More sharing options...
dsturrock Posted September 22, 2016 Share Posted September 22, 2016 You will need to subclass the Worker object. One easy way to do this is right-click on the Worker object in the library. Select Subclass and you will see MyWorker appear in your project window. It's very easy to add a state. Its fairly easy to add extra processes. But I would be careful if you decide to insert or replace steps inside the existing processes because some of that logic is subtle and tricky. If you do make any such changes I recommend applying a color to every step changed to make it easier to maintain. Link to comment Share on other sites More sharing options...
Recommended Posts