Cocomo
Cocomo
Cocomo
While line of codes have their uses, their usefulness is limited for other
tasks like functionality, complexity, efficiency, etc.
Created by:- Kamal kishore(2012ca34) Ref :-software engineering by K.K.Agrawal, yogesh singh
FUNCTION POINT
Function point measures functionality which is a solution to the size
measurement problem.
It is decomposed into following functional units
Internal External
Inputs Outputs Enquiries Logical Interface
Files Files
Created by:- Kamal kishore(2012ca34) Ref :-software engineering by K.K.Agrawal, yogesh singh
FUNCTIONAL UNITS WITH WEIGHTING FACTORS
Functional units Low Average High
External Inputs 3 4 6
External Outputs 4 5 7
External Inquiries 3 4 5
Internal logical files (ILF) 7 10 15
External interface files (EIF) 5 7 10
Created by:- Kamal kishore(2012ca34) Ref :-software engineering by K.K.Agrawal, yogesh singh
An example
Consider a project with the following functional units: 50 user inputs,40 user
outputs, 35 user enquiries,6 user files,4 external interfaces.
Assume all complexity adjustment factors and weighting factors are average.
Compute the function points for the project. Suppose that program needs 70
LOC per FP. Find out the size of complete project.
Solution:
5 3
UFP = Wij
i=1 j=1
UFP= 50 * 4 + 40 * 5 + 35 * 4 + 6 * 10 + 4 * 7
= 200+200+140+60+28 = 628
CAF= (0.65 + )
=(0.65 + 0.01 (14 * 3 )) = 1.07
FP= UFP * CAF
=628 * 1.07 = 672
Size = FP * (LOC per FP) = 672 * 70 = 47040 LOC
Created by:- Kamal kishore(2012ca34) Ref :-software engineering by K.K.Agrawal, Yogesh Singh
Cost Estimation
Approximate judgement of the costs for a project. It
should be done throughout the entire life cycle.
Why we need?
To determine how much effort and time a software
project requires.
Important for making good management decisions.
It facilitates competitive contract bids.
It affect the planning and budgeting of a project.
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Jyoti Shrivastava
Development Mode of S/W Projects
Mode Project Nature of Project Innovation Deadline
Size
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Jyoti Shrivastava
Basic COCOMO Model
It take the form:
Effort(E) = ab * (KLOC)bb(in Person-months)
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Jyoti Shrivastava
Person-Months
What is Person-Months ?
The area under the curve
Ref: Fundamentals of Software Engineering By Rajib Mall Created by: Jyoti Shrivastava
Basic cocomo: Example
A project size of 200KLOC is to be developed.S/W
development team has average experience on similar type
of projects.The project schedule is not very
tight.Calculate the effort and development time of the
project.
Ans: 200 KLOC implies semi-detached mode.
Hence, E= 3.0 * (200)1.12 = 1133.12 PM
D=2.5 * (1133.12)0.35 = 29.3 M
Avg. staff size(SS) = E/D
= 1133.12/29.3=38.67 Persons.
Productivity (P) = KLOC/E
= 200/1133.12=0.1765 KLOC/PM.
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Jyoti Shrivastava
Intermediate COCOMO
Extension of Basic COCOMO
Why Use ?
Basic model lacks accuracy
Computes software development effort as a function of program
size and set of 15 Cost Drivers
Cost Driver: A multiplicative factor that determines the effort
required to complete the software project.
Why Cost Drivers?
Adjust the nominal cost of a project to the actual project
Environment.
For each Characteristics, Estimator decides the scale factor
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
Cost Drivers
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
The Calculation
Multiply all 15 Cost Drivers to get Effort Adjustment
Factor(EAF)
E(Effort) = ab(KLOC)bb * EAF(in Person-Month)
D(Development Time) = cb(E)db (in month)
SS (Avg Staff Size) = E/D (in persons)
P (Productivity) = KLOC/E (in KLOC/Person-month)
Project ab bb cb db
Organic 3.2 1.05 2.5 0.38
Semidetached 3.0 1.12 2.5 0.35
Embedded 2.8 1.20 2.5 0.32
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
Intermediate COCOMO : Example
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
Detailed COCOMO
Detailed COCOMO = Intermediate COCOMO +
assessment of Cost Drivers impact on each phase.
Phases
1) Plans and requirements
2) System Design
3) Detailed Design
4) Module code and test
5) Integrate and test
Cost of each subsystem is estimated separately. This
reduces the margin of error.
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
The Calculation
Multiply all 15 Cost Drivers to get Effort Adjustment
Factor(EAF)
E(Effort) = ab(KLOC)bb * EAF(in Person-Month)
D(Development Time) = cb(E)db (in month)
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
Detailed COCOMO : Example
Consider a project to develop a full screen editor. The major components
identified and their sizes are (i) Screen Edit 4K (ii) Command Lang
Interpreter 2K (iii) File Input and Output 1K (iv) Cursor movement
2K (v) Screen Movement 3K. Assume the Required software reliability
is high, product complexity is high, analyst capability is high &
programming language experience is low. Use COCOMO model to
estimate cost and time for different phases.
Size of modules : 4 + 2 + 1 + 2 + 3 = 13 KLOC [Organic]
Cost Very Low Nominal High Very Extra High
Drivers Low High
RELY 0.75 0.88 1.00 1.15 1.40 --
CPLX 0.70 0.85 1.00 1.15 1.30 1.65
ACAP 1.46 1.19 1.00 0.86 0.71
LEXP 1.14 1.07 1.00 0.95 -- --
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
Example (Contd.)
Initial Effort (E) = ab(KLOC)bb * EAF = 3.2*(12)1.05 * 1.2169
= 52.9 person-months
Initial Development Time = cb(E)db =2.5*(52.9)0.38 = 11.29 months
Phase value of p and p
Plan & System Detail Module Integration
Reqr Design Design code & test & Test
Organic Small p 0.06 0.16 0.26 0.42 0.16
Organic Small p 0.10 0.19 0.24 0.39 0.18
Phase wise effort & development time distribution
E D Ep (in person-months) Dp (in months)
Plan & Requirement 52.9 11.29 0.06*52.9 = 3.17 0.10*11.29=1.12
System Design 52.9 11.29 0.16*52.9=8.46 0.19*11.29=2.14
Detail Design 52.9 11.29 0.26*52.9=13.74 0.24*11.29=2.70
Module code & test 52.9 11.29 0.42*52.9=22.21 0.39*11.29=4.40
Integration & test 52.9 11.29 0.16*52.9=8.46 0.18*11.29=2.03
Ref: Software Engineering By K.K.Aggarwal & Y. Singh Created by: Kalyan Mondal
WHY COCOMO-II ?
The changes in s/w development techniques included a move
away from mainframe overnight batch processing to desktop-
based real-time turnaround.
These changes and others began to make applying the
original COCOMO model problematic.
The model is tuned to the life cycle practices of the 21st
century.
Ref: Software Engineering By K.K.Aggarwal & Y. Singh and csse website by : Jyotsna Agnihotri
Categories Identified By Cocomo II
End User Programming
Infrastructure Sector
Intermediate Sectors
1. Application Generators And Composition Aids
2. Application Composition Sector
3. System Integration
Stages Of Cocomo-II
Application Composition
Earlier Design
Post Architecture
Classification Of
Complexity Levels
Assign Complexity
Weight To Each Object
Determine Object
Points
Compute New
Object Points
Calculation Of
Productivity Rate
NOP are the object points that will need to be developed and differ
from the object point count because there may be reuse( percentage of
the Product development which is accomplished by exploiting the
existence of existing component's design-or-development effort).
Where
PMnominal = Effort of the project in person months
A = Constant representing the nominal productivity,
provisionally set to 2.5
B = Scale factor
Size = Software size
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
32
The Scaling Factors that COCOMO-II model uses for the
calculation of B are:
Precedentness (PREC)
Development flexibility (FLEX)
Architecture/ Risk Resolution (RESL)
Team Cohesion (TEAM)
Process maturity (PMAT)
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
33
Data for the Computation of B (Scalar Factor)
Scaling Factors Very Low Nominal High Very High Extra High
Low
Precedentness 6.20 4.96 3.72 2.48 1.24 0.00
Development 5.07 4.05 3.04 2.03 2.03 0.00
Flexibility
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
Calculate the scalar factor B
If B=1.0, then Linear relationship b/w Effort & Size.
If B 1.0, then Non-Linear relationship b/w Effort & Size.
If B<1.0, then the rate of increase of effort decreases as the size of
the product increases.
If B>1.0, then the rate of increase of effort increases as the size of
the product increases.
When all the scaling factors of a project are rated as extra high,
then the best value of B= 0.91 (for COCOMO II.2000)
when all the scaling factors of a project are rated as very low,
Then the worst value of B= 1.23 (for COCOMO II.2000)
Hence, the value of B may vary from 0.91 to 1.23
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
Early Design Model: Example
Question: A software project of application generator category with estimated 50
KLOC has to be developed. The scale factor (B) has low precedentness, high
development flexibility and low team cohesion.
Other factors are nominal. The early design cost drivers like platform
difficult (PDIF) and Personnel Capability (PERS) are high and others are
nominal.
Calculate the Effort in person-months for the development of the project.
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
36
Solution :
B = 0.91 + 0.01 * (Sum of rating on scaling factors for the project)
= 0.91 + 0.01 * (4.96 + 2.03 + 4.24 + 4.38 + 4.68)
= 0.91 + 0.01(20.29)=1.1129
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
37
Post Architecture Model
Most detailed estimation model.
Used when a software life cycle architecture has been completed.
Used in the development and maintenance of software products
in the application generators, system integration or infrastructure
sectors.
Lines of Codes Counting Rules
Function Points
Cost Drivers
Where
EM : Effort multiplier which is the product of 17 cost drivers.
PMnominal = Effort of the project in person months.
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
38
Cost Drivers of Post Architecture
Required Software Reliability (RELY)
Product
Database Size (DATA)
Product Complexity (CPLX)
Attributes Documentation (DOCU)
Required Reusability (RUSE)
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
17 Cost Drivers
Cost Very Low Low Nominal High Very High Extra High
Drivers
RELY 0.75 0.88 1.00 2.48 1.24 0.00
DATA 0.93 1.00 2.03 2.03 0.00
CPLX 0.75 0.88 1.00 2.83 1.41 0.00
RUSE 0.91 1.00 2.19 1.10 0.00
DOCU 0.89 0.95 1.00 3.12 1.56 0.00
TIME 1.00 1.11 1.31 1.67
STOR 1.00 1.06 1.21 1.57
PVOL 0.87 1.00 1.15 1.30
ACAP 1.50 1.22 1.00 0.83 0.67
PCAP 1.37 1.16 1.00 0.87 0.74
PCON 1.24 1.10 1.00 0.92 0.84
AEXP 1.22 1.10 1.00 0.89 0.81
PEXP 1.25 1.12 1.00 0.88 0.81
LTEX 1.22 1.10 1.00 0.91 0.84
TOOL 1.24 1.12 1.00 0.86 0.72
SITE 1.25 1.10 1.00 0.92 0.84 0.78
SCED 1.29 1.10 1.00 1.00 1.00
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
Schedule Estimation
Development time can be calculated using PMadjusted as a key
factor and the desired equation is:
Where
= constant, provisionally set to 3.67, B = Scaling factor
TDEVnominal = calendar time in months with a scheduled constraint
PMadjusted = Estimated effort in Person months (after adjustment)
Size Measurement
Size can be measured in any unit and the model can be calibrated
accordingly. However, COCOMO II details are:
I. Application composition model uses the size in object points.
II. The other two models use size in KLOC.
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
42
Post Architecture: Example
Ques: A software project of application generator category with estimated 50
KLOC has to be developed. The scale factor (B) has low precedentness, high
development flexibility and low team cohesion. The identified 17 Cost drivers are
high reliability (RELY), very high database size (DATA), high execution time
constraint (TIME),
very high analyst capability (ACAP), high programmers capability (PCAP).
The other cost drivers are nominal.
Calculate the effort in Person-Months for the development of the project.
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
43
Created by- Karishma Gupta (2012CA55) Ref: Software Engineering By K.K. Aggarwal & Yogesh Singh
Final Word
The models are just there to help, not
to make the management decisions
for you.
--Barry Boehm
Ref: https://cs.uwaterloo.ca/~apidduck/se362/Lectures/cocomo.pdf
References
Software Engineering (Third Edition) By K.K.Aggarwal &
Y. Singh
Fundamentals of Software Engineering (Third Edition)
By Rajib Mall
Software Engineering , 6th Edition By Ian Sommerville
Software Engineering (Sixth Edition) by Roger S.
Pressman
https://cs.uwaterloo.ca/~apidduck/se362/Lectures/coco
mo.pdf
Thank You