Lab Sheet#03 COCOMO Model
Dr. Sanjeev Patel
               Asst. Professor, CSE, NIT Rourkela
       Adapted from: Software Project, Process and Quality
               Management By Prof. D P Mohapatra
1/5/2021                 Software Engineering Lab#03         1
                      Project Planning
• Project planning is undertaken and completed before any
  development activity starts
• Following project planning activities are carried out:
• Estimation
   – Effort, cost, resource, and project duration
• Project scheduling
• Staff organization
   – staffing plans
• Risk handling
   – identification, analysis, and abatement procedures
• Miscellaneous plans
   – quality assurance plan, configuration management plan, etc.
  1/5/2021               Software Engineering Lab#03         2
       Sequence of Estimations and Scheduling
                                                                Cost Estimation
                  Effort Estimation
Size Estimation                                 Staffing Estimation
                      Duration
                     Estimation
                                                                                  Scheduling
 1/5/2021                         Software Engineering Lab#03                                  3
                                       COCOMO
• COCOMO (CONSTRUCTIVE COST MODEL)
•    First published by Dr. Barry Boehm, 1981
•    Several interactive cost estimation software
•    packages available
•    Derived from statistical regression of data
      • from a base of 63 past projects (2000 - 512,000 DSIs)
    1/5/2021                  Software Engineering Lab#03       4
                          COCOMO 81
• Based on industry productivity standards - database can be
  constantly updated
• Allows an organization to benchmark its software
  development productivity
• Basic model:
       effort = c x sizek
   – c and k depend on the type of system: organic, semi-
     detached, embedded
   – Size is measured in ‘KLOC’ i.e. Thousands of lines of code
 1/5/2021               Software Engineering Lab#03         5
                  COCOMO Model
• Three increasingly complex models
   – Basic Model
   – Intermediate Model
   – Detailed Model
 1/5/2021              Software Engineering Lab#03   6
             COCOMO Modes or Classes
• Organic Mode
   – Developed in familiar, stable environment
   – Product similar to previously developed product
   – <50,000 DSIs (ex: accounting system)
   – DSI means delivered source instructions
• Semidetached Mode
   – somewhere between Organic and Embedded (e.g. compilers,
     linkers etc.)
• Embedded Mode
   – new product requiring a great deal of innovation
   – inflexible constraints and interface requirements
     (ex: operating systems, real-time systems)
 1/5/2021                  Software Engineering Lab#03         7
                     COCOMO Models
• Basic Model
   – Used for early rough, estimates of project cost, performance,
     and schedule
• Intermediate Model
   – Uses Effort Adjustment Factor (EAF) from 15 cost drivers
   – Doesn’t account for 10 - 20 % of cost (training, maintenance,
     Quality, etc.)
• Detailed Model
   – Uses different Effort Multipliers for each phase of project (Most
     project managers use intermediate model)
 1/5/2021                  Software Engineering Lab#03            8
            Basic Effort Equation (COCOMO 81)
• Effort=c * (size)k
   – c is a constant based on the developmental mode
            • organic = 2.4
            • semi = 3.0
            • embedded = 3.6
    – size = 1000s Source Lines of Code (KSLOC)
    – k is a constant for a given mode
            • organic = 1.05
            • semi = 1.12
            • embedded = 1.20
 1/5/2021                       Software Engineering Lab#03   9
           The COCOMO constants
         System type              c       k
 Organic (broadly, information   2.4    1.05
           systems)
Semi-detached (broadly utility   3.0    1.12
             apps)
Embedded (broadly, real-time)    3.6    1.20
k exponentiation – ‘to the power of…’
adds disproportionately more effort to the larger
projects
takes account of bigger management overheads
                                                    10
                  Basic COCOMO 81
• Nominal Development time= 2.5*(Effort)exponent
• 2.5 is constant for all modes
• Exponent based on mode
   – organic = 0.38
   – semi = 0.35
   – embedded = 0.32
• If effort in PM then development time would be in
  months
                      Basic COCOMO Model
• Development time does not increase linearly with product
  size:
   – For larger products more parallel activities can be
     identified:
            • can be carried out simultaneously by a number of engineers.
                                                                            12
 1/5/2021                        Software Engineering Lab#03
                       Basic COCOMO Model
• Development time is roughly the same for all the three
  categories of products:
   – For example, a 60 KLOC program can be developed in
     approximately 18 months
            • regardless of whether it is of organic, semi-detached, or embedded
              type.
   – There is more scope for parallel activities for system and
     application programs,
            • than utility programs.
 1/5/2021                         Software Engineering Lab#03              13
                      Example - 1
The size of an organic software product has been estimated to
be 32,000 lines of source code. Assume that average salary of a
software developer is Rs. 15,000 per month. Determine the
effort required to develop the software product, the nominal
development time, and the cost to develop the product.
• Effort = 2.4*(32)1.05 = 91 PM
• Nominal development time = 2.5*(91)0.38 = 14 months
• Staff cost required to develop the product
   =91 x Rs. 15,000=Rs. 1,465,000
 1/5/2021                Software Engineering Lab#03       14
                   Example - 2
Suppose you are developing a software product in the organic
mode. You have estimated the size of the product to be about
100,000 lines of code. Compute the nominal effort and the
development time.
• Given that the size is 100 KLOC and the project is organic.
• Nominal effort=2.4 x 1001.05=2.4 x 125.893=302.1 man-
  months
• Nominal development time=2.5 x (Effort)0.38=2.5 x
  302.10.38=8.6 months
1/5/2021              Software Engineering Lab#03        15
                           Example - 3
Suppose an embedded project has 50 KLOC. Find the effort,
development time, average staff required and productivity.
    –   Effort 3.6x(50)1.20= 394 person–months
    –   Development time 2.5x(394)0.32= 17 months
    –   Average staff 394 / 17 = 23 staff
    –   Productivity 50,000 LOC / 394 staff-months = 127 LOC / staff-month
                                                                             16
 1/5/2021                      Software Engineering Lab#03
              Intermediate COCOMO
• Basic COCOMO model assumes
   – effort and development time depend on product size
     alone.
• However, several parameters affect effort and development
  time, such as:
   – Reliability requirements
   – Availability of CASE tools and modern facilities to the
     developers
   – Size of data to be handled
                                                               17
 1/5/2021              Software Engineering Lab#03
                   Intermediate COCOMO
• For accurate estimation,
   – the effect of all relevant parameters must be considered:
   – Intermediate COCOMO model recognizes this fact:
            • refines the initial estimate obtained by the basic COCOMO by
              using a set of 15 cost drivers (multipliers).
• If modern programming practices are used,
   – initial estimates are scaled downwards.
• If there are stringent reliability requirements on the product,
   – initial estimate is scaled upwards.
                                                                         18
 1/5/2021                      Software Engineering Lab#03
             Intermediate COCOMO
• Takes basic COCOMO as starting point
• Identifies the attributes such as personnel, product,
  computer and project attributes, which affect the cost and
  development time.
• Multiplies basic cost by attribute multipliers which may
  increase or decrease the costs.
                            Attributes
Personnel attributes
• Analyst capability (ACAP)
• Virtual machine experience (VEXP)
• Programmer capability (PCAP)
• Programming language experience (LEXP)
• Application experience (AEXP)
Product attributes
•   Reliability requirement (RELY)
•   Database size (DATA)
•   Product complexity (CPLX)
                     More Attributes
Computer attributes
• Execution time constraints (TIME)
• Storage constraints (STOR)
• Virtual machine volatility (VIRT)
• Computer turnaround time (TURN)
Project attributes
• Modern programming practices (MODP)
• Software tools (TOOL)
• Required development schedule (SCED)
 COCOMO effort multipliers (cost drivers)
• Each of the 15 attributes receives a rating on a six-point scale
  that ranges from "very low" to "extra high" (in importance or
  value).
• The product of all effort multipliers results in an effort
  adjustment factor (EAF).
• Typical values for EAF range from 0.9 to 1.4.
 1/5/2021                Software Engineering Lab#03          22
                             COCOMO – cost drivers
Cost Driver                        Very   Low    Nominal   High   Very   Extra
                                   low                            High   High
Required reliability               0.75   0.88   1.0       1.15   1.40
Database size                             0.94   1.0       1.08   1.16
Product complexity                 0.70   0.85   1.0       1.15   1.30
Execution time constraint                        1.0       1.11   1.30
Memory constraint                                1.0       1.06   1.21
Virtual machine volatility                0.87   1.0       1.15   1.30
Computer turnaround time                  0.87   1.0       1.07   1.15
Analyst capability                 1.46   1.19   1.0       0.86   0.71
Application experience             1.29   1.13   1.0       0.91   0.82
Programmer capability              1.42   1.17   1.0       0.86   0.70
Virtual machine experience         1.21   1.10   1.0       0.90
Programming language experience    1.14   1.07   1.0       0.95
Modern programming practices       1.24   1.10   1.0       0.91   0.82
Use of software tools              1.24   1.10   1.0       0.91   0.83
Development schedule               1.23   1.08   1.0       1.04   1.10
           Intermediate COCOMO 81
• Effort=EAF*c*(size)k
  – EAF (effort adjustment factor) is the product of effort
    multipliers corresponding to each cost driver rating
  – c is a constant based on the developmental mode
  – Some papers have taken value of c same as that of Basic
    COCOMO, some other papers have taken value of c as
     • for organic products, c = 3.2
     • for semi-detached products, c = 3.0
     • for embedded products, c = 2.8
  – size = 1000s Delivered Source Instruction (KDSI)
  – k is a constant for a given mode, same as Basic COCOMO
             Intermediate COCOMO 81
• The development time calculation uses effort in the same
  way as in the Basic COCOMO
   – Nominal Development time= 2.5*(Effort)exponent
   – where, 2.5 is constant for all modes, and exponent is
     based on mode
      • organic = 0.38
      • semidetached = 0.35
      • embedded = 0.32
                     Example 4
• Determine effort, duration, and staffing level for the
  following scenario:
   – Estimated size 10,000 LOC = 10 KLOC.
   – Small project, familiar development
   – Analyst capability: Low
   – Application experience: Low
   – programmer capability: low
   – Programmer experience: High
1/5/2021              Software Engineering Lab#03      26
                 Example 4 cont …
• Need to produce 10,000 LOC = 10 KLOC.
• Since a small project and familiar development, use organic
  model:
   – Effort =2.4(10)1.05 = 26.9 Person-Months
   – Development-time = 2.5(26.9).38 = 8.73 Months
   – Average Staff = 26.9 PM/8.73 Months = 3.08  3 People
 1/5/2021               Software Engineering Lab#03         27
                 Example 4 cont…
• Now, the attribute multipliers will be as follows:
   Analyst capability - 1.19 (low)
   Application experience - 1.13 (low)
     programmer capability - 1.17 (low)
   programmer
      programming experience - 0.95 (high)
   programming
• So, Adjustment factor = 1.19*1.13*1.17*0.95 = 1.49
• Effort = 26.9*1.49 = 40 Person-months
• Development time = 2.5*(40).38 = 10.2 Months
• Average Staff = 40PM/10.2M=3.9 (approx. 4) People
 1/5/2021              Software Engineering Lab#03     28
                               References :
1. B. Hughes, M. Cotterell, R. Mall, Software Project Management, Sixth Edition,
   McGraw Hill Education (India) Pvt. Ltd., 2018.
2. R. Mall, Fundamentals of Software Engineering, Fifth Edition, PHI Learning Pvt.
   Ltd., 2018.
3. Kanti Swarup, P. K. Gupta, Man Mohan, Operations Research, Nineteenth
   Edition, Sultan Chand and Sons, 2018.
4. Lecture PPT of Software Project, Process and Quality Management by Prof. D P
   Mohapatra.
  1/5/2021                      Software Engineering Lab#03
           Thank You
1/5/2021   Software Engineering Lab#03   30