Introduction to Project Management

Example 2.6 Multiple Projects

(View the complete code for this example.)

Often a project is divided into several subprojects, each of which is then broken into activities with precedence constraints. For reporting or accounting purposes, it may be essential to group activities or to aggregate the information pertaining to activities in a given group. Sometimes, totally different projects use a common pool of resources and you may want to schedule all the projects using the common pool; you may want to vary the priority with which the resources are allotted to the activities on the basis of the projects to which they belong. Often, you have several projects that are essentially the same, with only a few minor differences; these projects may also share a common pool of resources. In such cases, you may want to have a project template listing all the activities and their precedence relationships; for each specific project you can copy the template, make any modifications that are necessary for the given scenario, and determine the project schedule accordingly.

This example illustrates some of these possibilities for a multiproject scenario. The project is first scheduled using PROC CPM, and then the PM procedure is used with the same input data set to illustrate the project displayed in the PM Window.

Output 2.6.1: Network Diagram for Project Book

Network Diagram for Project Book


Consider a publishing company that accepts manuscripts from different authors for publication. The publication of each book can be treated as a project. Thus, at a given point in time, several projects, almost identical in nature, may be in progress. Some of the resources that may be needed are a technical editor, a copy editor, and a graphic artist. All the books that are currently being worked on share a common pool of these resources. This example uses a simplified version of such a scenario to illustrate some of the ways in which you can handle multiple projects competing for the same pool of resources.

The network in Output 2.6.1 represents some of the tasks required to publish one book and the precedence constraints among these tasks; the durations in the diagram are in weeks. Suppose that the generic project data are in the data set book, which is displayed in Output 2.6.2. This data set is used as a template for creating the Activity data set for any book publishing project.

Suppose that the company is working on two books simultaneously. The editor and artist must now allocate their time between the two books. The following program uses the template data set book to create Activity data sets book1 and book2 corresponding to the publication of each book. Any modifications to the generic project data can be made in the DATA step or by using PROC PM. In this example, the duration for the first activity, 'Preliminary Edit,' is changed to two weeks for the second book. The two Activity data sets book1 and book2 are also displayed in Output 2.6.2.

data book1;
   length act $6. succ $6.;
   set book;
   subproj = "Book 1";
   act = "B1"||task;
   if succ ^= " " then succ = "B1"||succ;
   run;

data book2;
   length act $6. succ $6.;
   set book;
   subproj = "Book 2";
   act  = "B2"||task;
   if act = "B2PEDT" then dur = 2;
   if succ ^= " "    then succ = "B2"||succ;
   run;
title 'Publishing Book 1';
proc print data=book1;
   var subproj task act succ id dur editor artist;
   run;

title 'Publishing Book 2';
proc print data=book2;
   var subproj task act succ id dur editor artist;
   run;

Output 2.6.2: Template and Activity Data Sets for Book Publishing Example

Publishing Book 1

Obssubprojtaskactsucciddureditorartist
1Book 1PEDTB1PEDTB1REVPreliminary Edit11.
2Book 1PEDTB1PEDTB1GRPHPreliminary Edit11.
3Book 1REVB1REVB1CEDTRevise Book21.
4Book 1GRPHB1GRPHB1CEDTGraphics3.1
5Book 1CEDTB1CEDTB1PRFCopyedit Book11.
6Book 1PRFB1PRFB1PRNTProofread Book11.
7Book 1PRNTB1PRNT Print Book2..

Publishing Book 2

Obssubprojtaskactsucciddureditorartist
1Book 2PEDTB2PEDTB2REVPreliminary Edit21.
2Book 2PEDTB2PEDTB2GRPHPreliminary Edit21.
3Book 2REVB2REVB2CEDTRevise Book21.
4Book 2GRPHB2GRPHB2CEDTGraphics3.1
5Book 2CEDTB2CEDTB2PRFCopyedit Book11.
6Book 2PRFB2PRFB2PRNTProofread Book11.
7Book 2PRNTB2PRNT Print Book2..


As a next step, the data sets for the two subprojects are combined to form an Activity data set for the entire project. A variable priority is assigned the value '1' for activities pertaining to the first book and the value '2' for those pertaining to the second one. In other words, Book 1 has priority over Book 2. The Resource data set specifies the availability for each of the resources to be 1. The input data sets, books and resource, are displayed in Output 2.6.3.

data books;
   set book1 book2;
   if subproj = "Book 1" then priority = 1;
   else priority = 2;
   run;

data resource;
   input avdate & date7. editor artist;
   format avdate date7.;
   datalines;
1jan03   1   1
;
title 'Publishing Books 1 and 2';
proc print data=books;
   var subproj priority task act succ id dur editor artist;
   run;

title 'Resources Available';
proc print data=resource;
   run;

Output 2.6.3: Input Data Sets for Book Publishing Example

Publishing Books 1 and 2

Obssubprojprioritytaskactsucciddureditorartist
1Book 11PEDTB1PEDTB1REVPreliminary Edit11.
2Book 11PEDTB1PEDTB1GRPHPreliminary Edit11.
3Book 11REVB1REVB1CEDTRevise Book21.
4Book 11GRPHB1GRPHB1CEDTGraphics3.1
5Book 11CEDTB1CEDTB1PRFCopyedit Book11.
6Book 11PRFB1PRFB1PRNTProofread Book11.
7Book 11PRNTB1PRNT Print Book2..
8Book 22PEDTB2PEDTB2REVPreliminary Edit21.
9Book 22PEDTB2PEDTB2GRPHPreliminary Edit21.
10Book 22REVB2REVB2CEDTRevise Book21.
11Book 22GRPHB2GRPHB2CEDTGraphics3.1
12Book 22CEDTB2CEDTB2PRFCopyedit Book11.
13Book 22PRFB2PRFB2PRNTProofread Book11.
14Book 22PRNTB2PRNT Print Book2..

Resources Available

Obsavdateeditorartist
101JAN0311


PROC CPM is then invoked to schedule the project to start on January 1, 2003. The PROJECT statement is used to indicate the subproject to which each activity belongs. The data set bookschd (displayed in Output 2.6.4) contains the schedule for the entire project. The ADDACT option on the PROC CPM statement adds observations for each of the subprojects, 'Book 1' and 'Book 2,' as well as one observation for the entire project. These observations are added at the end of the list of the observations corresponding to the observations in the input data set. The Usage data set booksout is also displayed in Output 2.6.4.

proc cpm data=books resin=resource
         out=bookschd resout=booksout
         date='1jan03'd interval=week
         addact;
   act      act;
   dur      dur;
   succ     succ;
   resource editor artist / per=avdate avp rcp
                            rule=actprty actprty=priority
                            delayanalysis;
   id       id task;
   project  subproj;
   run;

Compare the E_START and S_START schedules (in the data set bookschd) and note that on January 1, the activity 'B1PEDT' for Book1 is scheduled to start while the preliminary editing of book 2 (activity B2PEDT) has been postponed, due to subproject 'Book 1' having priority over subproject 'Book 2.' On January 22, there is no activity belonging to subproject 'Book 1' that demands an editor; thus, the activity 'B2PEDT' is scheduled to start on that day. As a result, the editor is working on an activity in the second project for two weeks starting from January 22, 2003; when 'B1CEDT' is ready to start, the editor is not available, causing a delay in this activity. Thus, even though the first book has priority over the second book, the scheduling algorithm does not keep a resource waiting for activities in the first project. However, if you enable activity splitting, you can reclaim the resource for the first book by allowing activities in the second project to be split, if necessary. For details regarding the scheduling algorithm allowing splitting of activities, see Chapter 3, The CPM Procedure.

Note: The entire project finishes on April 1, 2003; resource constraints have delayed project completion by four weeks. The variable R_DELAY in the Schedule data set bookschd indicates the amount of delay in weeks caused by resource constraints. The value of R_DELAY does not include any delay in the activity that is caused by a resource delay in one of its predecessors. See Example 3.15 in Chapter 3, The CPM Procedure, for more details about the R_DELAY variable.

Output 2.6.4: Data Sets BOOKSCHD and BOOKSOUT

Schedule for Project BOOKS

ObssubprojPROJ_DURPROJ_LEVactsuccduridtaskeditorartistS_STARTS_FINISHE_STARTE_FINISHL_STARTL_FINISHR_DELAYDELAY_RSUPPL_R
1Book 1.2B1PEDTB1REV1Preliminary EditPEDT1.01JAN0307JAN0301JAN0307JAN0308JAN0314JAN030  
2Book 1.2B1PEDTB1GRPH1Preliminary EditPEDT1.01JAN0307JAN0301JAN0307JAN0308JAN0314JAN030  
3Book 1.2B1REVB1CEDT2Revise BookREV1.08JAN0321JAN0308JAN0321JAN0322JAN0304FEB030  
4Book 1.2B1GRPHB1CEDT3GraphicsGRPH.108JAN0328JAN0308JAN0328JAN0315JAN0304FEB030  
5Book 1.2B1CEDTB1PRF1Copyedit BookCEDT1.05FEB0311FEB0329JAN0304FEB0305FEB0311FEB031editor 
6Book 1.2B1PRFB1PRNT1Proofread BookPRF1.12FEB0318FEB0305FEB0311FEB0312FEB0318FEB030  
7Book 1.2B1PRNT 2Print BookPRNT..19FEB0304MAR0312FEB0325FEB0319FEB0304MAR030  
8Book 2.2B2PEDTB2REV2Preliminary EditPEDT1.22JAN0304FEB0301JAN0314JAN0301JAN0314JAN033editor 
9Book 2.2B2PEDTB2GRPH2Preliminary EditPEDT1.22JAN0304FEB0301JAN0314JAN0301JAN0314JAN033editor 
10Book 2.2B2REVB2CEDT2Revise BookREV1.19FEB0304MAR0315JAN0328JAN0322JAN0304FEB032editor 
11Book 2.2B2GRPHB2CEDT3GraphicsGRPH.105FEB0325FEB0315JAN0304FEB0315JAN0304FEB030  
12Book 2.2B2CEDTB2PRF1Copyedit BookCEDT1.05MAR0311MAR0305FEB0311FEB0305FEB0311FEB030  
13Book 2.2B2PRFB2PRNT1Proofread BookPRF1.12MAR0318MAR0312FEB0318FEB0312FEB0318FEB030  
14Book 2.2B2PRNT 2Print BookPRNT..19MAR0301APR0319FEB0304MAR0319FEB0304MAR030  
15 91Book 1 .  ..01JAN0304MAR0301JAN0325FEB0308JAN0304MAR030  
16 101Book 2 .  ..22JAN0301APR0301JAN0304MAR0301JAN0304MAR033  
17 130  .  ..01JAN0301APR0301JAN0304MAR0301JAN0304MAR030  

Resource Usage for Project BOOKS

Obs_TIME_ReditorAeditorRartistAartist
101JAN031001
208JAN031010
315JAN031010
422JAN031010
529JAN031001
605FEB031010
712FEB031010
819FEB031010
926FEB031001
1005MAR031001
1112MAR031001
1219MAR030101
1326MAR030101
1402APR030101


The output data sets bookschd and booksout can be used to produce graphical reports of the schedule and the resource usage. In particular, the Schedule data set can be used to produce a zoned, time-scaled network diagram as shown in Output 2.6.5. The program used to produce the network diagram is shown in the following code. In this example, only the leaf tasks (those without any subtasks) are used to draw the network diagram. Further, the activities are aligned according to the resource-constrained start times and grouped according to the subproject.

goptions hpos=98 vpos=60;

pattern1 v=e c=green;
pattern2 v=e c=red;

title c=black h=4 'Schedule for Project Books';
proc netdraw data=bookschd(where=(proj_dur=.)) graphics;
   actnet / act=act succ=succ
            id=(task) nodefid nolabel
            xbetween=8 htext=3 pcompress
            zone=subproj zonepat zonespace
            align=s_start separatearcs;
   label subproj = 'Subproject';
   run;

Output 2.6.5: Resource Constrained Schedule for Project Books

Resource Constrained Schedule for Project Books


The same project can also be scheduled using the PM procedure, as shown in the following statements. The resulting PM Window is shown in Figure 8. The advantage with using PROC PM is that you can use the PM Window to edit the activity information, such as the durations, resource requirements, and so forth.

proc pm data=books resin=resource
        out=pmsched resout=pmrout
        date='1jan03'd interval=week;
   act      act;
   dur      dur;
   succ     succ;
   resource editor artist / per=avdate
                            avp rcp
                            rule=actprty
                            actprty=priority
                            delayanalysis;
   id       id task;
   project  subproj;
   run;

Figure 8: PM Window on Book Project

PM Window on Book Project


Last updated: November 10, 2025