Professional Documents
Culture Documents
bobm4@teleport.com davidr@sba.pdx.edu
Portland, Oregon
1
inherent in software development projects as process is viewed as a sequence of activities.
well as process level issues. Two main Discrete models are often used to model a
modeling paradigms found in the literature are manufacturing line where items or “entities”
system dynamics (continuous simulation) and move from station to station and have
discrete event simulation. System dynamics processing done at each station. Discrete
models describe the interaction between models easily represent queues and can delay
project factors, but do not easily represent processing at an activity if resources are not
queues and discrete process steps. Discrete available. In addition, each entity may be
event models describe process steps, but may described by unique “attributes”. Changes to
not have enough events to represent the attributes by the activities can provide
feedback loops accurately. In this paper, we much of the value of a discrete model. The
present a combined model that represents the duration of each activity may be sampled from
software development process as a series of random distributions allowing the model to
discrete process steps executed in a represent the uncertainty that exists in the
continuously varying project environment. process. This allows the simulation to capture
We demonstrate the feasibility of this model the effects of variation in the entities for each
by combining a discrete event model of the activity.
ISPW6 software process example with the
system dynamics model developed by Abdel- In software development, there has been a
Hamid and Madnick [Abdel-Hamid and long history of viewing the development
Madnick 91]. The combination of these two process as a sequence of discrete activities.
modeling paradigms creates the opportunity to To enable more precise management,
examine new problems and issues that are process models like the waterfall model or the
highly relevant to software project managers. spiral model have been proposed as a generic
set of activities that can be used to track the
progress of the development effort.
2. Background Tausworthe’s Work Breakdown Structure
approach [Tausworthe 80] is a clear example
Discrete models have been developed using of a systematic description of the
tools like GPSS [Schriber 74], SLAM [Pritsker development process as a sequence of
79], and SIMAN [Pegden 90]. These models discrete activities. More recently, the
represent the development process as a Capability Maturity Model [Paulk 95] stresses
series of entities flowing through a sequence the importance of a description of the process
of activities. In discrete event simulation, as a detailed sequence of repeatable
activities schedule future events. System activities.
Dynamics models are time-based, describing
the system in terms of continuous functions Because a discrete model allows each entity
that advance by some fixed time step. We will to contain unique values for attributes, the
examine both types of models in more detail, model can capture the variation in code
looking at how each model presents the difficulty and programmer capability. The
software development process. effects of increased complexity on effort and
error rates or the impact of different
programmer capabilities on coding duration
2.1 Discrete Models may be computed from attributes in a discrete
model.
Advantages Values for attributes may be constant or may
be sampled from distributions. The stochastic
We use the term “discrete models” to refer to nature of the variables captures the
the group of models that advance time uncertainty present in measuring the
because of a discrete event. Since nothing of attributes.
importance to the model happens between
event times, the model can advance the Finally, a discrete model allows us to
simulation clock from event to event with no represent the interdependence that occurs
loss of information. This type of model is between activities in a project. Activities in a
efficient and particularly appealing when the development process may be delayed when a
2
programmer is diverted to another task. suggesting that much of project behavior was
Testing may be delayed until a test bed is a consequence of relationships between
released. If a model can capture these factors.
dependencies at a sufficiently detailed level, it
may show ways to alter the process to reduce Advantages
risk or increase efficiency.
System dynamics models describe the system
Disadvantages in terms of “flows”’ that accumulate in various
“levels”. The flows can be dynamic functions
As mentioned above, a discrete model or can be the consequence of other “auxiliary”
advances time only when an event occurs. variables. As the simulation advances time in
This means that continuously changing small evenly spaced increments, it computes
variables are only updated at the event times. the changes in levels and flow rates. For
While the time between discrete events may example, the error generation rate may be
be days or weeks in a software project, the treated as a “flow” and the current number of
model of the continuous variables may require errors could be treated as a “level”. This
a time step in hours. This difference can allows the model to capture the stability or
cause errors in the integration of the instability of feedback loops. A system
continuous variables or may create instability dynamics model can be valuable in finding the
in the behavior of feedback loops levels where a model can become unstable,
or in predicting the unanticipated side effects
In addition, because discrete models are of a change in a system variable.
based on the idea of a sequence of activities,
it may be awkward to represent simultaneous In a software project, experience is
activities. While activities can occur in recognized as a factor in productivity. Since
parallel, it is difficult to represent the idea of the experience level changes continuously as
an entity in two activities simultaneously. the project progresses, a system dynamics
Imagine a code module in which some parts simulation can model the resulting change in
are in coding while other parts are in unit test. productivity. At the same time, fatigue,
To capture this in a discrete model, we are schedule pressure and attrition will affect
forced to model sub-components of the productivity, but in an adverse manner.
module so that each sub-component can be in Continuously simulating the interaction of
only one activity at a time. these variables can produce a dynamic
estimate of net productivity.
System dynamics modeling tools such as While the system dynamics model is an
STELLA [HPS 98], POWER-SIM [Powersim excellent way to describe the behavior of
95] and DYNAMO [Richardson 81] represent project variables, it is a more difficult way to
the development process as a system of describe process steps. While it is possible to
differential equations. System dynamics were represent discrete activities in a system
first applied to project management by dynamics model, the nature of the tool implies
Roberts [Roberts 64]. Richardson [Richardson that all levels change at every time interval. If
81] gave a detailed project model as an the process contains sequential activities,
example in his book. Abdel-Hamid and some mechanism must be added to prevent
Madnick [Abdel-Hamid and Madnick 91] all activities from executing at once. For
extended this work to software projects in example, if we modeled the software process
1990. Later work by Madachy [Madachy 94] as define, design, code and test activities, as
modeled a more detailed development soon as some code was defined, design would
process. Tvedt and Collefello [Tvedt 95] used start. If we wanted to model a process that
system dynamics to model the software completed all design work before coding
inspection process step. Abdel-Hamid and started, we would have to create an explicit
Madnick’s model was able to reproduce mechanism to control the sequencing.
several well-known project characteristics,
3
Abdel-Hamid and Madnick integrate a single In the next section, we describe a model of
“software development rate” to model tasks the software development process that
being completed. Their model implies that combines the advantages of a system
“tasks” are developed, verified by Quality dynamics model with the precision and detail
Assurance (QA), and tested, but no explicit of a discrete event process model. We also
process steps are described. discuss several key issues related to
integration of the two modeling paradigms.
Because system dynamics models deal with The integration presents a number of
flows and levels, there are no individual interesting issues and insights and shows the
entities and thus no entity attributes. For a opportunity for addressing important new
software process model, this means that all management questions.
modules and all developers are equal. If we
wanted to model the effect of a few error
prone code units on the development process, 3. Issues with Model Integration
we would not be able to specify which units
were error-prone.
In order to demonstrate the feasibility of
Finally, a system dynamics model does not hybrid model, we combined the system
easily allow us to model the uncertainty dynamics model developed by Abdel-Hamid
inherent in our estimates of model and Madnick [Abdel-Hamid and Madnick 91]
parameters. If we estimate that coding each and a discrete event model based on the
module will take from 3 to 6 weeks, we would ISPW-6 Software Process Example. [Kellner
have to translate that estimate into equivalent et al. 91]
coding rates. A discrete model could sample
from a distribution using a different time for These models differ in their assumptions and
each module. The system dynamics model levels of abstraction. In the following
either must sample the rate at each time step sections, we discuss these differences and
or must use the same rate for each model run. how they were reconciled in a combined
model.
4
Madnick use a third order delay to cause the and discrete event simulation model. For the
QA rate to lag behind the development rate. discrete model, we used the model of the
Testing is forced to occur late in the project by ISPW-6 process example created by Raffo
specifying the manpower allocation externally. and Kellner [Raffo 96; Raffo and Kellner 99],
Within software production, the nominal error which is an event driven model of the
rate function, an input variable, changes activities performed during the software
halfway through the project to reflect a lower development process. Equations for each
error rate during coding. While these process step calculate activity effort, duration
mechanisms produce valid behavior, they and defects from user supplied distributions.
require that some of the important project In keeping with the definition of the ISPW-6
behavior be specified a priori. To combine example, the model describes the activity
the models, we must determine the process necessary to make a change to one unit of
implied by these mechanisms. code. Estimates for effort are obtained by
assuming a constant number of staff for each
These Abdel-Hamid and Madnick model activity. The sampled duration is then
characteristics imply that a series of multiplied by the staff to determine effort. The
identically sized (in terms of effort) number of errors corrected affects the
components are designed, sent to quality duration of some activities.
assurance, coded, sent to quality assurance
again and then tested. Design and coding are While this abstraction explicitly describes
sequential, but QA proceeds in parallel process steps, it does not address multiple
(slightly delayed) controlled by manpower units of code, the effect of resource
allocation. Rework must occur after each task constraints, productivity, variations in error
is processed by QA, because rework rates and manpower allocation.
manpower is a function of the number of
detected errors which are produced by QA. In order to resolve the differences between
While this process is implied by the model the Abdel-Hamid and Madnick model [Abdel-
assumptions, it is not directly represented or Hamid and Madnick [91] and the discrete
readily apparent in the model. Quantities like event ISPW-6 simulation model developed by
number of errors or amount of rework are not Raffo and Kellner [Raffo 96; Raffo and Kellner
explicitly associated with tasks, but are 99], we assumed that we are developing a
dynamic variables driven by the development number of components that are of equal size
rate. Any inference about the amount of and effort. We defined a “task” as a process
rework required by a specific task must be step or activity performed on a component or
done in the interpretation of the model results. item. Each activity in the process is assigned
Thus, a task is defined simply as a unit of an earned value. This value represents the
code, but is used throughout by the model percentage of the total project effort allocated
mechanisms as a representation of sequential to a given process step for all components.
activities. In the combined model, we must Once the user has specified the total effort for
assure that the activities we explicitly the project and the number of components,
represent in the discrete portion model are we compute the effort required for a
consistent with the implied activities of the component in each process step. We use the
continuous portion. distributions defined by Raffo to estimate the
duration of each step. From the effort and
In contrast, in a discrete event or state-based duration, we then compute the expected
model, a task is a discrete component of the number of staff required. Computing the
system. This task can have different size, needed staff simply lets us avoid allocating all
complexity, number of defects and so forth. resources to the first task.
The task is then transformed by the various
software development process steps (e.g. The combined model maintains separate
design, coding, inspections, testing, and resource pools for development, QA, rework,
rework among others). and test engineers. The total number of staff
in each pool varies continuously as staffing
In this work, our objective was to combine two levels and manpower allocation decisions
existing models to demonstrate the feasibility change due to a variety of factors during the
of developing a combined system dynamics project. As each task occurs, the model
5
attempts to allocate the needed staff from the Quality
appropriate resource pool. If the model is
unable to allocate the entire number of staff
The quality model describes the way that
needed, it takes whatever is available. Staff
errors are generated, detected and corrected
are re-allocated at each continuous time step.
during the development process. The hybrid
It is possible to assign different priorities to
quality model illustrates the model refinement
components. The allocated staff and the
needed to combine a system dynamics model
current productivity are integrated for each
with a discrete event model.
time step until we reach the required work
load (RWL) for a given activity for each
The system dynamics model describes the
component. This mechanism allows us to
quality model in terms of a set of error rates.
capture the effects of resource constraints
The error rates vary with schedule pressure,
while considering fluctuations in staffing levels
experience and project progress. They are
and productivity. Thus, as each time
integrated to determine the number of errors
increment passes, work is completed at a rate
present at any time in the project.
that is a function of the allocated staff (Ai(t))
and the current productivity level PA(t). The
A discrete model associates error generation
duration for an activity (Di) is determined
and correction with specific tasks occurring at
when the total amount of accumulated work
discrete times. Error rates used in these tasks
(RWLAi) is equal to the estimated required
are usually fixed throughout the task.
work load (RWLEi) for a given activity for a
given component. That is we integrate until.
In a hybrid model, we can isolate the rate
RWLE i = RWLA i integration to specific activities. For example,
RWLE i = EV i * ET * Pp ( Estimated _ at _ beginning ) the error generation rate describes the
Di number of errors injected into the code. This
RWLA i = ∫ A (t )* P (t )dt (computed )
0
i A
rate will vary continuously due to changes in
experience, schedule pressure and project
RWLE i = Estimated _ Re quired _ work _ load _ for _ activity _ i ( LOC ) progress. We would like the hybrid model to
RWLAi = Accumulated _ work _ load _ for _ activity _ i ( LOC ) only increase generated errors during tasks
Ai (t ) = Allocated _ staff _ at _ time _ t _ in _ Task _ i( staff ) like design or coding. We accomplish this by
PA (t ) = Actual _ Pr oductivity _ at _ time _ t ( LOC _ per _ staff _ day) only integrating the error generation rate when
PP = Planned _ Pr oductivity( LOC _ per _ staff _ day) an item is in the design or coding step. The
EVi = Earned _ Value _ at _ task _ i( Percent ) nominal error generation rate per KLOC
ET = Total _ Effort (staff _ days) (thousand lines of code) is specified as an
Di = Sampled _ duration _ for _ task _ i (days) input function in the system dynamics portion
of the model. This nominal rate is modified by
functions that account for the effect of
Note that when actual productivity equals experience and schedule pressure. This is
planned productivity and allocated staff equals converted to errors per item. The error rate is
the expected staff, duration will equal the integrated while the item is in the design or
sampled duration, since the expected staff coding activity. The duration of the activity is
was based on expected effort divided by determined by the method described in the
sampled duration. If actual productivity varies sub-section on tasks.
or resources are constrained, the duration will
be different from the sampled duration.
6
EG (t )*T
Di
Di A(t ) 4. Implementation
= min ∫
E Dj Q (t ) dt , E Gj 4.1 Combining Continuous and
0 Discrete Clocks
We developed a hybrid model using
Q(t ) = QA _ staff _ days _ per _ error EXTEND™, from ImagineThat, Inc. The
Ai (t ) = Allocated _ staff _ for _ task _ i EXTEND simulation software allows the user
to develop customized blocks to implement
Di = Duration_ of _ the _ error _ inspection_ task unique functionality.
E Gj = Errors _ generated _ in _ item _ j
Because an event driven model uses a clock
E Dj = Errors _ det ected _ in _ item _ j
that is advanced when something happens,
and a continuous model advances time at a
sampled from a normal distribution. Then, small steady increment, we created an
7
executive that can drive the continuous blocks • QA – models error generation and rework
at the required time increment while rates.
preserving the discrete scheduling. While • SYS TEST – models error detection and
implementations differ, a discrete event removal in system test. This sector is
simulator usually maintains a next event disabled in this version of the hybrid
queue pointing toward the next scheduled model.
activity. As the activity is performed, new
events may be scheduled and placed on the The sector labeled “S/W Dev Proc” contains
queue. When the activity is completed, the the discrete event process model. This block
system clock is advanced to the time of the contains the individual process steps required
next event. To support hybrid models, we to implement the ISPW-6 process example.
modified the scheduler to only advance the This block is expanded in Figure 2. Double
clock by the specified delta time. At each line connections show the way that items
delta time increment, we then integrate all travel through the model. Single line
necessary equations until the next scheduled connections show information flow.
event time is reached. This approach is an
approximation that works well if the delta time
is sufficiently small. In order to accommodate
the computational overhead of this approach,
we then re-wrote the EXTEND block libraries
to improve efficiency.
8
review, coding, inspections, unit test plan
preparation, and unit test. Project size, which
is defined in constants on the top-level is
divided into a number of components. Each
of these components moves through the
process steps. If the component fails a design
review, it is sent back to design for error
correction. Similarly, if a component fails in
inspection or unit test, it is sent back to coding
for re-work.
9
use a discrete simulation tool to model tasks Bibliography
and resources, a continuous simulation tool to
model the environment. [Abdel-Hamid and Madnick 91] Abdel-
Hamid , T. and Madnick, S., "Software
Project Dynamics: An Integrated Approach",
We demonstrate the feasibility of a combined Prentice-Hall software Series, 1991, ISBN 0-
model, by constructing a hybrid model that 13-822040-9.
combines the continuous model proposed by
Abdel-Hamid and Madnick with a discrete [Armenise 92] Armenise, P., Bandinelli, S.,
event model of the ISPW-6 process example. Ghezzi, C., Morzenti, A., "Software Processes
We then utilize this model to examine Representation Languages: Survey and
dynamic changes in project staffing and Assessment, Proceedings of the Fourth
developer utilization levels incorporating International Conference on Software
factors that cannot be examined using either Engineering and Knowledge Engineering,
modeling paradigm individually. Capri (Italy), June 1992.
10
[Raffo and Kellner 99] Raffo, D. M and
[Kellner et al. 91] Kellner, M.I., Feiler, P.H., Kellner, M. I., “Predicting the Impact of
Finkelstein, A., Katayama, T., Osterweil, L.J., Potential Process Changes: A Quantitative
Penedo, M.H., Rombach, H.D., "ISPW-6 Approach to Process Modeling,” Elements of
Software Process Example", Proceedings of Software Process Assessment and
the 6th International Software Process Improvement, IEEE Computer Society Press,
Workshop: Support for the Software Process, 1999.
IEEE Computer Society Press, 1991.
[Reifer 79] Reifer, D.J., “The Nature of
[Klingener 96] Klingener, J.F.,”Programming Software Management: A Primer” Tutorial:
Combined Discrete-Continuous Simulation Software Management. Edited by Donald
Models for Performance”, Proceedings of the Reifer. IEEE Computer Society, 1979.
1996 Winter Simulation Conference,
Coronado California, December 8-11, 1996. [Roberts 64] Roberts, E.B., The Dynamics
of Research and Development. Cambridge,
[Madachy 94] Madachy, R.J., " A Software Massachusetts, 1964.
Project Dynamics Model for Process Cost,
Schedule, and Risk Assessment", Ph.D. [Richardson 81] Richardson, G.P., and Pugh,
Dissertation, Dept. of Industrial and Systems A.L., Introduction to System Dynamics
Engineering, University of Southern Modeling with DYNAMO, The MIT Press,
California, December 1994. Cambridge, Massachusetts, 1981, ISBN 0-
262-18102-9.
[Paulk 95] Paulk et al, The Capability maturity
Model: Guidelines for Improving the Software [Schriber 74], Schriber, T., Simulation Using
Process, The SEI Series in Software GPSS, John Wiley, 1974.
Engineering, Addison-Wesley, 1995.
[Shein 96] Shein, E., "Process Patrol” PC
[Pegden 90] Pegden, C. D., Shannon, R.E., Week, March 6, 1996, pp. 15-19.
Sadowski, R.P., Introduction to Simulation
using SIMAN, McGraw-Hill, 1990, ISBN0-07- [Tausworthe 80] Tausworthe, R. C., "The
049217-4. Work Breakdown Structure in Software
Project Management", The Journal of
[Powersim 1995] Powersim Corporation, 1175 Systems and Software, Vol. 1, 1980, pp. 181-
Herndon Parkway, Suite 600, Herndon, VA, 186.
20170.
[Thayer , R.H., et al., “Major Issues in
[Pritsker 79] Pritsker, A. Alan B., and Pegden, Software Engineering Project Management.
C. D., Introduction to Simulation and SLAM, IEEE Transactions on Software Engineering,
John-Wiley & Sons, 1979 ISBN 0-470-26588- Vol. SE-7, No. 4, (July, 1981).
4.
[Tvedt 95] Tvedt, J., "A System Dynamics
[Putnam 80] Putnam, Lawrence H., Software Model of the Software Inspection Process",
Cost Estimating and Life-Cycle Control: Technical Report TR-95-007, Computer
Getting the software Numbers, A Tutorial for Science and Engineering Department, Arizona
COMPSAC '80, IEEE Computer Society's State University, Tempe, Arizona, 1995.
Fourth International Computer Software and
Applications Conference, Oct 27-31, 1980.
11