The CPM Procedure

Example 2.30: Auxiliary Resources and Negative Requirements

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
Greeting Card Production - Machines 1 and 2
Activity Data Set TwoOrder

Obs Activity succ Duration Machine Mach1 Mach2 numboxes trucks _pattern
1 First Order   6 1 . . . . 1
2 Sched truck1 Delivery 1 0 . . . 10000 . 1
3 Sched truck2 Delivery 2 0 . . . 10000 . 1
4 Sched truck3 Delivery 3 0 . . . 10000 . 1
5 Delivery 1   2 . . . . 1 1
6 Delivery 2   2 . . . . 1 1
7 Delivery 3   2 . . . . 1 1
8 Second Order   6 1 . . . . 2
9 Sched truck4 Delivery 4 0 . . . 10000 . 2
10 Sched truck5 Delivery 5 0 . . . 10000 . 2
11 Sched truck6 Delivery 6 0 . . . 10000 . 2
12 Delivery 4   2 . . . . 1 2
13 Delivery 5   2 . . . . 1 2
14 Delivery 6   2 . . . . 1 2



Output 2.30.2: Resource Data Set
Greeting Card Production - Machines 1 and 2
Resource Data Set TwoMachines

Obs per obstype resid Machine Mach1 Mach2 numboxes trucks
1 . restype   1 1 1 2 1
2 . altrate Machine . 1 1 . .
3 . auxres Mach1 . . . -5000 .
4 . auxres Mach2 . . . -10000 .
5 15AUG04 reslevel   . 1 . . 3
6 24AUG04 reslevel   . 0 1 . .



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
cpm30g1.gif (5094 bytes)

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
Resource Usage Data set: Fixed Activity Durations

_TIME_ EMachine LMachine RMachine AMachine EMach1 LMach1 RMach1 AMach1 EMach2 LMach2 RMach2 AMach2 Enumboxes Lnumboxes Rnumboxes Anumboxes Etrucks Ltrucks Rtrucks Atrucks
15AUG04 2 2 0 0 0 0 1 0 0 0 0 0 60000 0 -5000 0 6 0 0 3
16AUG04 2 2 0 0 0 0 1 0 0 0 0 0 0 0 -5000 5000 6 0 0 3
17AUG04 2 2 0 0 0 0 1 0 0 0 0 0 0 0 5000 10000 0 0 1 2
18AUG04 2 2 0 0 0 0 1 0 0 0 0 0 0 0 -5000 5000 0 0 1 2
19AUG04 2 2 0 0 0 0 1 0 0 0 0 0 0 60000 5000 10000 0 6 1 2
20AUG04 2 2 0 0 0 0 1 0 0 0 0 0 0 0 -5000 5000 0 6 1 2
21AUG04 0 0 0 0 0 0 0 1 0 0 0 0 0 0 10000 10000 0 0 1 2
22AUG04 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 2
23AUG04 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 3
24AUG04 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -10000 0 0 0 0 3
25AUG04 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 10000 0 0 1 2
26AUG04 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 10000 0 0 2 1
27AUG04 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 10000 0 0 2 1
28AUG04 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -10000 10000 0 0 1 2
29AUG04 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -10000 20000 0 0 0 3
30AUG04 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 30000 0 0 0 3



Previous Page | Next Page | Top of Page