You are on page 1of 44

# COCOMO Models

Ognian Kabranov

SEG 3300A

.L. Probert

1

Project Management and Mr.
Murphy
1 Logic is a systematic method of coming to the
Mr.conclusion
Murphy with
wasconfidence.
an optimist
wrong
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.
SEG 3300A

.L. Probert

2

SEG 3300A

.L. Probert

3

Motivation
The software cost estimation provides:
• the vital link between the general concepts and
techniques of economic analysis and the
particular world of software engineering.
• Software cost estimation techniques also provides
an essential part of the foundation for good
software management.

SEG 3300A

.L. Probert

4

Probert 5 . 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) SEG 3300A .L.Cost of a project • The cost in a project is due to: – due the requirements for software.

) • the cost of the project depends on the nature and characteristics of the project. at any point.Cost of a project (. the accuracy of the estimate will depend on the amount of reliable information we have about the final product.L. SEG 3300A . Probert 6 .

Probert 7 .Software Cost Estimation SEG 3300A .L.

It • The COCOMO model predicts the effort and duration of a project based on inputs relating to the size of the resulting systems and a number of "cost drives" that affect productivity.Introduction to COCOMO models • The COstructive COst Model (COCOMO) is the most widely used software estimation model in the world.L. Probert 8 . SEG 3300A .

SEG 3300A .L. Probert 9 . • C = a constant.Effort • Effort Equation – PM = C * (KDSI)n (person-months) • where PM = number of person-month (=152 working hours). • KDSI = thousands of "delivered source instructions" (DSI) and • n = a constant.

Productivity • Productivity equation – (DSI) / (PM) • where PM = number of person-month (=152 working hours). • DSI = "delivered source instructions" SEG 3300A . Probert 10 .L.

Schedule • Schedule equation – TDEV = C * (PM)n (months) • where TDEV = number of months estimated for software development. Probert 11 .L. SEG 3300A .

Average Staffing • Average Staffing Equation – (PM) / (TDEV) (FSP) • where FSP means Full-time-equivalent Software Personnel. SEG 3300A . Probert 12 .L.

and make more accurate estimates. – the Intermediate model.L. SEG 3300A . • The more complex models account for more factors that influence software projects. Probert 13 .COCOMO Models • COCOMO is defined in terms of three different models: – the Basic model. and – the Detailed model.

The product is relatively small. • Semidetached Mode: The project's characteristics are intermediate between Organic and Embedded. stable environment.L. SEG 3300A . and requires little innovation.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. Probert 14 . and the product is similar to previously developed products.

L. SEG 3300A .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. An embedded mode project will require a great deal of innovation. Probert 15 . inflexible constraints and interface requirements.

Modes Feature Organic Semidetached Embedded Organizational understanding of product and objectives Experience in working with related software systems Thorough Considerable General Extensive Considerable Moderate Need for software conformance with pre-established requirements Basic Considerable Full Need for software conformance with external interface specifications Basic Considerable Full SEG 3300A . Probert 16 .L.

algorithms Premium on early completion Product size range SEG 3300A Organic Semidetached Embedded Some Moderate Extensive Minimal Some Considerable Low Medium High <50 KDSI <300KDSI . Probert All 17 .Modes (.) Feature Concurrent development of associated new hardware and operational procedures Need for innovative data processing architectures.L.

Cost Estimation Process Cost=SizeOfTheProject x Productivity SEG 3300A .L. Probert 18 .

L. Probert 19 .Cost Estimation Process Effort Size Table Lines of Code Development Time Estimation Process Number of Personnel Number of Use Case Errors Function Point SEG 3300A .

classes. Probert 20 . case statements) summed over each routine or method Lines of Code. summed over each routine or method SEG 3300A . master) Total number of components (subsystems. routines. internal.L. modules. methods) Total number of interfaces Number of System Integration Test Cases Number of input and output parameters (summed over each interface) Number of Designer Unit Test Cases Number of decisions (if. procedures.Project Size .Metrics 1 2 3 4 5 6 7 8 9 10 11 12 13 Number of functional requirements Cumulative number of functional and non-functional requirements Number of Customer Test Cases Number of ‘typical sized’ use cases Number of inquiries Number of files accessed (external.

8.Project Size – Metrics(. 5 d High Level Design 6. Probert 21 . 11.L. 13 SEG 3300A . 7. 12 f Implementation 12. 2. 3 b Requirements Analysis 4. 9 e Detailed Design 10.) Availability of Size Estimation Metrics: Development Phase a Requirements Gathering Available Metrics 1.

Counts are made for the following categories – External inputs – those items provided by the user that describe distinct application-oriented data (such as file names and menu selections) – External outputs – those items provided to the user that generate distinct application-oriented data (such as reports and messages.L.Function Points • STEP 1: measure size in terms of the amount of functionality in a system. Function points are computed by first calculating an unadjusted function point count (UFC). Probert 22 . rather than the individual components of these) SEG 3300A .

L.Function Points(. Probert 23 .) – External inquiries – interactive inputs requiring a response – External files – machine-readable interfaces to other systems – Internal files – logical master files in the system SEG 3300A .

) • STEP 2: Multiply each number by a weight factor. The value is given by a table: SEG 3300A . associated with that number.L.Function Points(. according to complexity (simple.. average or complex) of the parameter. Probert 24 .

Function Points(.L.. Probert 25 .) • STEP 3: Calculate the total UFP (Unadjusted Function Points) • STEP 4: Calculate the total TCF (Technical Complexity Factor) by giving a value between 0 and 5 according to the importance of the following points: SEG 3300A ..

End-user Efficiency 9. Online Data Entry 7. Data Communication 2. Online Updating 8... Complex Computations 10. Reusability 11. Ease of Operation 13. Performance Criteria 4. Ease of Installation 12.) • Technical Complexity Factors: – – – – – – – – – – – – – – SEG 3300A 1.Function Points(. Distributed Data Processing 3. Heavily Utilized Hardware 5.. High Transaction Rates 6. Maintainability . Portability 14. Probert 26 .L.

..L. Probert 27 .) • STEP 5: Sum the resulting numbers too obtain DI (degree of influence) • STEP 6: TCF (Technical Complexity Factor) by given by the formula – TCF=0.Function Points(.65+0...01*DI • STEP 6: Function Points are by given by the formula – FP=UFP*TCF SEG 3300A .

L. Probert 28 .Example SEG 3300A .

Probert 29 .) SEG 3300A .Example (.L.

High Transaction Rates 3 6. Reusability 3 11. Complex Computations 0 10..) • Technical Complexity Factors: – – – – – – – – – – – – – – 1. Probert 30 . Maintainability 3 » DI =30 (Degree of Influence) SEG 3300A . Ease of Operation 5 13. Data Communication 3 2. Heavily Utilized Hardware 0 5.L.Example (. Portability 3 14. Distributed Data Processing 0 3. Ease of Installation 3 12. Performance Criteria 4 4. End-user Efficiency 3 9. Online Data Entry 3 7. Online Updating 3 8.

01*DI)= 55*(0.25 SEG 3300A .01*30)=52.65+0. Probert 31 .L.25 – That means the is FP=52.65+0.Example (…) • Function Points – FP=UFP*(0.

Relation between LOC and FP • Relationship: – LOC = Language Factor * FP – where • LOC (Lines of Code) • FP (Function Points) SEG 3300A . Probert 32 .L.

25*53=2769.L. Probert 33 .Relation between LOC and FP(.76 KLOC SEG 3300A .25 LOC or 2.) Assuming LOC’s per FP for: Java = 53. C++ = 64 aKLOC = FP * LOC_per_FP / 1000 It means for the SpellChekcer Example: (Java) LOC=52.

20 SEG 3300A .05 Semidetached 3.12 Embedded 3.Effort Computation • The Basic COCOMO model computes effort as a function of program size. Probert 34 .6 1.0 1. The Basic COCOMO equation is: – E = aKLOC^b • Effort for three modes of Basic COCOMO. Mode a b Organic 2.4 1.L.

L.Example SEG 3300A . Probert 35 .

L.12 Embedded 2.8 1.2 1. The Intermediate COCOMO equation is: – E = aKLOC^b*EAF • Effort for three modes of intermediate COCOMO.0 1.20 .Effort Computation • The intermediate COCOMO model computes effort as a function of program size and a set of cost drivers.05 Semidetached 3. Probert 36 . Mode SEG 3300A a b Organic 3.

83 Required Dev Schedule 1.00 1.00 .15 1.15 1.95 .16 Product Complexity .10 1.91 . Probert 37 .15 Analyst Capability 1.86 .30 1.00 1.66 Main Storage Constraint 1.Effort computation(.91 .65 Execution Time Constraint 1.40 Extra High 1.56 Virtual Machine Volatility .00 1.70 .75 1.85 1.87 1.00 Database Size .24 1.82 Programmers Capability 1.86 .00 .95 Modern Prog Practices 1.08 1.00 1.10 SEG 3300A .13 1.07 1.14 1.17 1.07 1.91 .00 .08 1.90 .70 Virtual machine Experience 1.42 1.00 1.04 1.11 1.00 1.94 .15 1.21 1.00 .) • Effort Adjustment Factor Cost Driver Low Nominal High Required Reliability Very Low .10 1.19 1.83 .00 1.46 1.30 1.06 1.00 1.10 1.10 1.87 1.71 Application Experience 1.71 .00 .00 .90 .00 .88 1.40 .70 .00 1.87 .94 1.L.00 1.87 .00 1.95 .82 .82 SW Tools 1.16 1.30 Comp Turn Around Time .15 Very High 1.24 1.21 1.90 Language Experience 1.29 1.30 1.82 .23 1.

Probert 38 .Effort Computation (..L.) Total EAF = Product of the selected factors Adjusted value of Effort: Adjusted Person Months: APM = (Total EAF) * PM SEG 3300A .

Example SEG 3300A . Probert 39 .L.

NP = APM / TDEV SEG 3300A .Software Development Time • Development Time Equation Parameter Table: Parameter Organic Semidetached Embedded C 2.5 D 0.35 0.5 2. Probert 40 .L.5 2.32 Development Time. TDEV = C * (APM **D) Number of Personnel.38 0.

L.Distribution of Effort • A development process typically consists of the following stages: • • • • - Requirements Analysis Design (High Level + Detailed) Implementation & Coding Testing (Unit + Integration) SEG 3300A . Probert 41 .

Distribution of Effort (.L.) The following table gives the recommended percentage distribution of Effort (APM) and TDEV for these stages: Percentage Distribution of Effort and Time Table: Req Analysis Design. HLD + DD Implementation Testing Effort 23% 29% 22% 21% 100% TDEV 39% 25% 15% 21% 100% SEG 3300A . Probert 42 .

75 Documentation 0. and bad fixes: – Adjust the Function Point calculated in step1 AFP = FP ** 1.4 .total errors found in requirements. user manuals.L.25 Implementation 1. specifications. i.Error Estimation • Calculate the estimated number of errors in your design.6 Due to Bug Fixes 0.25 – Use the following table for calculating error estimates SEG 3300A Error Type Error / AFP Requirements 1 Design 1.e. Probert 43 . code.

Probert 44 Number of personnel: NP=APM/TDEV Result NP Effort time Req APM TDEV . C++=64 KLOC=Max[aKLOC.L.l Together Design Classes*(2Function Points) DI=∑ratings of selected factors 14 TCF=0. Max[TCF]=1. bKLOC] Compute Effort: Person Month.01*∑(DI)j 1 Min[TCF]=0.25 aKLOC=FP*LOC_per_FP/1000 Compute Errors = AFP*Y Java=53.65. PM=A*(KLOC**B) EAF=Product of selected factor Factor:1-15 SEG 3300A Adjusted PM: APM=(total EAF)*PM Development Time: TDEV=C*(APM**D) .20*Num of Method LOC=18.35 Unadjusted Function Point (UFP table) TCF Modify FP=UFP*TCF LOC=13.25*Num of Method bKLOC=∑ (LOCs for all Classes)/1000 AFP=FP*1.65+0.