The CPM Procedure |
A more realistic model for the truck scheduling example can be built if the activities 'First Order' and 'Second Order' are defined to be resource driven. In other words, specify the total amount of work (6 days of work) that is needed from the activity at a pre-specified rate (of 5,000 boxes per day), and allow the choice of machine to dictate the duration of the activity. This modified model is illustrated by the activity data set, TwoOrdersRD, and resource data set, TwoMachinesRD, printed in Output 2.31.1 and Output 2.31.1, respectively. The two orders for greeting cards have a work specification of 6 days if the generic machine Machine (which produces 5,000 boxes a day) is used. The resource data set has a new observation with value 'resrcdur' for the variable obstype. This observation specifies that the resources Machine, Mach1 and Mach2 drive the durations of activities that require them. The third observation in this data set specifies that the second machine is twice as fast as the first one, indicated by the fact that the alternate rate is 0.5. This implies that using the second machine will reduce the activity's duration by 50 percent.
Output 2.31.1: Activity Data Set
|
The following statements invoke PROC CPM with the additional specification of the WORK= option. Once again, the CPM procedure allocates one of the two machines for the production, depending on the availability. The Gantt chart is displayed in Figure 2.31.3 and the resource usage data set is printed in Output 2.31.4. As before, the trucks for the first order depart every second day requiring a total of 6 days, while the second order is completed in 3 days. Also, using a resource-driven duration model allows the second activity to be completed in 3 days instead of 6 days, as in the previous example. The resource usage data set indicates that production is stopped as soon as the two orders are filled, avoiding excess inventory.
proc cpm data=TwoOrdersRD resin=TwoMachinesRD out=TwoSchedRD rsched=TwoRschedRD resout=TwoRoutRD date='15aug04'd; act activity; succ succ; duration duration; resource Machine Mach1 Mach2 numboxes trucks / period=per obstype=obstype resid=resid work=work milestoneresource; id _pattern; run; proc sort data=TwoSchedRD; by s_start; run; title h=1.5 f=swissb 'Greeting Card Production - Machines 1 and 2'; title2 h=1.2 f=swissb 'Truck Schedule: Resource Driven Durations'; proc gantt data=TwoSchedRD(drop=e_: l:); chart / act=activity succ=succ duration=duration font=swiss nolegend nojobnum compress pattern=_pattern ctextcols=id scale=4; id activity ; run; title2 'Resource Usage Data set: Resource Driven Durations'; proc print data=TwoRoutRD; id _time_; run;Output 2.31.3: Gantt Chart of Schedule
|
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.