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

The preface

As we all know, software project management includes project initialization, project planning, project execution control and project closure these four modules. Among them, the project plan includes scope plan, cost plan, time plan and other 9 big plans.

In today’s article, we will take you to understand the cost plan in the project plan.

Ding, start learning ~đŸŽ©

I. Definition of cost estimation

  • Cost estimation is the core of cost management. It is the process of predicting the total amount of work needed to develop a software system.

  • Software project cost refers to the amount of work and corresponding cost spent during software development.

  • Cost estimates should be based on the cost of software project management, analysis, design, programming, testing, etc.

  • Cost estimation extends throughout the lifecycle of the software.

Two, the basic concept of estimation

1. About estimation

  • The estimate is not very accurate, there will be errors;
  • Project experience data is very important;
  • Don’t get too attached to certain mathematical models.

2. Software project scale

  • Software project scale is workload;
  • For example: software planning, software management, requirements, design, coding, testing, and later maintenance tasks.

3. Software scale unit

  • LOC(Line of Code) → measure the length of source Code;
  • FP(Function Point) → Measure the number of functions of the system;
  • One month;
  • People are naturally;
  • One year.

4. Software project cost

  • The cost to complete the software scale;
  • The funds needed for the software project to be developed;
  • The cost of human labor consumption is the main cost of software products.

5. Cost unit

Cost units are usually various monetary units, such as:

  • Yuan yuan
  • The dollar
  • The pound

6. The relationship between software scale and software cost

  • Scale is the main factor of cost and the basis of cost estimation.
  • Scale determines the cost.

7. Cost estimation results

Direct costs: costs related to specific projects (e.g., personnel salaries, material costs, outsourcing costs, etc.)

Indirect costs: costs that can be allocated to specific items (e.g., training, rent, utilities, employee benefits, marketing, management, etc.)

3. Cost estimation process

1. Estimate the input

Requirements, resource requirements, resource consumption rate, schedule planning, historical project data, learning curve, etc

2. Estimation processing

Adopt a certain estimation method, including direct and indirect cost estimation.

3. Estimate the output

The cost of all resources required for the project needs to be estimated, either in brief or in detail.

Iv. Cost estimation method

1. Line of code estimation

(1) Definition

  • Define project size in terms of software volume.
  • It depends on the specific programming language.
  • The decomposition is detailed enough.
  • There is some empirical data (analogies and empirical methods).

(2) Advantages of line of code estimation

Code is the “product” that all software development projects have, and lines of code are easy to count.

(3) Disadvantages of line of code estimation

  • There is no accepted standard definition of acceptable lines of code.
  • The number of lines of code depends on the programming language and individual programming style.
  • It is difficult to accurately estimate code volume early in the project when requirements are unstable, design is immature, and implementation is uncertain.
  • Lines of code emphasize the coding effort and are only part of the project implementation phase.

2. Function Point Estimation (key point)

(1) Definition

  • Regardless of the language or technology of the implementation;
  • Measure the scale of a system by its number of functions;
  • Function points are evaluated, weighted, and quantified.

(2) Function point formula

  • FP = UFC * TCF
  • UFC: Function point count is not adjusted
  • TCF: Technology complexity factor

(3) UFC- Not adjusted function point count

From the perspective of processing logic, UFC can be divided into five function counts. Respectively is:

  • External input
  • External output
  • External query
  • External interface file
  • Internal logic file

We’ll go into details based on these five functional counts.

(4) Description of function count items

1) External Inputs:EI

Items that provide application-oriented data to software (screens, forms, dialogs, controls, files, etc.); In this process, data crosses an external boundary into the system. As shown below:

2) External Outputs (External Outputs:EO)

Provides the user with (processed) application-oriented information, such as reports and error messages. As shown below:

3) External Inquiry (EQ)

An external query is an input that leads to an immediate simple output, with no processing. As shown below:

4) External Interface Files :EIF’s

A logically related set of data that can be identified by the user and can only be referenced. Use these interfaces to transmit information to another system. As shown below:

5) Internal Logical Files:ILF’s

A set of logically relevant data that can be identified by the user, that exists entirely within the boundaries of the application and is maintained through external inputs, is the number of logical master files. As shown below:

(5) Complexity level of function count items

The complexity level of function count items is given below, as shown in the figure below:

(6) UFC computing examples

Let’s use an example to illustrate.

The demand assessment of a foreign trade order project is as follows:

External input: 3 items; External output: 1 item; External query: 1 item; External interface file: 1 item; Internal logical files: 2 items. Please calculate the UFC of the item.

Their complexity is shown in the table below:

The function point
item simple general complex
External input 2 * 3 1 * 4 0 * 6
External output 0 * 4 0 * 5 1 * 7
External query 0 * 3 1 * 4 0 * 6
External interface file 0 * 5 1 * 7 0 * 10
Internal logic file 1 * 7 1 * 10 0 * 15
A total of 13 25 7
UFC 45

(7) TCF- Technology complexity factor

TCF = 0.65 + 0.01(sum(Fi)), where Fi is the technical complexity factor and its range is 0-5, TCF is 0.65-1.35.

Fi technology complexity factor has 14 items, as shown in the following table:

Technology complexity factor
F1 Reliable backup and restore F2 Data communication
F3 Distributed function F4 performance
F5 Heavily used configurations F6 On line data entry
F7 Simplicity of operation F8 Online upgrade
F9 The complex interface F10 Complex data processing
F11 reusability F12 Easy installation type
F13 Multiple sites F14 Easy to modify

The value range of technology complexity factor is shown in the following table:

Adjust the coefficient of describe
0 Nonexistent or having no effect
1 No significant effect
2 Considerable influence
3 Average influence
4 Significant influence
5 Powerful influence

(8) TCF instance

Similarly, we use the example of foreign trade order items to calculate TCF. Assuming that the influence values of the 14 complexity factors are average, the function points of the project are calculated.

45 the UFC (1) the UFC = = 45 the UFC = 45

(2) = 0.65 + 0.01 TCF 14 ∗ (3) = 0.65 + 0.01 = 1.07 TCF (14 * 3) = 0.65 + 0.01 = 1.07 TCF 14 ∗ (3) = 1.07

(3) FP = the UFC ∗ TCF = 45 ∗ = 48 FP = 1.07 the UFC * 45 * 1.07 = 48 FP TCF = = the UFC ∗ TCF 45 ∗ = 1.07 = 48

④ If PE=15 ∗15=720 man-hours, Effort=48∗15=720 man-hours. If PE=15 man-hours/function point, Effort=48∗15=720 man-hours

(9) Conversion between function points and lines of code

language Lines of code/FP
Assembly 320
C 150
COBOL 105
FORTRAN 105
PASCAL 91
ADA 71
PL/1 65
PROLOG/LISP 64
SMALLTALK 21
SPREADSHEET 6

3. Use Case Point Estimation (key point)

(1) Legend

The use-case model is shown below:

(2) Basic steps

The basic steps of the use-case point estimation method are:

  • Calculate the unadjustedThe weight of the role UAW ;
  • Calculate the unadjustedUse case weights UUCW ;
  • To calculateUnadjusted use case points UUCP ;
  • To calculatetechnologyandThe environmentfactorTCF 撌 ECF ;
  • To calculateAdjust the use case points UCP ;
  • To calculateThe workload ( Man - hours).

The following will be introduced according to these contents.

(3) Calculate the weights of unadjusted UAW roles

UAW=∑C=caWeight(C)×aCardinality(C)UAW=∑_{C= C}aWeight(C)×aCardinality(C)UAW=∑C=caWeight(C)×aCardinality(C)

The Actor weight definition table is given as follows:

The serial number Complexity level Complexity standard A weight
1 simple Roles interact with the system through apis 1
2 average Roles interact with the system through protocols 2
3 complex The user interacts with the system through the GUI 3

(4) Calculate the weight UUCW of unadjusted use cases

Formula: Uucw=∑C=cuWeight(C)×uCardinality(C)Uucw=∑_{C= C}uWeight(C)×uCardinality(C)Uucw=∑C=cuWeight(C)×uCardinality(C)

The Use Case weight definition table is given below, as shown below:

The serial number Complexity level Number of transactions/scenarios A weight
1 simple 1-3 5
2 average 4 to 7 10
3 complex > 7 15

(5) Calculate the unadjusted use-case point UUCP

Formula: UUCP=UAW+UUCWUUCP=UAW+UUCWUUCP=UAW+UUCW Such as:

Table 1: Actor weights

The serial number Complexity level A weight Number of participating roles UAWi
1 simple 1 2 2
2 average 2 4 8
3 complex 3 5 15

Table 2: Use Case weights

The serial number Complexity level A weight Use cases UUCWi
1 simple 5 5 25
2 average 10 2 20
3 complex 15 3 45

(6) Calculate the technical factor TCF

TCF=0.6+(0.01×\sum_\limits{I =1}^{13})TCF_ Weighti×ValueiWeight_i×Value_iWeighti×Valuei

Assume that the complexity factor for an existing project is shown in the following diagram:

The serial number Technical factors instructions A weight
1 TCF1 Distributed system 2.0
2 TCF2 The performance requirements 1.0
3 TCF3 End-user efficiency 1.0
4 TCF4 Internal processing complexity 1.0
5 TCF5 Reuse degree 1.0
6 TCF6 Easy to install 0.5
7 TCF7 Easy to use system 0.5
8 TCF8 portability 2.0
9 TCF9 System is easy to modify 1.0
10 TCF10 concurrency 1.0
11 TCF11 Security Features 1.0
12 TCF12 Provides direct system direct system access for third party systems 1.0
13 TCF13 Special user training facilities 1.0

The specific TCF value is:


T C F = 0.6 + 0.01 x ( 2.0 x 3 + 1.0 x 5 + 1.0 x 3 + 1.0 x 5 + 1.0 x 0 + 0.5 x 3 + 0.5 x 5 + 2.0 x 3 + 1.0 x 5 + 1.0 x 3 + 1.0 x 5 + 1.0 x 0 + 1.0 x 0 ) = 1.02 TCF = 0.6 + 0.01 x (2.0 x 1.0 x 5 + 3 + 1.0 * 3 + 1.0 * 5 * 0 + 0.5 * 3 + 0.5 + 1.0 * 5 + 2.0 * 3 * 3 + 5 + 1.0 + 1.0 + 1.0 x 1.0 x 5 0 + 1.0 x 0) = 1.02

Where, the adjustment coefficient is the given value.

(7) Calculate the environmental factor ECF

ECF=1.4+(-0.03×\sum_\limits{I =1}^{8}TCF_ Weighti×Valuei)Weight_i×Value_i)Weighti×Valuei)

Assume that the environmental factors of an existing project are shown in the following table:

The serial number Environmental factors instructions A weight
1 ECF1 UML Proficiency 1.5
2 ECF2 System application experience 0.5
3 ECF3 Object-oriented experience 1.0
4 ECF4 System Analyst capability 0.5
5 ECF5 Team morale 1.0
6 ECF6 Demand stability 2.0
7 ECF7 The proportion of part-time workers 1.0
8 ECF8 Programming language difficulty 1.0

Assuming that the adjustment coefficient is given, the specific ECF value is:


E C F = 1.4 + ( 0.03 x ( 1.5 x 3 + 0.5 x 3 + 1.0 x 3 + 0.5 x 5 + 1.0 x 3 + 2.0 x 3 + 1.0 x 0 + 1.0 x 0 ) ) = 0.785 ECF = 1.4 + (0.03 x (1.5 * 3 * 3 + 1.0 + 0.5 * 3 + 1.0 + 0.5 x 5 x 3 x 3 + 1.0 + 2.0 * 0 + 1.0 * 0)) = 0.785

(8) Calculate adjusted use-case point UCP

Formula: UCP=UUCP×TCF×ECFUCP=UUCP×TCF×ECFUCP=UUCP×TCF×ECF.

According to the results given above, Then UCP=UUCP×TCF×ECF=115×1.02×0.785=92UCP =UUCP×TCF×ECF=115×1.02×0.785=92UCP =UUCP×TCF×ECF=115×1.02×0.785=92.

(9) Calculate the workload

Formula: Effort=UCP x PEEffort=UCP x PEEffort=UCP x PE.

Based on the above data, assume PE=20 man-hours/use-case points. So: Effort=UCP×PE=92×20=1840 man-days =230 man-days Effort=UCP×PE=92×20=1840 man-days =230 man-days

4. Analog (top-down) estimation

(1) Definition

For analogical estimation, the estimator calculates the total cost (or effort) of the software to be developed based on the total cost (or effort) used to complete similar projects in the past, and then allocates it proportionally to each development task unit.

It’s a form of top-down estimation.

(2) When to use it

  • Have similar historical project data;
  • When there is insufficient information (e.g. market bidding);
  • When you don’t want a very precise estimate.

(3) Examples of subjective judgment

Suppose you want to develop a stock exchange website that has similar requirements to a typical web project and a history of $100,000. So, using an analogy estimate, it’s also a development cost of $100,000.

5. Bottom-up estimation

(1) Definition

Using the Task Breakdown Diagram (WBS), perform detailed cost estimates for individual toolkits and then sum the results to get the total project cost. As shown below:

As you can see, on the bottom left are some estimates, bottom-up principles, and on the top right are the results of the estimates.

(2) Features

  • Relatively accurate, its accuracy comes from the estimation of each task.
  • Take time.

6. Parameter Model Estimation (emphasis)

(1) Definition

A method of estimating (scale) costs using parametric models.

(2) Conditions of use

The conditions for using the model are as follows:

  • Have a good project data base;
  • Mature project estimation models exist.

(3) Features

  • It’s simpler, and it’s more accurate.
  • If the model is chosen improperly or the data is inaccurate, it can also lead to bias.

(4) Parameter model: scale (cost) model

1) LoC-driven

  • Walston – Felix (IBM) : E = 5.2 ∗ (KLOC) Walston – Felix (IBM) : E = 5.2 * (KLOC) Walston – Felix (IBM) : E = 5.2 ∗ (KLOC) ^ 0.91 ⭐ ⭐ ⭐
  • Balley – Basili: E = 5.5 + 0.73 ∗ (KLOC) Balley – Basili: E = 5.5 + 0.73 * (KLOC) Balley – Basili: E = 5.5 + 0.73 ∗ (KLOC) ^ 1.16
  • Basic COCOMO: E = 3.2 ∗ (KLOC) basic COCOMO: E = 3.2 * (KLOC) basic COCOMO: E = 3.2 ∗ (KLOC) ^ 1.05 ⭐ ⭐ ⭐
  • Doty: E = 5.288 ∗ (KLOC) Doty: E = 5.288 * (KLOC) Doty: E = 5.288 ∗ (KLOC) ^ 1.047

2) FP-driven


  • A l b r e c h t a n d G a f f n e y : E = 12.39 + 0.0545 F P Albrecht and Gaffney, E = 12.39 + 0.0545 FP

  • M a t s o n . B a r n e t t : E = 585.7 + 15.12 F P Matson, Barnett: E = 585.7 + 15.12 FP

3) Overall formula

The overall formula is: E= A +b∗SCE= A + B *S^CE= A +b∗SC

E: Workload expressed in person-months

A, B, C: Empirically derived coefficients

S: Main input parameters (usually LOC, FP, etc.)

7. Expert Estimation method (key point)

(1) Definition

Cost estimates by multiple experts, one expert may be biased, it is best to have multiple experts estimate, get multiple estimates, and come up with a comprehensive estimate.

(2) Expert estimation method — Delphi

  • The organizers identify experts who do not meet each other;
  • The organizer sent each expert a software specification;
  • Experts anonymously give the estimated value of three scales for the software;
    • Minimum aia_iai
    • Most likely mim_imi
    • The biggest bib_ibi
  • Organizers to calculate each specialist Ei = + 4 mi + bi (ai) / 6 e_i = 4 m_i (a_i + + b_i) / 6 Ei = + 4 mi + bi (ai) / 6.
  • If the difference in the estimates of the various experts is beyond the specified range (e.g., 15%), the above process should be repeated;
  • Ultimately, a software scale that most experts agree on can be achieved:
    E = ( E 1 + E 2 + E n ) / n E = (E_2 E_1 + +… E_n)/n
    (N: saidNAn expert).

Five, cost budget

1. Definition of cost budget

  • Cost budgeting is to apportion the total cost of a project to each unit of work according to the progress of the project
  • The purpose of a cost budget is to produce a cost baseline

2. Project cost budget

The allocation of project cost budget includes three scenarios:

  • Assign resource costs to tasks
  • Assign fixed resource costs to tasks
  • Assign fixed costs to tasks

The following three cases are introduced one by one.

(1) Allocate resource costs to tasks

  • Tied to the base rate of the resource
  • Setting resource Rates
    • The standard rate
    • Work overtime rates
    • Rate per use
    • .

(2) Allocation of fixed resource costs

  • When a project’s resources require a fixed amount of money, a fixed resource cost can be assigned to a task.
  • For example: the cost of a part-time employee in a project.

(3) Allocation of fixed costs

  • Some tasks are fixed-cost types of tasks, that is, managers know that the cost of a task remains the same regardless of how long the task takes or what resources the task uses. In this case, the manager can assign costs directly to the task.
  • For example, an outsourcing task or training task.

Sixth, concluding remarks

In the above article, we explained the basic concepts of cost estimation in software projects and seven methods of cost estimation. At the same time, we also have a brief understanding of the cost budget.

So much for cost planning in software projects! Do not know whether it is helpful to small friends?

đŸ›” column through train

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