Software cost estimation

Download Report

Transcript Software cost estimation

Software cost estimation 2
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 1
Algorithmic cost modelling



Cost is estimated as a mathematical function of
product, project and process attributes whose
values are estimated by project managers:
•
Effort = A  SizeB  M
•
A is an organisation-dependent constant, B reflects the
disproportionate effort for large projects and M is a
multiplier reflecting product, process and people
attributes.
The most commonly used product attribute for cost
estimation is code size.
Most models are similar but they use different values
for A, B and M.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 2
The COCOMO model




An empirical model based on project experience.
Well-documented, ‘independent’ model which is not
tied to a specific software vendor.
Long history from initial version published in 1981
(COCOMO-81) through various instantiations to
COCOMO 2.
COCOMO 2 takes into account different approaches
to software development, reuse, etc.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 3
COCOMO 2 models


COCOMO 2 incorporates a range of sub-models
that produce increasingly detailed software
estimates.
The sub-models in COCOMO 2 are:
•
•
•
•
Application composition model. Used when software is
composed from existing parts.
Early design model. Used when requirements are
available but design has not yet started.
Reuse model. Used to compute the effort of integrating
reusable components.
Post-architecture model. Used once the system
architecture has been designed and more information
about the system is available.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 4
Use of COCOMO 2 models
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 5
Application composition model




Supports prototyping projects and projects where
there is extensive reuse.
Based on standard estimates of developer
productivity in application (object) points/month.
Takes CASE tool use into account.
Formula is
•
PM = ( NAP  (1 - %reuse/100 ) ) / PROD
•
PM is the effort in person-months, NAP is the number of
application points and PROD is the productivity.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 6
Object point productivity
D ev e lo p erÕs ex p erie n ce
an d c ap a bi lity
V er y l ow
Low
N om in al
H ig h
V er y h ig h
IC A SE m atu rity an d
ca p ab il ity
V er y l ow
Low
N om in al
H ig h
V er y h ig h
7
13
25
50
P R O D (N O P/m on th)
©Ian Sommerville 2004
4
Software Engineering, 7th edition. Chapter 26
Slide 7
Early design model


Estimates can be made after the
requirements have been agreed.
Based on a standard formula for algorithmic
models
•
PM = A  SizeB  M where
•
M = PERS  RCPX  RUSE  PDIF  PREX 
FCIL  SCED;
A = 2.94 in initial calibration, Size in KLOC, B
varies from 1.1 to 1.24 depending on novelty of
the project, development flexibility, risk
management approaches and the process
maturity.
•
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 8
Multipliers

Multipliers reflect the capability of the
developers, the non-functional requirements,
the familiarity with the development platform,
etc.
•
•
•
•
•
•
•
RCPX - product reliability and complexity;
RUSE - the reuse required;
PDIF - platform difficulty;
PREX - personnel experience;
PERS - personnel capability;
SCED - required schedule;
FCIL - the team support facilities.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 9
The reuse model


Takes into account black-box code that is
reused without change and code that has to
be adapted to integrate it with new code.
There are two versions:
•
•
Black-box reuse where code is not modified. An
effort estimate (PM) is computed.
White-box reuse where code is modified. A size
estimate equivalent to the number of lines of
new source code is computed. This then adjusts
the size estimate for new code.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 10
Reuse model estimates 1

For generated code:
•
•
•
•
PM = (ASLOC * AT/100)/ATPROD
ASLOC is the number of lines of generated
code
AT is the percentage of code automatically
generated.
ATPROD is the productivity of engineers in
integrating this code.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 11
Reuse model estimates 2

When code has to be understood and
integrated:
•
•
•
ESLOC = ASLOC * (1-AT/100) * AAM.
ASLOC and AT as before.
AAM is the adaptation adjustment multiplier
computed from the costs of changing the reused
code, the costs of understanding how to
integrate the code and the costs of reuse
decision making.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 12
Post-architecture level


Uses the same formula as the early design
model but with 17 rather than 7 associated
multipliers.
The code size is estimated as:
•
•
•
Number of lines of new code to be developed;
Estimate of equivalent number of lines of new code
computed using the reuse model;
An estimate of the number of lines of code that
have to be modified according to requirements
changes.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 13
The exponent term


This depends on 5 scale factors (see next slide).
Their sum/100 is added to 1.01
A company takes on a project in a new domain. The
client has not defined the process to be used and
has not allowed time for risk analysis. The company
has a CMM level 2 rating.
•
•
•
•
•

Precedenteness - new project (4)
Development flexibility - no client involvement - Very high
(1)
Architecture/risk resolution - No risk analysis - V. Low .(5)
Team cohesion - new team - nominal (3)
Process maturity - some control - nominal (3)
Scale factor is therefore 1.17.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 14
Exponent scale factors
P re ce d en ted n ess
R e flect s the prev io us e xp er ien ce o f the org an is at ion w ith th is t yp e o f
p ro jec t. V ery lo w m ea ns n o prev ious ex pe rie nc e , E x tra h ig h m ea ns
th at th e o rg an is at ion is co mp le tel y f am ilia r w it h t hi s ap p licat ion
d om ai n .
D ev e lo pm en t
fle x ib il ity
R e flect s the de gree of flex ib ility in th e d ev e lo pm en t p ro ce ss. V e ry
low m ea n s a p re sc ribe d p ro ce ss is u se d; Ex tra high m ea ns t h at th e
clie n t o nly se ts g en e ra l g oa ls .
A rc h itec ture/risk
resolutio n
R e flect s the ex ten t of ris k ana lysis ca rr ie d ou t. V e ry lo w m ea n s little
an alys is, Ex tra high m ea ns a c om plete a tho ro ug h ri sk an alysis.
Tea m co h esio n
R e flect s ho w w ell the de v el o pm en t tea m kn ow ea c h o th er an d w ork
to ge the r. V e ry low m ea ns ve ry d iffic ult int e ra ction s, E x tra h ig h
m ea ns a n i n tegr ate d an d ef fec tiv e tea m w ith n o co mm un ic at ion
p ro blems .
P ro ce ss m a turi ty
R e flect s the pro ce ss m aturity o f th e o rg an is at ion . T h e c om pu tatio n
o f this va lu e de pe n ds on th e C M M Ma turity Q ues tio nn ai re bu t a n
estim ate ca n b e ac h ie v ed b y su bt rac tin g the C M M pr oce ss m at u rity
le ve l f rom 5.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 15
Multipliers

Product attributes
•

Computer attributes
•

Constraints imposed on the software by the hardware
platform.
Personnel attributes
•

Concerned with required characteristics of the software
product being developed.
Multipliers that take the experience and capabilities of the
people working on the project into account.
Project attributes
•
Concerned with the particular characteristics of the
software development project.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 16
Effects of cost drivers
E x po ne n t v al u e
S ystem siz e (in cl u ding fa ct o rs fo r re us e
an d req uire m e nts vo la til ity )
In itia l CO C OMO estim ate w ith out
cos t dr iv e rs
1 .1 7
1 28 , 0 00 D SI
R e li a bility
C om plex ity
M em ory c ons trai n t
T o ol use
S ch ed u le
A djus te d C OCO M O estima te
V er y h ig h, m u ltip li e r = 1.39
V er y h ig h, m u ltip li e r = 1.3
H ig h, m u ltip li e r = 1.21
L o w, m ul tip lier = 1 .12
A cce ler a te d , mu lt iplie r = 1. 2 9
2 30 6 p er son -m on ths
R e li a bility
C om plex ity
M em ory c ons trai n t
T o ol use
S ch ed u le
A djus te d C OCO M O estima te
V er y l ow , mu lt iplie r = 0. 7 5
V er y l ow , mu lt iplie r = 0. 7 5
N on e, mu lt iplie r = 1
V er y h ig h, m u ltip li e r = 0.72
N orm al, m ultip lier = 1
2 95 p er son- m o nths
©Ian Sommerville 2004
7 30 p er son- m o nths
Software Engineering, 7th edition. Chapter 26
Slide 17
Project planning


Algorithmic cost models provide a basis for
project planning as they allow alternative
strategies to be compared.
Embedded spacecraft system
•
•
•

Must be reliable;
Must minimise weight (number of chips);
Multipliers on reliability and computer constraints > 1.
Cost components
•
•
•
Target hardware;
Development platform;
Development effort.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 18
Management options
A. Use e xist ing har d w ar e ,
de v elopment syst em and
developme nt tea m
B. Pr ocessor and
m emor y upg
C. Mem ory
r ade
Har d w ar e cost incr ease
Exper ienc e decr
ease
upg rade onl y
D. Mor e
e xperienced sta f
f
Har d w ar e cost
incr ease
E. Ne w de velopment
F. Sta f f wit h
system
har dw ar e e xperience
Har d w ar e cost incr ease
Exper ienc e decr
©Ian Sommerville 2004
ease
Software Engineering, 7th edition. Chapter 26
Slide 19
Management option costs
O ption
R E LY
S T OR
T IME
T O OL S
L T EX
A
1 .3 9
1 .0 6
1 .1 1
0 .8 6
1
63
B
1 .3 9
1
1
1 .1 2
1 .2 2
C
1 .3 9
1
1 .1 1
0 .8 6
D
1 .3 9
1 .0 6
1 .1 1
E
1 .3 9
1
F
1 .3 9
1
©Ian Sommerville 2004
T otal effor t S of tw a re co st
T otal co st
9 49 39 3
H ar dwa re
co st
1 00 00 0
88
1 31 35 50
1 20 00 0
1 40 20 25
1
60
8 95 65 3
1 05 00 0
1 00 06 53
0 .8 6
0 .8 4
51
7 69 00 8
1 00 00 0
8 97 49 0
1
0 .7 2
1 .2 2
56
8 44 42 5
2 20 00 0
1 04 41 59
1
1 .1 2
0 .8 4
57
8 51 18 0
1 20 00 0
1 00 27 06
Software Engineering, 7th edition. Chapter 26
1 04 93 93
Slide 20
Option choice

Option D (use more experienced staff)
appears to be the best alternative
•


However, it has a high associated risk as
experienced staff may be difficult to find.
Option C (upgrade memory) has a lower cost
saving but very low risk.
Overall, the model reveals the importance of
staff experience in software development.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 21
Key points




Different techniques of cost estimation should be used
when estimating costs.
The COCOMO model takes project, product, personnel
and hardware attributes into account when predicting
effort required.
Algorithmic cost models support quantitative option
analysis as they allow the costs of different options to
be compared.
The time to complete a project is not proportional to the
number of people working on the project.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 26
Slide 22