COCOMO Model

The Constructive Cost Model (COCOMO) is a software development cost estimation model that was first introduced by Barry Boehm in 1981. The model is widely used in the software engineering industry as it provides an accurate estimate of the cost, effort, and duration required to complete a software project. COCOMO takes into account a variety of factors, such as project size, complexity, and development environment, to generate a detailed estimate of the resources required for a project. The model has evolved over time, with several versions being developed to address different types of software projects. Despite its limitations, COCOMO remains a valuable tool for software developers and project managers looking to estimate the cost and effort involved in their projects. Further, move on to the next sections and gather details about the Types of COCOMO Model , Classifications and COCOMO Model Examples and other useful information through this article.

Effort and Schedule are the two essential parameters that determine the quality of software products and are also the primary outcomes of COCOMO

  • Effort refers to the amount of labor required to complete a software development task and is typically measured in person months.
  • Schedule refers to the time required to complete a job, which is directly proportional to the effort invested. The schedule is measured in units of time, such as weeks and months, and is crucial for successful project management.

Together, these parameters are critical for accurate project planning and estimation, enabling software developers to optimize resources and deliver high-quality products within set timelines.

COCOMO has several models that predict cost estimates at different levels, depending on the required level of accuracy and correctness. These models are applicable to various software development projects, with the characteristics of each project determining the constant values used in subsequent calculations. The specific system type also influences these characteristics, with Boehm’s classification of organic, semi-detached, and embedded systems being particularly relevant. These classifications provide guidelines for understanding the characteristics of a software system and enable software developers to choose the appropriate COCOMO model for accurate cost estimation.

COCOMO classifies projects into three distinct types: Check out the Classification of COCOMO Model in Software Engineering from the below sections

  • Organic
  • Semi-detached
  • Embedded Systems

Organic

Organic development projects fall into the category of well-understood application programs with reasonably small development teams comprised of experienced members with similar project experience. These types of projects are typically straightforward and include simple business systems, inventory management systems, and data processing systems. Because of their relative simplicity, these projects often require less effort and time than other project types and can be completed more quickly. COCOMO classifies such projects as organic, given their relative simplicity and smaller size, making them easier to manage and develop efficiently.

Semi-detached

Semidetached development projects involve a mix of experienced and inexperienced team members who may not be familiar with all aspects of the project being developed. Examples of such projects include developing new operating systems, database management systems, and complex inventory management systems. Due to their moderate complexity and the need to manage both experienced and inexperienced team members, these projects often require more effort and time than simpler organic projects. COCOMO classifies such projects as semidetached to help developers estimate the effort and time required to complete them accurately.

Embedded Systems

Embedded development projects are characterized by strong coupling between software and complex hardware or the need to adhere to stringent operational regulations. Examples of such projects include software development for Automated Teller Machines (ATMs) and Air Traffic Control systems. Due to their high complexity and the need to interface with complex hardware, embedded projects often require significant effort and time to complete successfully. COCOMO classifies such projects as embedded to help developers accurately estimate the effort and time required for project completion.

Types of Models:

There are three distinct forms of the COCOMO model that vary in their level of detail and accuracy. Each form can be adapted to meet specific project requirements. These three types of COCOMO models are:

  • Basic COCOMO Model
  • Intermediate COCOMO Model
  • Detailed COCOMO Model

Basic COCOMO Model

The basic COCOMO model provides an estimate of project parameters based on its size. The following expressions represent the basic COCOMO estimation model:

E= a(KLOC)b
time= c(Effort)d
Person required = Effort/ time

The above formula is used for cost estimation in both the basic COCOMO model and subsequent models. The constant values a, b, c, and d are specific to the different categories of systems in the basic model:

Software Projects 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

Effort in the COCOMO model is measured in person-months and is dependent on the number of Kilo-Lines of code, as shown in the formula. Development time is measured in months. These formulas are used as-is in basic model calculations, which provide a rough estimate without taking into account other factors like expertise and reliability. The following is a C++ program for the Basic COCOMO model:

// This C++ program implements the Basic COCOMO model

#include <iostream>
#include <cmath>
using namespace std;

// Function to round off a float to the nearest integer
int roundFloatToInt(float x)
{
    int a = int(x + 0.5);
    return a;
}

// Function to calculate the parameters of Basic COCOMO
void calculateBasicCocomo(float table[][4], int n, char mode[][15], int size)
{
    float effort, time, staff;
    int model;
    
    // Determine the type of project based on its size
    if (size >= 2 && size <= 50)
        model = 0; // organic
    else if (size > 50 && size <= 300)
        model = 1; // semi-detached
    else if (size > 300)
        model = 2; // embedded
        
    cout << "The project type is: " << mode[model] << endl;
    
    // Calculate effort
    effort = table[model][0] * pow(size, table[model][1]);
    
    // Calculate time
    time = table[model][2] * pow(effort, table[model][3]);
    
    // Calculate number of staff required
    staff = effort / time;
    
    // Output the calculated values
    cout << "Effort = " << effort << " person-months" << endl;
    cout << "Development Time = " << time << " months" << endl;
    cout << "Average Staff Required = " << roundFloatToInt(staff) << " persons" << endl;
}

int main()
{
    // Table of constants for the Basic COCOMO model
    float table[3][4] = { {2.4, 1.05, 2.5, 0.38},
                          {3.0, 1.12, 2.5, 0.35},
                          {3.6, 1.20, 2.5, 0.32} };
                          
    // Names of project types
    char mode[][15] = { "Organic", "Semi-Detached", "Embedded" };
    
    int size = 4; // size of the project in thousands of lines of code
    
    // Calculate parameters of Basic COCOMO model and output the results
    calculateBasicCocomo(table, 3, mode, size);
    
    return 0;
}
The mode is Organic
Effort = 12.576 Person-Month
Development Time = 3.56357 Months
Average Staff Required = 4 Persons

Note: The output may vary depending on the input size value.

Intermediate COCOMO Model

The Intermediate Model of COCOMO considers that effort and schedule estimation cannot be solely based on Lines of Code and constants evaluated for different software systems. In reality, other factors such as reliability, experience, and capability also impact these estimations. These factors are known as Cost Drivers, and the Intermediate Model takes into account 15 such drivers for cost estimation. The Cost Drivers are classified based on their attributes.

There are different factors, called cost drivers, that affect the effort and schedule needed for a software development project. These cost drivers are divided into four categories.

  • Product Attributes
    • Required software reliability extent
    • Size of the application database
    • The complexity of the product
  • Project Attributes
    • Use of software tools
    • Application of software engineering methods
    • Required development schedule
  • Hardware Attributes
    • Run-time performance constraints
    • Memory constraints
    • The volatility of the virtual machine environment
    • Required turnabout time
  • Personnel Attributes
    • Analyst capability
    • Software engineering capability
    • Applications experience
    • Virtual machine experience
    • Programming language experience
Cost Drivers Very Low Low Nominal High Very High
Product Attributes
Required Software Reliability 0.75 0.88 1.00 1.15 1.40
Size of Application Database 0.94 1.00 1.08 1.16
The complexity of The Product 0.70 0.85 1.00 1.15 1.30
Hardware Attributes
Runtime Performance Constraints 1.00 1.11 1.30
Memory Constraints 1.00 1.06 1.21
The volatility of the virtual machine environment 0.87 1.00 1.15 1.30
Required turnabout time 0.94 1.00 1.07 1.15
Personnel attributes
Analyst capability 1.46 1.19 1.00 0.86 0.71
Applications experience 1.29 1.13 1.00 0.91 0.82
Software engineer capability 1.42 1.17 1.00 0.86 0.70
Virtual machine experience 1.21 1.10 1.00 0.90
Programming language experience 1.14 1.07 1.00 0.95
Project Attributes
Application of software engineering methods 1.24 1.10 1.00 0.91 0.82
Use of software tools 1.24 1.10 1.00 0.91 0.83
Required development schedule 1.23 1.08 1.00 1.04 1.10

The project manager can assess 15 different conditions for a specific project on a scale of one to three. Based on these scores, the required cost driver values can be obtained from the table mentioned earlier. To calculate the Effort Adjustment Factor (EAF), these 15 values are multiplied. The Intermediate COCOMO formula is then determined using this EAF.

E= (a(KLOC)b)*EAF

For the intermediate model, the values of a and b are as follows:

Software Projects a b
Organic 3.2 1.05
Semi-Detached 3.0 1.12
Embeddedc 2.8 1.20

Detailed Model –

The Detailed COCOMO model accounts for all aspects of the intermediate model by evaluating the impact of each cost driver on every stage of the software engineering process. Effort multipliers are assigned to each cost driver attribute in this model. In the Detailed COCOMO model, the software is divided into various modules, and COCOMO is applied to each module to estimate effort, which is then summed up. The Detailed COCOMO model consists of six stages.

The following are the six stages of detailed COCOMO:

  • Planning and requirements: This phase involves understanding the client’s requirements and planning the project accordingly.
  • System design: In this phase, a high-level design of the software system is created based on the requirements gathered in the previous phase.
  • Detailed design: Here, a detailed design of the software system is created based on the high-level design created in the previous phase.
  • Module code and test: The actual coding of the software system takes place in this phase, followed by testing of individual modules.
  • Integration and test: Once all the modules have been developed and tested, they are integrated to create the final product, which is then tested.
  • Cost Constructive model: It is a software cost estimation model that takes into account various factors such as size, complexity, and reliability of the software system to estimate the effort required for its development.