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 4.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 4.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 4.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 4.30.1: Activity Data Set
Auxiliary Resources |
Activity Data Set TwoOrder |
O b s |
A c t i v i t y |
s u c c |
D u r a t i o n |
M a c h i n e |
M a c h 1 |
M a c h 2 |
n u m b o x e s |
t r u c k s |
_ p a t t e r n |
---|---|---|---|---|---|---|---|---|---|
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 |
The following statements invoke the CPM procedure to schedule the production of the two orders of boxed greeting cards and
display the schedule (in Output 4.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; pattern1 v=s c=red; pattern2 v=s c=green; title h=2 'Auxiliary Resources'; title2 h=1.5 'Truck Schedule: Fixed Activity Durations'; proc gantt data=TwoSched(drop=e_: l:); chart / act=activity succ=succ duration=duration nolegend nojobnum compress pattern=_pattern ctextcols=id cprec=blue scale=4 height=1.5; id activity ; run;
title2 'Resource Usage Data set: Fixed Activity Durations'; proc print data=TwoRout; id _time_; run;
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 4.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 4.30.4: Resource Usage Data Set
Auxiliary Resources |
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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