An estimate of the effort and the time is needed before the project begins. The Constructive Cost Model, COCOMO, proposed by Barry Boehm, turns the size into effort and duration.
Basic COCOMO
The Basic COCOMO model estimates the effort E in person-months and the development time T in months from the size in KLOC: E = a × (KLOC) to the power b, and T = c × E to the power d. Projects are of three modes. An organic project is a small team working on a familiar problem with flexible requirements. A semi-detached project has a team of mixed experience and medium size. An embedded project works under strong hardware and operational limits. The average staff is E / T, and the productivity is KLOC / E.
Definition: COCOMO. A family of algorithmic models that estimate software effort and development time as a function of program size and cost drivers.
Intermediate COCOMO
The Intermediate COCOMO model includes fifteen cost drivers for the product, the computer, the personnel and the project, such as required reliability, complexity, analyst capability and use of tools. Each driver has a rating, which gives an effort multiplier. The product of all the multipliers is the effort adjustment factor (EAF). The nominal effort is E = a × (KLOC) to the power b, with a = 3.2, 3.0 and 2.8 for organic, semi-detached and embedded modes, and b = 1.05, 1.12 and 1.20. The final effort is E × EAF.
Detailed COCOMO and Use
The Detailed COCOMO model applies the cost drivers in each phase, and treats the system as modules, which gives a more accurate estimate but requires more work. COCOMO II is a later model that suits modern practice, such as reuse and rapid development. Whatever the model, an estimate is uncertain, and it should be revised as more is known.
Table 2.7: Basic COCOMO constants
| Mode | a | b | c | d |
|---|---|---|---|---|
| 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 |
Example 2.7: Basic COCOMO for a semi-detached project
Problem: Estimate the effort, development time and average staff for a semi-detached project of 50 KLOC.
Solution:
- E = 3.0 × 50 to the power 1.12 = 3.0 × 79.9 = 239.7 person-months.
- T = 2.5 × 239.7 to the power 0.35 = 2.5 × 6.85 = 17.1 months.
- Average staff = E / T = 239.7 / 17.1 = 14.
Result: About 240 person-months over 17 months, with a team of about 14 people.
kloc = 50
E = 3.0 * kloc ** 1.12
T = 2.5 * E ** 0.35
print(round(E, 1), round(T, 1), round(E / T, 1))
eaf = 1.15 * 0.91 * 1.08
print(round(3.0 * kloc ** 1.12 * eaf, 1))
Output
239.9 17.0 14.1
271.1
Common mistakes
- Using the constants of the wrong mode.
- Treating an estimate as an exact figure.
- Forgetting to multiply by the EAF in the Intermediate model.
Key takeaways
- Basic COCOMO: E = a (KLOC) to the power b and T = c E to the power d.
- The modes are organic, semi-detached and embedded.
- Intermediate COCOMO multiplies the effort by the EAF of 15 cost drivers.
- Average staff = E / T.
Practice questions
- Name the three modes of COCOMO.
- What is the EAF?
- Write the Basic COCOMO equation for effort.
Answers to the practice questions
- Organic, semi-detached and embedded.
- The product of the effort multipliers of the cost drivers in Intermediate COCOMO.
- E = a × (KLOC) to the power b.
Sources
- Official BCA syllabus Advanced Software Engineering, course code 25BCA405DS01, Unit II
