5-Algorithmic Models For Software Cost Estimation-02-02-2024
5-Algorithmic Models For Software Cost Estimation-02-02-2024
• Estimating Price
• There is not a simple relationship between the development cost and the price charged
to the customer.
• Broader organizational, economic, political and business considerations influence the
price charged.
Productivity Measures
• Size-related measures
• Must be based on some output from the software process
• Delivered source code
• Object code instructions
• Function-related measures
• Based on an estimate of the functionality of the delivered software.
• Function-points are the best known of this type of measure
Lines of Codes
LOC = NCLOC + CLOC
LOC: lines of code
NCLOC: non-commented line of code
CLOC: commented line of code
KLOC = one thousand of line of code
Function points
• Based on a combination of program characteristics
• external inputs and outputs
• user interactions
• external interfaces
• files used by the system
• The function point count is computed by multiplying each raw count by the
weight and summing all values
Function points (FP)
• FP is a unit of measurement to express the amount of business functionality, an
information system (as a product) provides to a user.
• Function point count modified by complexity of the project
• FPs can be used to estimate LOC depending on the average number of LOC per
FP for a given language
• FPs are very subjective
• Depend on the estimator
• FP cannot generally be counted automatically
Factors affecting productivity
Factor Description
Application domain experience Knowledge of the application domain is essential for effective
software development. Engineers who already understand a
domain are likely to be the most productive.
Process quality The development process used can have a significant effect on
productivity.
Project size The larger a project, the more time required for team
communications. Less time is available for development so
individual productivity is reduced.
Technology support Good support technology such as CASE tools, supportive
configuration management systems, etc. can improve
productivity.
Working environment A quiet working environment with private work areas
contributes to improved productivity.
Estimation techniques
• Expert judgement
• Estimation by analogy
• Parkinson’s Law
• Pricing to win
• Top-down estimation
• Bottom-up estimation
• Algorithmic cost modelling
Expert judgement
• Advantages: No overspending
• The project costs whatever the customer has to spend on it. The estimated
effort depends on the customer's budget and not on the software
functionality.
• Most models are basically similar but with different attribute values
Examples of cost models
• General form: E = A + B SC
• E: Effort cost; S: Size; A, B, C: constants
Examples:
E = 5.2 x (KLOC)0.91 Walston-Felix Model
E = 5.5 + 0.73 x (KLOC)1.16 Bailey-Basili Model
E = 3.2 x (KLOC)1.05 COCOMO Basic Model
E = 5.288 x (KLOC)1.047 Doty Model for KLOC > 9
Examples of cost models
Cost models using FP as a primary input include (Pressman, 1997):
Albrecht and Gaffney Model
E = -13.39 + 0.0545 FP
Kemerer Model
E = 60.62 x 7.728 x 10-8 FP3
Matson, Barnett, and Mellichamp model
E = 585.7 + 15.12 FP
The Constructive Cost Model (COCOMO)
• COCOMO is one of the most widely used software estimation models in the
world
• Intermediate Model
• Detailed Model
Basic Model
• Semi-detached
• Embedded
Organic Mode
• A small team of experienced programmers develop software in a very
familiar environment
• Require little Innovation
• Size range ( 0-50 KLOC)
Semi-detached mode
• An intermediate mode between the organic mode and embedded mode
• Depending on the problem at hand, the team include the mixture of
experienced and less experienced people
• Require medium Innovation
• Development environment is medium
• Size range ( 50 - 300 KLOC)
Embedded mode
• Project has tight constraints
• Hard to find experienced persons
• Require significant Innovation
• Development environment is complex
• Size range ( over 300 KLOC)
COCOMO:
Some Assumptions
• Primary cost driver is the number of Delivered Source Instructions
(DSI) / Delivered Line Of Code developed by the project
• COCOMO estimates assume that the project will enjoy good
management by both the developer and the customer
Basic COCOMO Model: Formula
The basic COCOMO equation
• E= ab (KLOC or KDSI) bb
• D= cb (E) db
• P=E/D where
• E is the effort applied in person-months,
• D is the development time in months,
• KLOC / KDSI is the estimated number of delivered lines of code for the project
(expressed in thousands)
• P is the number of people required and
• ab, bb, cb and db are coefficients given in next slide.
Contd…
Software project ab bb cb db
• Organic 2.4 1.05 2.5 0.38
• Semi-detached 3.0 1.12 2.5 0.35
• Embedded 3.6 1.20 2.5 0.32
Basic COCOMO Model: Equation
D = Cb(E)db
Organic Mode E = 2.4(400)1.05 = 1285.31 PM
D = 2.5(1285.31)0.38 =38.07 M
D = 2.5(2462.79)0.38 =38.45 M
D = 2.5(4772.81)0.32 = 37.5 M
• A project size of 200 KLOC is to be developed. Software development
team has average experience on similar type of projects. The project
schedule is not very tight. Calculate the effort, development time,
average staff size and productivity of the project
Solution
• The semi-detached mode is the most appropriate mode; keeping in view
the size, schedule and experience of the development team
The constant values a,b,c and d for the Basic Model for the different categories of system
Intermediate COCOMO
• Takes basic COCOMO as starting point
• Identifies personnel, product, computer and project attributes which
affect cost
• Multiplies basic cost by attribute multipliers which may increase or
decrease costs
Effort Multipliers
• The Putnam model describes the time and effort required to finish a
software project of specified size.
• Putnam used his observations about productivity levels to derive the software equation:
Where:
• Productivity is the Process Productivity, the ability of a particular software organization to produce software
of a given size at a particular defect rate.
56
Contd…
• It was primarily developed to handle military software projects,
but now also includes rating levels to cover business
applications.
• PRICE S also provides a wide range of useful outputs on gross
phase and activity distributions analyses, and monthly project
cost-schedule-expected progress forecasts.
• Price S uses a two-parameter beta distribution rather than a
Rayleigh curve to calculate development effort distribution
versus calendar time.
Contd…
58
Growth
59
Enhancement
60
Maintenance
62
Doty model
• This model is the result of an extensive data analysis activity,
including many of the data points from the SDC sample.
63
• To estimate the effort for the number of lines of code
as in the following equation:
64
• This model has a much more appropriate functional form than the SDC
model, but it has some problems with stability, as it exhibits a
discontinuity at KLOC = 10, and produces widely varying estimates via
the f factors (answering "yes" to "first software developed on CPU" adds
92 percent to the estimated cost).
66
IBM federal systems division
(FSD) Model/ Walston and Flexi
• This model is developed by Walston and Flexi in 1977 by taking the
database of 60 projects from IBM Federal Systems Division (FSD) and
analyzes different features.
The major benefit of a good software cost estimation model is that it provides
a clear and consistent universe of discourse within which to address a good
many of the software engineering issues which arise throughout the software
life cycle
• Which and how many features should we put into the software product?
• Which features should we put in first?
• How much hardware should we acquire to support the software product's
development, operation, and maintenance?
• How much money and how much calendar time should we allow for
software development?
Benefits of Software Cost Estimation Technology
• How much of the product should we adapt from existing software?
• How much should we invest in tool and training?
• Software cost estimation model can help avoid misinterpretations, underestimates ,
overestimates
• In a good cost-estimation model, there is no way of reducing the estimated software cost
without changing some objectively verifiable property of the software project
• A related benefit of software cost estimation technology is that it provides a powerful set
of insights on how a software organization can improve its productivity
• Many of a software cost model's cost-driver attributes are management controllable: use
of software tools and modem programming practices, personnel capability and
experience, available computer speed, memory, and turnaround time, software reuse.
• Software cost estimation technology provides an absolutely essential foundation for
software project planning and control.
Compare the Walston-Felix Model with the SEL model on a software
development expected to involve 8 person-years of effort.
a) Calculate the number of lines of source code that can be produced.
b) Calculate the duration of the development.
c) Calculate the productivity in LOC/PY
d) Calculate the average manning
• The amount of manpower involved = 8PY=96persons-months
Then
L (SEL) = (96/1.4)1⁄0.93=94264 LOC
L (W-F) = (96/5.2)1⁄0.91=24632 LOC