The CPM Procedure |
This example extends the production scenario in the previous example to two separate orders of the greeting cards. Suppose also that the machine used in Example 2.29 is to be replaced by a faster machine that is scheduled to come on-line on August 24, 2004. This scheduling problem is modeled using alternate resources Mach1 and Mach2 for a primary resource Machine. Each of the alternate resources produces the auxiliary resource numboxes; the rate of production depends on which machine is used.
The Activity data set TwoOrders, displayed in Output 2.30.1, now contains additional activities corresponding to the second order of greeting cards. The resource requirement corresponding to the machine needed for the production is now represented in terms of the generic machine resource, Machine. The resource data set, TwoMachines, displayed in Output 2.30.2, specifies Mach1 and Mach2 as alternate resources for Machine and the resource numboxes as an auxiliary resource produced at the rate of 5,000 by Mach1 and 10,000 by Mach2. Observations 5 and 6 indicate that the first machine is available from August 15 and is then replaced by the second machine on August 24, 2004.
Output 2.30.1: Activity Data Set
|
The following statements invoke the CPM procedure to schedule the production of the two orders of boxed greeting cards and display the schedule (in Figure 2.30.3) using PROC GANTT. Note that PROC GANTT is invoked with the PATTERN= option indicating that the schedules should be drawn using the pattern statements corresponding to the variable _pattern in the activity data set. In addition, the CTEXTCOLS= option indicates that the color of the text should match the color of the schedule bars.
proc cpm data=TwoOrders resin=TwoMachines out=TwoSched rsched=TwoRsched resout=TwoRout date='15aug04'd; act activity; succ succ; duration duration; resource Machine Mach1 Mach2 numboxes trucks / period=per obstype=obstype resid=resid milestoneresource; id _pattern; run; proc sort data=TwoSched; 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: Fixed Activity Durations'; proc gantt data=TwoSched(drop=e_: l:); chart / act=activity succ=succ duration=duration font=swiss nolegend nojobnum pcompress pattern=_pattern ctextcols=id scale=4; id activity ; run; title2 'Resource Usage Data set: Fixed Activity Durations'; proc print data=TwoRout; if _time_; run;Output 2.30.3: Gantt Chart of Schedule
The Gantt chart shows that the trucks corresponding to the second order of greeting cards depart at a faster rate (every day) than the ones corresponding to the first order (every 2 days). The faster delivery is enabled by the use of the faster machine for the second order. Note also that the activity 'Second Order' continues for a total of 6 days, even though the order is filled within the first 3 days. This is due to the fact that the activity is defined to have a fixed duration. The resource usage data set, displayed in Output 2.30.4 shows that 10,000 boxes are produced each day for 6 days, causing an inventory build up of 30,000 boxes at the end of the production schedule.
Output 2.30.4: Resource Usage Data Set
|
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.