Page 254 - ExtendSim User Guide
P. 254

228
Resources and Shifts
Modeling resources
•
Air Freight model
An example of using the attributes of resource items to track information is shown in the fol- lowing model of an air freight company. An airplane receives orders for flights, but regulations require that airplanes must undergo maintenance after every 50 hours of flight time. Thus the model needs to track the airplane’s accumulated flight time (hours). Once an airplane accumu- lates 50 hours of flight time, it is sent for maintenance and the accumulated hours are reset to 0. The model looks like:
Air Freight model
The Create block generates orders which are batched with an airplane from a Resource Item block. While the airplane is batched with a flight order, it is not available for other flight orders; the order will wait in the Queue (set to type: sorted queue, and Sort by: first in, first out) until the plane becomes available.
The Resource Item block attaches an Hours attribute to the airplane. Settings in the Batch block’s Properties tab, shown at right, cause the airplane’s Hours attribute (the first attribute from the item arriving at the second connector) to be attached to the batched item.
☞ For more information about item attributes, see “Item attri- butes” on page 125.
Batch block properties
An Activity block (labelled Flight) uses a random distribution to determine how long each flight will take, then outputs the flight time to its Process Time (PT) connector. The Equation block gets the airplane’s flight time and adds it to the plane’s Hours attribute.
After the flight, the airplane is unbatched from the order; the airplane returns to the Resource Item block for reuse and the order exits the simulation. The Get block reads the value of the airplane’s Hours attribute and the Decision block determines if the accumulated flight time is greater than 50 hours. If it is, the airplane will be routed to the maintenance group for process- ing. After maintenance the Set block re-initializes the Hours attribute to zero. If accumulated time is not greater than 50, the airplane is returned to the Resource Item block where it will wait for another flight order.
When the simulation is run, a clone of the output from the Equation block’s dialog shows the value of the airplane’s Hours attribute. With animation on, it is easy to see that once the air- plane has an Hours value greater than 50, it routed to the maintenance group.
Discrete Event


































































































   252   253   254   255   256