Do you have a step in your system that can handle multiple items of work simultaneously, but only one of each type of work? For example, a spraying machine can paint 3 different parts at the same time, but each spray head is set to different color – you are not able to paint two things green concurrently.
An easy way to stop work items of the same type being worked on at the same time, is to use labels and Batch by Condition.
See this model for an example for how to set this up.
Firstly, we want Simul8 to assign a unique label – let’s call it ‘ID’ – to each work item at the first activity. This can be done by highlighting the activity, clicking Actions in the Properties tab and choosing Unique.
For this example, we create two work items with the same label to test the logic. The batching step splits each work item into two identical ones – both will have the same label value.
To stop both work items with the same label value moving into the processing step at the same time, we keep track of the work types at the Limiting Step.
To do this, select this Activity, then click Actions under the Properties tab. From here, choose ‘Change Anything’ to open the formula editor. Choose the spreadsheet and set the column to 1 and the row that corresponds with the work items unique label value – ID.
Click OK and then select the action for this cell, let’s set it to a fixed value of 1.
Before accepting any work, the Limiting Step can check this spreadsheet to see if a work item with a specific label value has already entered. It does this using Batch by Condition. This is accessed by clicking Routing In in the activities properties tab then choosing the Option tab. The activity will only pull a work item in if its corresponding row in ‘ss_check’ is blank.
Once the Processing step finishes working on a work item, we need to clear the spreadsheet to allow another work item with the same label value to progress through the system. This is done in the same way as before, but this time set the cell value to a fixed value of 0.
Remember, you will need to clear ss_Check after each run. You can either do this manually or use some simple On Reset logic:
Happy Simul8ing!
We hope you found this tip useful, and if you have any other applications/scenarios you’d like to see in our Simul8 Tips section, share them with us at support@simul8.com