Using sequencing and selection rules
Resource Request Queues
Loads of items compete for the use of resources. Each resource has its own request queue to hold outstanding requests from loads. During operation processing, if the Scheduler cannot allocate a member of a required resource group to a load, it enters a request in the request queue of each resource group member. When a resource in that group is free, the Scheduler allocates it to the waiting load and removes that load’s requests from the other member resources.
If the load requires multiple resources from the group, the Scheduler does not allocate any resources to the load until the required number of resources from that group is available.
If the load requires resources from multiple resource groups, the Schedule does not allocate any resources to the load until the required number of resources from each group is available.
Sequencing the Queue
If multiple requests are in a resource’s request queue, the Scheduler sequences the requests based on the sequencing rule you specify for the resource.
By default, a particular resource’s sequencing rule is not defined and the Scheduler uses the "global" sequencing rule, which applies to all resources. The default global sequencing rule is First In First Out, and therefore places the first request to arrive at the resource higher in the queue.
For example, using the default global sequencing rule and assuming load XYZ arrives first, BCD second, and EFG last, the three loads would be sequenced in a request queue as follows:
- Load XYZ
- Load BCD
- Load EFG
Sequencing rules defined for individual resources override the global rule.
Selecting Loads from the Queue
When a resource becomes available, the Scheduler uses the selection rule to determine which requests to examine next from the request queue. By default, no selection rule is defined. That is, the first request in the request queue is selected when the resource becomes available.
In most situations, you can use the default sequencing and selection rules. When tailoring your production model further, consider keeping the configuration simple by leaving one rule at the default value and defining your particular production situation using the other rule. For example, use the default FIFO sequencing rule and define selection rules as needed.
Sequencing and Selection Rules Example
In this example, assume these conditions:
- Item BK-110 has a routing with one operation, Oper110.
- Operation Oper110 requires a resource from resource group ST1.
- Item CD-210 has a routing with one operation, Oper210.
- Operation Oper210 requires a resource from resource group ST1.
- Item EF-310 has a routing with one operation, Oper310.
- Operation Oper310 requires a resource from ST1.
- ST1 contains one resource, Crew1. The resource is on-shift for the time illustrated in the example.
- Crew1’s sequencing rule is "Smallest Load Size." Requests for this resource that have the smallest quantity will be moved in the queue ahead of requests with larger quantities. The selection rule is not defined.
- Each operation has a run time of 6 minutes.
- The Scheduler Rule on each operation is Per Item.
- Job110-000 for BK-110 is released on 3/01/2002 at 9:00 a.m. for a quantity of 3.
- Job210-000 for CD-210 is released at 9:06 a.m. for a quantity of 10.
- Job310-000 for EF-310 is released at 9:08 a.m. for a quantity of 5.
- The schedule starts on 3/01/2002 at 8:00 a.m.
The events for this example would be represented in the Trace report as shown below. Note that operation Oper210’s request for resource Crew1 will appear in the request queue before Oper310’s request.
Event | Description |
---|---|
SCHEDULE TIME ADVANCE TO 03/01/2002 9:00:00 | The Scheduler moves to the time the first events occur (the schedule itself may have been set to start earlier). |
03/01/2002 9:00:00 START OF ORDER ARRIVAL EVENT FOR ORDER Job110-000 RELEASING LOADS FOR ORDER Job110-000 CREATING LOAD 1, SIZE 3 OPERATION Oper110 SELECTED AS FIRST |
Job110-000 is released and the Scheduler places the job quantity into a load. The first job operation in the routing is identified. |
03/01/2002 9:00:00 START OF OPERATION EVENT PROCESSING OPERATION Oper110, LOAD 1 OF ORDER Job110-000 SCHEDULING END OF MOVE FOR OPERATION AT 03/01/2002 9:00:00 |
|
03/01/2002 9:00:00 START OF OPERATION EVENT PROCESSING OPERATION Oper110, LOAD 1 OF ORDER Job110-000 REQUESTING RESOURCE GROUP ST1 REQUESTING RESOURCE Crew1 FROM GROUP ST1 ALLOCATION NOT COMPLETE |
The Scheduler applies the resource allocation rule and enters a request for Oper110’s load into Crew1’s request queue. |
03/01/2002 9:00:00 START OF RESOURCE FREE CHECK EVENT FOR RESOURCE Crew1 PROCESSING OPERATION Oper110, LOAD 1 OF ORDER Job110-000 ALLOCATING 1 UNITS FROM RESOURCE GROUP ST1 CANCELING REQUEST FOR RESOURCE GROUP ST1 CANCELING REQUEST FOR RESOURCE Crew1 FROM GROUP ST1 ALLOCATING RESOURCE Crew1 FROM GROUP ST1 ALLOCATION COMPLETE SETUP NOT NECESSARY OR OF ZERO DURATION SCHEDULING END OF SERVICE FOR OPERATION AT 03/01/2002 9:18:00 |
The Crew1 resource checks its request queue for any pending requests and
finds the request from Oper110’s load. The Scheduler allocates the Crew1 resource from the ST1 resource group and calculates the time when the operation will be complete. |
SCHEDULE TIME ADVANCE TO 03/01/2002 9:06:00 | The Scheduler moves to the time when the next events occur. |
03/01/2002 9:06:00 START OF ORDER ARRIVAL EVENT FOR ORDER Job210-000 RELEASING LOADS FOR ORDER Job210-000 CREATING LOAD 1, SIZE 10 OPERATION Oper210 SELECTED AS FIRST |
Job210-000 is released and the Scheduler places the job quantity into a load. The first job operation in the routing is identified. |
03/01/2002 9:06:00 START OF OPERATION EVENT PROCESSING OPERATION Oper210, LOAD 1 OF ORDER Job210-000 SCHEDULING END OF MOVE FOR OPERATION AT 03/01/2002 9:06:00 |
|
03/01/2002 9:06:00 START OF OPERATION EVENT PROCESSING OPERATION Oper210, LOAD 1 OF ORDER Job210-000 REQUESTING RESOURCE GROUP ST1 REQUESTING RESOURCE Crew1 FROM GROUP ST1 ALLOCATION NOT COMPLETE |
The Scheduler applies the resource allocation rule and enters a request for Oper210’s load into Crew1’s request queue. |
03/01/2002 9:06:00 START OF RESOURCE FREE CHECK EVENT FOR RESOURCE Crew1 RESOURCE NO LONGER FREE |
The Crew1 resource is still busy with Oper110’s load, so cannot be allocated to Oper210 yet. |
SCHEDULE TIME ADVANCE TO 03/01/2002 9:08:00 | The Scheduler moves to the time when the next events occur. |
03/01/2002 9:08:00 START OF ORDER ARRIVAL EVENT FOR ORDER Job310-000 RELEASING LOADS FOR ORDER Job310-000 CREATING LOAD 1, SIZE 10 OPERATION Oper310 SELECTED AS FIRST |
Job310-000 is released and the Scheduler places the job quantity into a load. The first job operation in the routing is identified. |
03/01/2002 9:08:00 START OF OPERATION EVENT PROCESSING OPERATION Oper310, LOAD 1 OF ORDER Job310-000 SCHEDULING END OF MOVE FOR OPERATION AT 03/01/2002 9:08:00 |
|
03/01/2002 9:08:00 START OF OPERATION EVENT PROCESSING OPERATION Oper310, LOAD 1 OF ORDER Job310-000 REQUESTING RESOURCE GROUP ST1 REQUESTING RESOURCE Crew1 FROM GROUP ST1 ALLOCATION NOT COMPLETE |
The Scheduler applies the resource allocation rule and enters a request
for Oper310’s load into Crew1’s request queue. The resource’s sequencing rule is "Smallest Load Size," and Oper310 has a smaller quantity that Oper210. Therefore, although this request arrived later than Oper210, the request for Oper310 is placed ahead of Oper210 in the queue. NOTE: If the default FIFO sequencing rule had been defined, Oper210 would have remained first in the queue. |
03/01/2002 9:08:00 START OF RESOURCE FREE CHECK EVENT FOR RESOURCE Crew1 RESOURCE NO LONGER FREE |
The Crew1 resource is still busy with Oper110, so cannot be allocated to Oper210 or Oper310 yet. |
SCHEDULE TIME ADVANCE TO 03/01/2002 9:18:00 | The Scheduler moves to the time when the next events occur. |
03/01/2002 9:18:00 START OF OPERATION EVENT PROCESSING OPERATION Oper110, LOAD 1 OF ORDER Job110-000 FREEING 1 UNITS OF RESOURCE GROUP ST1 FREEING RESOURCE Crew1 FROM GROUP ST1 RESOURCE Crew1 IS NOW IDLE SCHEDULING END OF COOL FOR OPERATION AT 03/01/2002 9:18:00 |
Oper110 completes and frees the Crew1 resource. The Crew1 resource is now idle and available for other operations to allocate it. |
03/01/2002 9:18:00 START OF RESOURCE FREE CHECK EVENT FOR RESOURCE Crew1 PROCESSING OPERATION Oper310, LOAD 1 OF ORDER Job310-000 ALLOCATING 1 UNITS FROM RESOURCE GROUP ST1 CANCELING REQUEST FOR RESOURCE GROUP ST1 CANCELING REQUEST FOR RESOURCE Crew1 FROM GROUP ST1 ALLOCATING RESOURCE Crew1 FROM GROUP ST1 ALLOCATION COMPLETE SETUP NOT NECESSARY OR OF ZERO DURATION SCHEDULING END OF SERVICE FOR OPERATION AT 03/01/2002 9:48:00 |
When Oper110 frees resource Crew1, a Resource Free Check event is
triggered. The Scheduler checks Crew1’s request queue for any pending requests. It finds the request from the loads for Oper210 and Oper310. Crew1’s selection rule is the default "no selection rule," so the Scheduler selects the first request listed at the top of the queue. Oper310 is listed first in the queue, so the Scheduler allocates the resource to Oper310’s load. Oper310’s request is removed from the resource’s request queue. The Scheduler calculates the time when the operation will be complete. |
03/01/2002 9:18:00 START OF OPERATION EVENT PROCESSING OPERATION Oper110, LOAD 1 OF ORDER Job110-000 END OF PROCESS FOUND SELECTING NEXT OPERATION END OF PROCESS FOR LOAD 1 OF ORDER Job110-000 0 LOADS OUTSTANDING ORDER Job110-000 COMPLETE |
The Scheduler finds no next operation specified for Oper110, so it completes Job110-000. |
SCHEDULE TIME ADVANCE TO 03/01/2002 9:48:00 | The Scheduler moves to the time when the next events occur. |
03/01/2002 9:48:00 START OF OPERATION EVENT PROCESSING OPERATION Oper310, LOAD 1 OF ORDER Job310-000 FREEING 1 UNITS OF RESOURCE GROUP ST1 FREEING RESOURCE Crew1 FROM GROUP ST1 RESOURCE Crew1 IS NOW IDLE SCHEDULING END OF COOL FOR OPERATION AT 03/01/2002 9:48:00 |
Oper310 completes and frees the Crew1 resource. The Crew1 resource is now idle and available for other loads to allocate it. |
03/01/2002 9:48:00 START OF RESOURCE FREE CHECK EVENT FOR RESOURCE Crew1 PROCESSING OPERATION Oper210, LOAD 1 OF ORDER Job210-000 ALLOCATING 1 UNITS FROM RESOURCE GROUP ST1 CANCELING REQUEST FOR RESOURCE GROUP ST1 CANCELING REQUEST FOR RESOURCE Crew1 FROM GROUP ST1 ALLOCATING RESOURCE Crew1 FROM GROUP ST1 ALLOCATION COMPLETE SETUP NOT NECESSARY OR OF ZERO DURATION SCHEDULING END OF SERVICE FOR OPERATION AT 03/01/2002 10:48:00 |
When Oper310 frees resource Crew1, a Resource Free Check event is
triggered. The Scheduler checks Crew1’s request queue for any pending requests. It finds the request from Oper210’s load and allocates the resource. Oper210’s request is removed from the resource’s request queue. The Scheduler calculates the time when the operation will be complete. |
03/01/2002 9:48:00 START OF OPERATION EVENT PROCESSING OPERATION Oper310, LOAD 1 OF ORDER Job310-000 END OF PROCESS FOUND SELECTING NEXT OPERATION END OF PROCESS FOR LOAD 1 OF ORDER Job310-000 0 LOADS OUTSTANDING ORDER Job310-000 COMPLETE |
The Scheduler finds no next operation specified for Oper310, so it completes Job310-000. |
SCHEDULE TIME ADVANCE TO 03/01/2002 10:48:00 | The Scheduler moves to the time when the next events occur. |
03/01/2002 10:48:00 START OF OPERATION EVENT PROCESSING OPERATION Oper210, LOAD 1 OF ORDER Job210-000 FREEING 1 UNITS OF RESOURCE GROUP ST1 FREEING RESOURCE Crew1 FROM GROUP ST1 RESOURCE Crew1 IS NOW IDLE SCHEDULING END OF COOL FOR OPERATION AT 03/01/2002 10:48:00 |
Oper210 completes and frees the Crew1 resource. The Crew1 resource is now idle and available for other loads to allocate it. |
03/01/2002 10:48:00 START OF RESOURCE FREE CHECK EVENT FOR RESOURCE Crew1 REQUEST QUEUE EMPTY |
There are no more requests in Crew1’s request queue. |
03/01/2002 10:48:00 START OF OPERATION EVENT PROCESSING OPERATION Oper210, LOAD 1 OF ORDER Job210-000 END OF PROCESS FOUND SELECTING NEXT OPERATION END OF PROCESS FOR LOAD 1 OF ORDER Job210-000 0 LOADS OUTSTANDING ORDER Job210-000 COMPLETE |
The Scheduler finds no next operation specified for Oper210, so it completes Job210-000. |
SCHEDULE HALTED BECAUSE THERE WERE NO MORE ORDERS TO PROCESS SCHEDULE END AT 03/01/2002 10:48:00 |
The Schedule is now complete. |
Sequencing Rules
Specify the sequencing rule for an individual resource in the RESRC.SEQRL field or specify global sequencing rules in the ALTSCHED.GLBSEQRL field. Global rules apply to any resource that does not have a sequencing rule.
Code | Rule | Description |
---|---|---|
0 | Global | Default to the Global Sequencing Rule |
1 | FIFO | Loads that arrive first. |
2 | LIFO | Loads that arrive last. |
3 | High Priority | Loads with the higher priority. Load priority is determined by the SQL field LSTATUS.PRIORITY. |
4 | Low Priority | Loads with the lower priority. |
5 | Earliest Due Date | Orders with the earliest due date. |
6 | Earliest Release Date | Orders with the earliest start date. |
7 | Short Current Operation | Loads with the shortest time for the current operation. |
8 | Long Current Operation | Loads with the longest time for the current operation. |
9 | Long Any Operation | Loads with the longest time for any subsequent operation. |
10 | Least Number of Operations | Loads with the least number of remaining operations. |
11 | Least Process Time | Loads with the least estimated remaining processing time. |
12 | Least Static Slack | Loads with the least remaining time to due date. |
13 | Least Average Static Slack Per Remaining Operations | Loads with the least average time to due date per remaining operations (static slack / remaining no. of operations). |
14 | Least Average Static Slack Per Remaining Processing Time | Loads with the least average time to due date per remaining processing time (static slack / remaining process time). |
15 | Least Dynamic Slack | Loads with the least remaining time to due date minus the remaining processing time. |
16 | Least Average Dynamic Slack Per Remaining Operations | Dynamic slack / number of remaining operations. |
17 | Least Average Dynamic Slack Per Remaining Processing Time | Dynamic slack / remaining processing time. |
18 | Adjusted Dynamic Slack | Adjust dynamic slack to more heavily weight the loads in danger of becoming late (if dynamic slack >= 0, then divide by remaining processing time; else multiply by remaining processing time). |
19 | Small Load | Smallest load size. |
20 | Large Load | Largest load size. |
21 | High value of a specified attribute | |
22 | Low value of a specified attribute | |
23 | Due date minus the remaining processing time | |
24-39 | User Defined |
Selection Rules
Specify the selection rule for an individual resource in the RESRC.SELRL field.
Code |
Rule |
Description |
---|---|---|
0 |
Sequencing Rule |
No selection rule; use the Sequence Rule. This is the default selection rule. |
1 |
Dynamic Sequencing Rule |
Use the Sequence Rule dynamically. The request queue is resorted based on the sequencing rule every time the resource removes a request from the queue. This rule works only with the sequencing rules that are based on dynamic and static slack. |
2 |
Minimum Setup Time |
Select the request for the load that minimizes the setup time for the next operation in the routing. |
3 |
Reserve for Order |
Consider requests for loads from the same job the machine is currently set up for, if any such loads exist. If none exist, the Sequence Rule is applied dynamically and the entire list is considered. |
4 |
First Load |
Consider only the first load ranked by the Sequence Rule. If the first load cannot allocate the resource, do not try the next load in the queue. |
5 |
Dynamic First Load |
Consider only the first load by applying the Sequence Rule dynamically. If the first load cannot allocate the resource, do not try the next load in the queue. This rule works only with the sequencing rules that are based on dynamic and static slack. |
6 |
Minimum Setup First Load |
Consider only the first load by applying minimum setup. If the first load cannot allocate the resource, do not try the next load in the queue. |
7 |
First n Loads |
Consider only the first n loads, where n is specified in Selection Value. |
8 |
Dynamic First n Loads |
Consider only the first n loads by applying the Sequence Rule dynamically, where n is specified in Selection Value. |
9 |
Minimum Setup First n Loads |
Consider only the first n loads by applying minimum setup, where n is specified in Selection Value. |
10 |
Threshold |
Apply the Sequence Rule dynamically, and only consider requests with values less than or equal to Selection Value. Note: If the Sequence Rule for the request queue is a “high to low” value type rule (for example, Highest Attribute Value, High Priority, etc.), consider only requests with values greater than Selection Value. |
11 |
Priority/Slack/ Minimum Setup |
Select the request with the highest load priority. If tied, select the request with the smallest critical dynamic slack. Dynamic slack is critical if it is less than the threshold specified for the resource in Selection Value. If tied, select the request with minimum downstream setup. |
12 |
Change-over Volume Loads/Minimum Setup |
After allocating n loads under the same setup, select the non-zero setup time request. If there are no non-zero setup time requests, zero setup time requests will be selected until the next non-zero setup time load arrives with minimum downstream setup, where n is specified in Selection Value. |
13 |
Change-over Volume Loads/Longest Waiting |
After allocating n loads under the same setup, select the non-zero setup time request with the longest waiting time, where n is specified in Selection Value. |
14 |
Change-over Volume Items/Minimum Setup |
After processing n items under the same setup, select the non-zero setup time request with minimum downstream setup, where n is specified in Selection Value. If there are no non-zero setup time requests, zero setup time requests will be selected until the next non-zero setup time load arrives. |
15 |
Change-over Volume Items/Longest Waiting |
After processing n items under the same setup, select the non-zero setup time request with the longest waiting time, where n is specified in Selection Value. |
16 |
Change-over Processing Time/Minimum Setup |
After spending n hours in processing loads under the same setup, where n is specified in Selection Value, select the non-zero setup time request with minimum downstream setup time. Note: Processing time does not include the setup time incurred for the first load. |
17 |
Change-over Processing Time/Longest Waiting |
After spending n hours in processing loads under the same setup, where n is specified in Selection Value, select the non-zero setup time request that has been waiting the longest. Note: Processing time does not include the setup time incurred for the first load. |
18 |
Change-over Elapsed Time/Minimum Setup |
After n hours have elapsed under the same setup, where n is specified in Selection Value, select the non-zero setup time request with minimum downstream setup time. Note: Processing time does not include the setup time incurred for the first load. |
19 |
Change-over Elapsed Time/Longest Waiting |
After n hours have elapsed under the same setup, where n is specified in Selection Value, select the non-zero setup time request that has been waiting the longest. Note: Processing time does not include the setup time incurred for the first load. |
20 |
Interrupted/ Dynamic Sequencing |
Use the sequencing rule dynamically, but put requests for interrupted loads at the front of the request queue. Furthermore, if an interrupted load was being processed by the “selecting” resource, its request is placed at the front of the queue. |
21 |
Tiered Selection |
Select based on ranking rules for each of three levels, or tiers. Jobs is sequenced based on the first tier rule, then ties at the first tier are broken by the second tier rule, then ties at the second tier are broken by the third tier rule, and finally ties at the third tier are broken by the sequencing rule. |
22-39 |
User Defined |
Improving Speed of Selection Processing
The selection rules First Load (code 4), First n Loads (code 7), Minimum Setup First Load (code 6), Minimum Setup First n Loads (code 9), or Threshold (code 10) will consider only a portion of the possible load requests in the request queue. You can use these rules to speed up selection processing on resource (also add-to-material and remove-from-material as applicable) request queues containing a large number of load requests. However, be aware that potential side effects exist when using these rules.
For example, situations can occur where the resource becomes free, sorts the request queue using the selection rule, fails to make an allocation, goes idle, and remains idle until one of the following occurs:
- A load processes an operation where it needs the resource.
- The resource goes off-shift and then back on-shift.
The resource remains idle for the rest of the Scheduler run because another load never needs the resource and the resource is not on a shift. This leads to a related issue. Each time you use the selection rules First Load and First n Loads, load requests at the top of the request queue may “block” load requests further down in the queue. For example, this will occur if:
- First Load is the selection rule for resource RES1.
- The first load in the RES1 request queue requires resources RES1 and RES2.
- RES1 is free, but RES2 is not.
Resource RES1 will remain idle until the system can either allocate RES2 to the waiting load, or another load processes an operation where it needs RES1, or RES1 goes off shift and then back on shift.
Using Values and Attributes
You can use values (RESRC.SELVALUE) with selection rules, and you can use attributes (RESRC.SEQATRID) with sequencing rules. Realize that the Scheduler will use the default value (0.0) or the default attribute (no attribute) if you specify a rule requiring a value or an attribute. For rules using values, the Scheduler accepts 0.0, but for rules using attributes, you must specify a valid load attribute name.