This is the 28th day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

The preface

In the software project cost plan, there is a more important link is cost estimation. In the following article, we will introduce two cost estimation models: the Walston-Felix model and the COCOMO ⅱ model.

Let’s start with the explanation of this article

I. Walston-Felix model

Formula 1.

In 1977, Walston and Felix of IBM proposed the following estimation formula:

  • E = 5.2×(KLOC)0.91, KLOC is the number of lines of source code, E is the amount of work (in PM)
  • D = 4.1×(KLOC)0.36, D is project duration (in months)
  • S = 0.54×E0.6, S is personnel requirement (in person)
  • DOC = 49×(KLOC)1.01, DOC is the number of documents (in pages)

2. For example

Suppose you have a project that is done in the Java language. The project is estimated to have 366 function points, so

  • L = 366×46 = 16386 row = 16.386 KLOC
  • E = 5.2×(KLOC)0.91 = 5.2×16.3860.91 = 66 person-months
  • DOC =49× (KLOC)1.01 =49× 16.3861.01 = 826 pages

COCOMO Model (Constructive Cost Model)

1. Model definition

  • Structured cost model
  • It is the most widely used parametric software cost estimation model
  • byBarry Boehmteam-developed

2. Development of COCOMO model

COCOMO model has been developed twice, which are:

  • COCOMO 81
  • COCOMO Ⅱ

3. COCOMO fundamentals

The workload is expressed as a function of KLOC software scale and a series of cost factors, and the basic estimation formula is:

PM = A * SE * ∏ I = 1 nemi \ prod_ {I = 1} EM ^ ^ n I ∏ nemi I = 1

A is A constant that can be calibrated;

S is KLOC software scale;

E is the scale index, indicating the relative economies of scale and diseconomies of software of different scales.

EM is the workload multiplier, reflecting the impact of a project feature on the workload required to complete the project development;

N is the number of cost drivers that describe the characteristics of software projects.

Third, COCOMO 81

1. Model level

The model level has three levels, which are:

level The characteristics of
Basic COCOMO Static univariate model
Medium COCOMO Based on the basic model, the influencing factors are considered and the model is adjusted
Senior COCOMO The medium COCOMO model is based on the consideration of the impact of each step

2. Project type

There are three types of project types:

type The characteristics of
Organic Organic Various applications, such as data processing, scientific computing, etc
Constrained by the hardware is relatively small, the scale of the program is not very large
Embedded Embedded Constrained by the hardware is relatively small, the scale of the program is not very large
Closely linked hardware, software and operating constraints run under arbitrary software scale
Half organic Semidetached A variety of utilities that fall in between, such as compilers.
Medium size and complexity or higher

3. Basic COCOMO – 81

(1) Formula

E= a × (KLOC)b, where:

  • E: Workload (person-month)
  • KLOC: is the delivered line of code
  • A, B: Coefficients that depend on the nature of the project

(2) Coefficient table

way a b
organic 2.4 1.05
Half of organic 3.0 1.12
The embedded 3.6 1.2

(3) For example

Suppose you now have a software development project of 33.3kloc, a mid-sized, semi-productive model, developed using basic COCOMO. Please calculate E.

A =3.0 b=1.12

Therefore, the final E = 3.0 × L 1.12 = 3.0 × 33.3 1.12 = 152 PM

4. Medium COCOMO – 81

(1) Formula

E= a × (KLOC)b × multiplication factor, where:

  • A and b are coefficients
  • The multiplication factor is the correction coefficient of the formula

(2) Coefficient table

way a b
organic 2.8 1.05
Half of organic 3.0 1.12
The embedded 3.2 1.2

(3) Cost-driven attribute of multiplication factor

There are four types:

  • Product attributes → 1 software reliability, 2 software complexity, 3 database size
  • Platform attributes → (4) program execution time, (5) program memory, (6) software development environment changes, (7) software development environment response speed
  • ⑧ Analyst competence, ⑨ programmer competence, ⑩ application domain experience, ⑩ development environment experience, ⑩ programming language experience
  • Process attributes → ⑩③ capability of software development methods, ⑩④ quality and quantity of software tools, ⑩⑤ schedule requirements of software development

(4) The value of multiplication factor

There are 15 elements in the above four attributes, and the regulating factor of each element is Fi (I =1,2… Where, the value of Fi is:

Very low, low, normal, high, very high, very high. Normally, Fi=1.

The Fi values recommended by Boehm were :(0.70, 0.85, 1.00, 1.15, 1.30, 1.65).

But the actual values are shown in the following table:

1- Medium COCOMO 81

When the 15 Fi values are selected, the multiplicative factor EAF can be calculated as: EAF=F1 × F2 ×… X were determined.

The definition of a subset of regulatory factors and the value of regulatory factors are determined by statistical results and experience. Different software development organizations, at different times in history, and as the environment changes, this data may change.

(5) Examples

There is an existing software development project of 33.3kloc, which is a medium-size, semi-owned project developed using a medium-size COCOMO model. And the multiplicative factor of this item is 0.70 × 0.85 × 1 ×… × 1.15 = 1.09, please calculate E value.

A =3.0, b=1.12;

The multiplication factor is 0.70 × 0.85 × 1 ×… × 1.15 = 1.09;

Therefore, the final E = 3.0 × L 1.12 = 3.0 × 33.3 1.12 × 1.09 = 166 PM

5. Advanced (detailed) COCOMO

(1) Definition

  • Decompose the project into a series of subsystems or submodels
  • Fine-tune the attributes of a model more precisely

(2) Workload multiplier

The following table shows an example of stage differences in advanced COCOMO 81 workload multipliers, as follows:

Cost drivers Development phase Rating levels
Very low Low Norminal High Very high Extra high
RPD(requirement and product design) 1.40 1.20 1.00 0.87 0.75
AEXP DD(detailed design) 1.30 1.15 1.00 0.90 0.80
CUT(code and unit test) 1.25 1.10 1.00 0.92 0.85
IT(integration and test) 1.25 1.10 1.00 0.92 0.85

Four, COCOMO Ⅱ

1. Three stages of project estimation in COCOMO ⅱ model

model phase time Function Description (What to do at this stage)
Application Composition The planning stage Early, determine the system performance (1) usingApplication of pointApplication point to estimate the scale; ② Use prototypes to solve high risk problems.
Early Design Model The design phase When the requirements are stable and the architecture is established ① Explore alternative architectures and concepts; (2) withThe function pointFuntion Point to estimate the size.
Post Architecture The development phase When the software is being constructed, it knows more about the system (1) toFP, LOCAs a unit of estimate.

Supplementary notes applied knowledge:

Application points, that is, object points. An indirect software measurement whose calculation requires the use of the following three elements:

  • Screens on the user interface.
  • Reports;
  • Number of components that may be required to build the application 3GLcomponents.

2. Calculation based on COCOMO ⅱ

(1) Basic model

The formula of the basic model is: E=bSCm(X)

(2) Object point calculation

In the application assembly phase, object points are calculated:

  • ① Calculate the number of screens, reports and components;
  • ② To each object point, according to the simple, medium, difficult three levels of classification;
  • (3) Get the complexity weights of the object points corresponding to the simple, medium and difficult types;
  • (4) Calculate object point OP, namely ∑(three calculated values × weighting factor);
  • ⑤ If the object point of **r%** is from the reuse of the previous project, then the new object point is: NOP=OP× 100− R100 \ FRAc {100-R}{100}100100− R, that is, NOP=OP×(1-reuse degree);
  • ⑥ Look up the table to get the value of productivity parameter PROD;
  • ⑦ Workload E=NOP/PROD;
  • (8) Give a historical data: labor price (yuan /PM);
  • ⑨ Cost =E× labor price.

The specific numerical table of object point and PROD is given below:

Graph complexity weighting of objects of different types

Complexity weighting
Object type simple medium difficult
The screen 1 2 3
The report 2 5 8
3 gl artifacts 10

Graph different levels of developer experience and productivity at different levels of development environment maturity

factors impact
Developer experience/competence Very low low normal high Very high
Environmental maturity/capability Very low low normal high Very high
PROD 4 7 13 25 50

(3) Case calculation

Question:

The COCOMO II model is used to estimate the amount of work and labor cost required to construct a simple ATM software (unit: person-month and yuan, respectively). The software produces 11 screens (3 simple, 3 medium, 5 difficult), 10 reports (4 simple, 6 difficult), 72 components, and the reuse degree is 20%. Assume that the developer’s experience capacity is high, the environment’s maturity capacity is low, and the labor price is 5000 yuan /PM. Then what are NOP, productivity capacity PROD, workload E and labor cost C respectively? Write down the calculation formula and the calculation process.

Answer:

V. Concluding remarks

Here we have explained two cost estimation models in project management. One is the Walaton-Felix model and the other is the COCOMO ⅱ model.

This is the end of the introduction to this article! Hope to help you ~

If you think this article is helpful to you, you might as well like to support yo ~~😉

🛵 column through train

Software Project Management 👉juejin.cn/column/7024…