dr. m. shamim hossainswe 211 effort, duration and cost lec 3 1

25
Dr. M. Shamim Hossain SWE 211 Effort , Duration and Cost Lec 3 1

Upload: beatrice-tucker

Post on 29-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

1Dr. M. Shamim Hossain SWE 211

Effort , Duration and Cost

Lec 3

Dr. M. Shamim Hossain SWE 2115-2

Software Project Estimation You can’t manage something which you can’t

measure. We need some sort of measurement for:

1. Size of the project

2. Effort and cost Estimating software projects is notoriously poor. If performance doesn’t meet estimates then either

1. the performance was poor; or

2. the estimate was poor

Dr. M. Shamim Hossain SWE 2113-3

The Estimation Process: In general, the Software Cost estimation process consist of the following four main steps:

Estimate the size of the development product Estimate the effort in staff-months Estimate the schedule in calendar months Estimate the project cost in dollars (or reals)

Dr. M. Shamim Hossain SWE 2115-4

Size Measurement or Complexity of Software

Size matters! Direct impact on staffing, duration, and budget.

Size indicators: size Lines of Code (KSLOC) Function Points

estimated during the requirements analysis. It takes into account the inputs and outputs of the system

Feature Points number of algorithms used in the application

Object Points Number of boxes on a data flow diagram Number of classes in a design diagram

Dr. M. Shamim Hossain SWE 2115-5

Lines of Code Calculation

The most commonly used size indicator. Not the best one! Prerequisite for LOC calculations: WBS Line = statement Line = data definition Line ≠ comments Line ≠ debug code Line ≠ test cases Different languages? Convert all to assembly

Use tables: C=2.5, Fortran=3, Java=6, …

Dr. M. Shamim Hossain SWE 2115-6

Function Points Uses the functionality of the software as a measure of its complexity. Analogy: For a given house, we can say how many square meters it

has (LOC) or we can say how many bedrooms and bathrooms it has (FP).

A measure of the functionality of a given software.

Dr. M. Shamim Hossain SWE 2116-7

Effort and Duration Estimation

Now that we have an idea about the size of the software, we can estimate the effort and duration required to complete the development.

Effort: staff-months (staff-weeks, staff-days, …)

Duration: months (days, years, …)

SWE 2118

Steps in Sizing and Estimating

Dr. M. Shamim Hossain

Dr. M. Shamim Hossain SWE 2116-9

Effort Estimation Given the size of the software, how many staff-months

are needed to complete the project? Many methods to estimate effort:

COCOMO (COnstructive COst MOdel) COCOMO II SLIM (Software LIfecycle Management)

These methods use historical data for estimation. COCOMO uses regression: establishes a relationship

between the mean value and the corresponding values of one or more independent cases.

SLIM uses the Rayleigh distribution.

Dr. M. Shamim Hossain SWE 2116-10

Duration Estimation

Wait a minute! If we know the effort in staff-months already, doesn’t duration=effort/staff-size ?

For software projects, duration depends not only on staff size but also on other factors:

Environment effects Life cycle and development process Class and complexity of software (db, banking, real-time, scientific,

multimedia, …) …

That’s why duration should be calculated using mathematical methods based on historical data.

Don’t forget: throwing more resources (e.g. staff) at a project can only shorten duration up to a certain point!

Dr. M. Shamim Hossain SWE 4665-11

Environmental Factors 14 factors:

Data Communications Distributed Computing Performance Requirements Constrained Configuration Transaction Rate Reusability Ease of Operation …

For a given project, each factor is rated from 0 (no effect) to 5 (highly affects).

Dr. M. Shamim Hossain SWE 2116-12

COCOMO

Based on 63 projects from the 70s. Divides projects into 3 modes and 3 levels. Modes:

Organic: little innovation, few deadlines and constraints, stable environment; e.g. payroll, inventory

Semiattached: some innovation, moderate deadlines and constraints, environment somewhat fluid ;e.g., compilers, editors

Embedded: much innovation, tight deadlines and constraints, complex environment ;e.g., real-time systems, traffic control, weapon systems.

Dr. M. Shamim Hossain SWE 2116-13

COCOMO Levels Different factors are taken into account at each level to

achieve greater accuracy in estimates: Basic: uses size Intermediate: uses size and 15 additional variables called

“cost drivers” Detailed: uses Intermediate plus phase-sensitive effort

multipliers (e.g., memory constraints during testing phase) and a 3-level product hierarchy: system, subsystem, and module. Hierarchy levels similar to WBS Each cost driver affects differently at each level; e.g.,

language experience might apply only at the module level, whereas reliability applies at all 3 levels.

Dr. M. Shamim Hossain SWE 2116-14

COCOMO Modes and Levels

SEG 41004-15

WBS Example

Dr. M. Shamim Hossain SWE 2116-16

COCOMO Basic

Effort = a Sizeb

Basic Organic: E = 2.4 Size1.05

TDEV = 2.5 E0.38

Basic Semiattached: E = 3.0 Size1.12

TDEV = 2.5 E0.35

Basic Embedded: E = 3.6 Size1.20

TDEV = 2.5 E0.32

E =Effort in staff-months b=constant derived from regression analysis based on the

project TDEV=Time to Development (duration) in months (project

duration estimate) Size in KLOC (1000 lines of code)

Dr. M. Shamim Hossain SWE 2116-17

Example

An 8000 LOC basic organic project takes:

E = 2.4 81.05 = 21.3 ≈ 22 staff-months

TDEV = 2.5 220.38 = 8.09 ≈ 8.1 months

How Many developers is needed?

S(average Staff)=effort/TDEV

P(Productivity)=size/effort

Example

Dr. M. Shamim Hossain SWE 2113-18

A Basic Semiattached software project has been estimated, using COCOMO, to require 100 staff-days. What is the size of this software? How long will it take to complete the development of this software?(1) E = 3 * Size ^ 1.12(2) TDEV = 2.5 * E ^ 0.35E = 100 staff daysE = 100/20 staff months (20 working days per month is standard) = 5 staff-monthsTherefore, subbing into (1):5 = 3 * Size ^ 1.125/3 = Size ^ 1.12log (5/3) = 1.12 log (Size)Size = 1.58 KLOCsTDEV = 2.5*5^.35, Therefore, duration TDEV = 4.4 months

Example

Dr. M. Shamim Hossain SWE 2113-19

Using basic COCOMO, an innovative real-time software project with tight deadlines has been estimated to take 2 years. What is the approximate size of this software?

• Ans: 124,000 lines of code **

Basic Organic: E = 2.4 Size1.05

TDEV = 2.5 E0.38

Basic Semiattached: E = 3.0 Size1.12

TDEV = 2.5 E0.35

Basic Embedded: E = 3.6 Size1.20

TDEV = 2.5 E0.32

E =Effort in staff-monthsTDEV=Time to Development in monthsSize in KLOC

 

Dr. M. Shamim Hossain SWE 2116-20

COCOMO Intermediate

Intermediate Organic: E = 3.2 Size1.05 C Intermediate Semiattached: E = 3.0 Size1.12 C Intermediate Embedded: E = 2.8 Size1.20 C Duration same as Basic. “C” is the product of all Cost Drivers. Sometimes referred

to as Effort Adjustment Factor.

C = RELY DATA CPLX TIME STOR VIRT TURN ACAP AEXP PCAP VEXP LEXP MODP TOOL SCED

What’s wrong with these adjustment factors?

Dr. M. Shamim Hossain SWE 2116-21

COCOMO pros and cons

Pros: Historical data based on real projects Repeatable Organizations can tailor the process using the adjustment factors Relatively easy to use

What are some disadvantages of COCOMO? Primarily represents development from planning to implementation. It doesn’t

consider maintenance, rework, porting and integration, reuse. QA and configuration management is only about 5% of the total budget,

that’s not true in practice in modern projects. It assumes waterfall, as opposed to spiral life cycle. It ignores management overhead. It ignores staff turnover. It ignore customer attributes: skill cooperation, responsiveness

Dr. M. Shamim Hossain SWE 2116-22

COCOMO II Came out in mid 90’s COCOMO fits the conventional software

development Modern software developments has different

characteristics: Spiral Life Cycle CASE tools for rapid prototyping object-oriented software Software reuse

COCOMO II: takes CMM levels into account matches with the modern development process looks at 161 projects

Dr. M. Shamim Hossain SWE 2116-23

Observation

Given the sequence of actions that took us to this point from the beginning, what is the most influential factor in having good estimates?

Requirements

WBSAnalysis

Design

Size

Effort&

Duration

Task Dependency Types

24

25Dr. M. Shamim Hossain SWE 211

متشکرم