L19 CocomoModels Short
L19 CocomoModels Short
COCOMO Models
CS 6406
R.L. Probert 1
Overview
• Software project planning
• Role of metrics and planning models
• Model example
– COCOMO
2
Learning Outcomes
• Most widely-used software planning tool: COCOMO
• Gain experience with how to use this tool
• Details
– You are NOT expected to memorise the model
– You will need to be able to perform computations given a
model
– Only simple models will be expected in exam situations
3
Software Cost Estimation
R.L. Probert
4
Types of Planning Models
• Size-based models
– COCOMO: based on lines of code
– Uses statistical parameter estimation
• Function-point based
– Use notion of significant software “function”
• Input, output, function estimation
• Structure-based
– Examine structure of code
– Must have code already written/planned
5
Project Management and Mr. Murphy
1. Logic is a systematic method of coming to the wrong
conclusion with confidence.
2. Technology is dominated by those who manage what
they do not understand.
3. Nothing ever gets built on schedule or within budget.
4. If mathematically you end up with the incorrect
answer, try multiplying by the page number.
R.L. Probert
6
7
Motivation
Software cost estimation provides:
• vital link between the general concepts and techniques
of economic analysis and the particular world of
software engineering.
• Essential part of the foundation for good software
management.
R.L. Probert
8
Cost of a project
• The cost in a project is due to:
– the requirements for software, hardware and human resources
– the cost of software development is due to the human
resources needed
– most cost estimates are measured in person-months (PM)
R.L. Probert
9
Cost of a project (.)
• the cost of the project depends on
– the nature and characteristics of the project
• the accuracy of the estimate depends on the amount of
reliable information we have about the final product
– Good model (?)
– Good project plan (?)
R.L. Probert
10
Introduction to COCOMO models
• The COstructive COst Model (COCOMO) is the most
widely used software estimation model in the world
• The COCOMO model predicts the effort and duration of
a project based on
– inputs relating to the size of the resulting systems
– a number of "cost drivers" that affect productivity.
R.L. Probert
11
Overview of COCOMO
• Predictive model of man-hours for a project
• Statistical model
– Based on statistical analysis of prior projects
12
Typical Effort Vs Project Size Curve
14000
12000
10000
8000
Effort
6000
4000
2000
0
0 100000 200000 300000 400000 500000 600000
Lines of code
T. E. Potok - University of
Tennessee
Basic COCOMO
• Organic - small to medium size, familiar
projects
– Person-months=2.4(KLOC)1.05
– Development-time = 2.5(PM).38
• Semidetached - intermediate
– Person-months=3.0(KLOC)1.12
– Development-time = 2.5(PM).35
• Embedded - ambitious, tightly constrained
– Person-months=3.6(KLOC)1.20
– Development-time = 2.5(PM).32
T. E. Potok - University of
Tennessee
COCOMO Models
COCOMO Models
7000
Organic
6000 Semidetached
Embedded
5000
Person-months
4000
3000
2000
1000
0
0 100 200 300 400 500 600
Thousands of lines of code
T. E. Potok - University of
Tennessee
More Cost Drivers
• Personnel Attributes
– Analyst Capability
– Application Experience
– Programmer Capability
– Virtual Machine Experience
– Programming Language Experience
• Project Attributes
– Modern Programming Practices
– Use of Software Tools
– Required Development Schedule
T. E. Potok - University of
Tennessee
Example
• Need to produce 10,000 LOC (10 KLOC).
• Small project, familiar development
• Use organic model:
– Person-months=2.4(10)1.05 =26.9 Person-months
– Development-time = 2.5(26.9).38 =8.7 Months
– Average People = 26.9 PM/8.7 Months = 3 People
• Linear model
– 3 people would take 16.5 months, at 50 person-months
T. E. Potok - University of
Tennessee
Example
• We also know that the design experience is low
– Analyst, - 1.19
– application, - 1.13
– programmer experience is low. - 1.17
• Yet the programming experience is high - .95
• Adjustment factor 1.19*1.13*1.17*.95 = 1.49
• PM = 26.9*1.49 = 40 Person-months
• Development time = 10.2 Months
• People = 3.9 People
T. E. Potok - University of
Tennessee
Drawbacks
• COCOMO has to be calibrated to your environment.
• Very sensitive to change.
– Over a person-year difference in a 10 KLOC project with minor
adjustments
• Broad brush model that can generate significant errors
T. E. Potok - University of
Tennessee
COCOMO 2.0
• Includes
– COTS and reusable software
– Degree of understanding of requirements and architectures
– Schedule constraints
– Project size
– Required reliability
• Three Types of models
– Application Composition – Prototyping/Bidding
– Early Design - Alternative evaluation
– Post-architecture - Detailed estimates
T. E. Potok - University of
Tennessee
COCOMO 2 Models
• COCOMO is defined in terms of three different models:
– the Basic model,
– the Intermediate model, and
– the Detailed model.
• The more complex models account for more factors
that influence software projects, and make more
accurate estimates.
R.L. Probert
23
Effort
• Effort Equation
– PM = C * (KDSI)n (person-months)
• where PM = number of person-month (=152 working hours),
• C = a constant,
• KDSI = thousands of "delivered source instructions" (DSI) and
• n = a constant.
R.L. Probert
24
Productivity
• Productivity equation
– (DSI) / (PM)
• where PM = number of person-month (=152 working hours),
R.L. Probert
25
Schedule
• Schedule equation
– TDEV = C * (PM)n (months)
• where TDEV = number of months estimated for software
development.
R.L. Probert
26
Average Staffing
• Average Staffing Equation
– (PM) / (TDEV) (FSP)
• where FSP means Full-time-equivalent Software Personnel.
R.L. Probert
27
The Development mode
• the most important factors contributing to a project's
duration and cost is the Development Mode
• Organic Mode: The project is developed in a familiar, stable
environment, and the product is similar to previously developed
products. The product is relatively small, and requires little
innovation.
• Semidetached Mode: The project's characteristics are
intermediate between Organic and Embedded.
R.L. Probert
28
The Development mode
• the most important factors contributing to a project's
duration and cost is the Development Mode:
• Embedded Mode: The project is characterized by tight, inflexible
constraints and interface requirements. An embedded mode
project will require a great deal of innovation.
R.L. Probert
29
Modes
Feature Organic Semidetached Embedded
R.L. Probert 30
Modes (.)
Feature Organic Semidetached Embedded
R.L. Probert 31
Relation between LOC and FP
• Relationship:
– where
• LOC (Lines of Code)
• FP (Function Points)
32
Relation between LOC and FP(.)
R.L. Probert
33
Effort Computation
• The Basic COCOMO model computes effort as a
function of program size. The Basic COCOMO equation
is:
– E = aKLOC^b
• Effort for three modes of Basic COCOMO.
Mode a b
34
Example
35
Effort Computation
• The intermediate COCOMO model computes effort as a
function of program size and a set of cost drivers. The
Intermediate COCOMO equation is:
– E = aKLOC^b*EAF
• Effort for three modes of intermediate COCOMO.
Mode a b
36
Effort computation(.)
• Effort Adjustment Factor
37
Effort Computation (..)
Total EAF = Product of the selected factors
R.L. Probert
38
Example
39
Software Development Time
R.L. Probert
40