We had a brief look at selecting items from a queue in section 8.5 where we reviewed the simple queue selection rules such as FIFO and LIFO. Often it is desirable to select an item from a queue based on an attribute of the entity. This would be the case for example if it was necessary to process jobs which had the earliest `due date' or delivery date. The `Ranking criteria feature of the `QUEUES' element and the `RANKINGS' element have been provided to give this flexibility.
Generally speaking if you wish to rank entities within a single queue it is best to use the ranking criteria within the queues element but if you wish to apply the same rule to a set of queues then use the `RANKINGS' element.
Example 8.10
A flexible manufacturing cell has been set up to produce printed circuit boards. The cell contains five `pick and place' machines to add components to the boards and each machine is preceded by a buffer queue. It has been decided to process the boards in each queue in order of the board size which is given for each entity by board_width and board_length attributes. The RANKINGS' element will ensure this with the the following parameters :
Operand |
Value |
Indentifier |
BQ1 - BQ5 |
Ranking Criteria |
HVF(board_width*board_height) |
Notice that an expression can be used as the rule expression. Of course this could also be a simple attribute value.
WORKSHEET 8 THE MAINFRAME COMPUTER
A mainframe computer has four processors that share 16 meagabytes of memory. For simplicity assume that all four processors each work on a single job until it is completed before beginning the next task. Assume also that there are no delays waiting for other equipment. jobs submitted for processing fall into the five classes shown
Class |
Arrival rate
(per hour) |
Service time
(secs) |
Average memory
(Mbytes) |
A |
500 |
0.01 - 1.0 |
0.2 - 1.5 |
B |
400 |
1.0 - 3.0 |
0.2 - 2.0 |
C |
300 |
3.0 - 6.0 |
0.5 - 3.0 |
D |
200 |
6 - 12 |
0.5 - 5.0 |
E |
100 |
100 |
1 - 10 |
The sevice distribution for classes A-D is uniform with a minimum and maximum as shown. Class E follows a negative exponential distribution with a minimum of 12 and a mean of 100. The distribtion of memory requirements is uniform with a minimum and maximim as shown for all classes. Memory allocation is in units of 0.1 Mbyte. Assume that a common queue controls access to all four processors and that this queue is arranged FIFO within class. Class A has the highest priority with class B the second and so on. No preemption is permitted; once a job starts on a processor it runs until completion.
Model this system by beginning with an empty system, allow it to run for 2 hours, clear the statistics and then observe the system for one hour. Determine the average time a job remains in the system by class. Determine also the maximum and average memory requirement.
Introduce NS, M, Station submodels, indexed resources