Page 212 - ExtendSim User Guide
P. 212

186 Processing
Setting the processing time
Cumulative Time model
A simple time-sharing model has one activity that processes each job for a short period of time, then sends the job back to the queue so it can be processed again, until the total required pro- cessing time for that job has elapsed.
Cumulative Time model
In the model, items (jobs) are generated randomly and the Set block attaches a RemainingTime attribute to each job generated. The Random Number block determines the initial value of that attribute, 1, 2 or 3 milliseconds, which represents the total processing time required for each job. The Activity block processes the job for a fixed time (1 millisecond). An Equation(I) block then subtracts the amount of time spent processing (Process Time, or PT) from the RemainingTime attribute.
Once the remaining processing time has been
calculated, the decision to route the item back
to the Queue or to the Exit is made in the
Select Item Out block. Jobs with a Remaining-
Time of 0 are routed through the top output
and exit the simulation; items that have 1 or
more millisecond of processing time left are routed back to the Queue for further processing. Notice that the table in the Select Item Out block (shown above) only indicates explicitly what happens if the remaining time is 0 or 1. However, the block’s dialog is set to Invalid Select value: chooses bottom output. With these settings, an item with a RemainingTime value of 0 will exit the top output. If the value is 1 the item will exit the bottom output. And any value other than 0 or 1 will also exit from the bottom output.
☞ The time units for this model are integers representing milliseconds, because the Select blocks expect integer values for comparison and will truncate non-integer values. (For example, the value 0.003 would be truncated to a zero.) When using non-integer values for the processing time, convert the attribute values to integers before they go to the Select Item Out block. You can do this with a Lookup Table block (Value library).
Adding setup time
Every process is not 100% efficient. For instance, it is common in manufacturing for a machine to be reconfigured when the type of item it is processing changes. This reconfigura- tion usually takes additional time beyond the normal processing time. In the example below, the processing time (and the part type) is determined by the attribute values, similar to what was shown in “Custom processing time” on page 184. However, this model requires an addi- tional setup time whenever the type of item changes.
☞ Setup time can add significant delay to the processing of items. For an example showing how to minimize setup time, see “Minimizing setup” on page 148.
Table in Select Item Out block
Discrete Event

   210   211   212   213   214