Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CPM Procedure

Example 2.2: Activity-on-Arc Representation

cpmnet2.gif (3108 bytes)

Figure 2.7: Network Showing Task Relationships in Activity-on-Arc Format

The problem discussed in Example 2.1 can also be described in an AOA format. The network is illustrated in Figure 2.7. Note that the network has an arc labeled `Dummy', which is required to capture accurately all the precedence relationships. Dummy arcs are often needed when representing scheduling problems in AOA format.

The following DATA step saves the network description in a SAS data set, WIDGAOA. The data set contains the minimum amount of information required by PROC CPM for an activity network in AOA format, namely, the TAILNODE and HEADNODE variables, which indicate the direction of each arc in the network and the DURATION variable which gives the length of each task. In addition, the data set also contains a variable identifying the name of the task associated with each arc. This variable, task, can be identified to PROC CPM using the ACTIVITY statement. Note that PROC CPM treats each observation in the data set as a new task, thus enabling you to specify multiple arcs between a pair of nodes. In this example, for instance, both the tasks `Drawings' and `Write Specs' connect the nodes 2 and 3; likewise, both the tasks `Materials' and `Facility' connect the nodes 5 and 7. If multiple arcs are not allowed, you would need more dummy arcs in this example. However, the dummy arc between nodes 8 and 6 is essential to the structure of the network and cannot be eliminated.

As in Example 2.1, the data set DETAILS containing additional activity information, can be merged with the Activity data set and used as input to PROC CPM to determine the project schedule. For purposes of display (in Gantt charts, and so on) the dummy activity has been given a label, `Production Milestone'. Output 2.2.1 displays the project schedule.

 /* Activity-on-Arc representation of the project */
   data widgaoa;
      input task $ 1-12 days tail head;
      datalines;
   Approve Plan   5   1   2
   Drawings      10   2   3
   Anal. Market   5   2   4
   Write Specs    5   2   3
   Prototype     15   3   5
   Mkt. Strat.   10   4   6
   Materials     10   5   7
   Facility      10   5   7
   Init. Prod.   10   7   8
   Evaluate      10   8   9
   Test Market   15   6   9
   Changes        5   9  10
   Production     0  10  11
   Marketing      0   6  12
   Dummy          0   8   6
   ;

   data details;
      input task $ 1-12 dept $ 15-27 descrpt $ 30-59;
      label dept = "Department"
            descrpt = "Activity Description";
      datalines;

   Approve Plan  Planning       Finalize and Approve Plan
   Drawings      Engineering    Prepare Drawings
   Anal. Market  Marketing      Analyze Potential Markets
   Write Specs   Engineering    Write Specifications
   Prototype     Engineering    Build Prototype
   Mkt. Strat.   Marketing      Develop Marketing Concept
   Materials     Manufacturing  Procure Raw Materials
   Facility      Manufacturing  Prepare Manufacturing Facility
   Init. Prod.   Manufacturing  Initial Production Run
   Evaluate      Testing        Evaluate Product In-House
   Test Market   Testing        Mail Product to Sample Market
   Changes       Engineering    Engineering Changes
   Production    Manufacturing  Begin Full Scale Production
   Marketing     Marketing      Begin Full Scale Marketing
   Dummy                        Production Milestone
   ;

   data widgeta;
      merge widgaoa details;
      run;

   /* The project is scheduled using PROC CPM */
   /* The network information is conveyed using the TAILNODE */
   /* and HEADNODE statements. The ID statement is used to   */
   /* transfer project information to the output data set    */
   proc cpm data=widgeta date='2dec91'd out=save;
      tailnode tail;
      headnode head;
      duration days;
      activity task;
      id dept descrpt;
      run;

   proc sort;
      by e_start;
      run;

   options ls=90;

   title 'Widget Manufacture: Activity-On-Arc Format';
   title2 'Project Schedule';
   proc print;
      id descrpt;
      var dept e_: l_: t_float f_float;
      run;

Output 2.2.1: Critical Path: Activity-on-Arc Format

Widget Manufacture: Activity-On-Arc Format
Project Schedule

descrpt dept E_START E_FINISH L_START L_FINISH T_FLOAT F_FLOAT
Finalize and Approve Plan Planning 02DEC91 06DEC91 02DEC91 06DEC91 0 0
Prepare Drawings Engineering 07DEC91 16DEC91 07DEC91 16DEC91 0 0
Analyze Potential Markets Marketing 07DEC91 11DEC91 06JAN92 10JAN92 30 0
Write Specifications Engineering 07DEC91 11DEC91 12DEC91 16DEC91 5 5
Develop Marketing Concept Marketing 12DEC91 21DEC91 11JAN92 20JAN92 30 30
Build Prototype Engineering 17DEC91 31DEC91 17DEC91 31DEC91 0 0
Procure Raw Materials Manufacturing 01JAN92 10JAN92 01JAN92 10JAN92 0 0
Prepare Manufacturing Facility Manufacturing 01JAN92 10JAN92 01JAN92 10JAN92 0 0
Initial Production Run Manufacturing 11JAN92 20JAN92 11JAN92 20JAN92 0 0
Evaluate Product In-House Testing 21JAN92 30JAN92 26JAN92 04FEB92 5 5
Mail Product to Sample Market Testing 21JAN92 04FEB92 21JAN92 04FEB92 0 0
Begin Full Scale Marketing Marketing 21JAN92 21JAN92 10FEB92 10FEB92 20 20
Production Milestone   21JAN92 21JAN92 21JAN92 21JAN92 0 0
Engineering Changes Engineering 05FEB92 09FEB92 05FEB92 09FEB92 0 0
Begin Full Scale Production Manufacturing 10FEB92 10FEB92 10FEB92 10FEB92 0 0

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.