Lecture3-2011dp- ETSF01 / Lecture 3, 2011 Example: Top-down schedule estimation • •Produce overall

Embed Size (px)

Text of Lecture3-2011dp- ETSF01 / Lecture 3, 2011 Example: Top-down schedule estimation •...

  • 2011-03-22

    1

    ETSF01: Software Engineering Process –

    Economy and Quality

    Dietmar Pfahl Lund University

    ETSF01 / Lecture 3, 2011

    Software Project Management

    Chapter Five Software effort estimation

    ETSF01 / Lecture 3, 2011

    What makes a successful project?

    Delivering: •  agreed functionality •  on time •  at the agreed cost •  with the required quality

    Stages: 1. set targets 2. attempt to achieve targets

    BUT what if the targets are not achievable?

    ETSF01 / Lecture 3, 2011

    Cost/Schedule Estimation – Basic Idea

    •  Software cost/schedule estimation is the process of predicting the amount of effort (cost) required to build a software system and the time (schedule) to develop it.

    •  Project Cost:

    –  Hardware costs. –  Travel and training costs. –  Work costs (based on the effort spent by engineers).

    •  Project Schedule: –  Elapsed time (in hours, days, weeks, months)

    ETSF01 / Lecture 3, 2011

    Basis for successful estimating

    •  Information about past projects –  Need to collect data about past project:

    •  Size/difficulty(complexity)/functionality? •  Effort/time consumption? •  …

    •  Need to be able to measure the amount of work involved –  Lines of Code (or Statements, Halstead’s measures)

    •  KLOC vs. Delta-KLOC –  Cyclomatic Complexity (McCabe) –  Function Points (or Use Case Points, User Stories, …)

    ETSF01 / Lecture 3, 2011

    Typical problems with estimating

    •  Subjective nature of estimating –  It may be difficult to produce evidence to support your assumptions

    about cost (schedule) drivers •  Political pressures

    –  Managers may wish to reduce estimated costs in order to win a project proposal

    –  Developers may wish to increase estimates to safeguard themselves from unforeseen (unforeseeable) risks

    •  Changing technologies –  They involve risks (uncertainties), especially in the beginning when

    there is a ‘learning curve’ •  Projects differ

    –  Experience on one project may not be transferable to another

  • 2011-03-22

    2

    ETSF01 / Lecture 3, 2011

    Effort-Time Trade-Off

    People Effort = 4

    1 1 1 1

    People Effort = 4

    1 1 1 1

    ?

    People Effort = 4

    1

    1 1

    1 ?

    COCOMO

    Price S

    Source: B. Boehm: Software Engineering Economics, Prentice-Hall, 1981.

    Time

    Time

    Time

    ETSF01 / Lecture 3, 2011

    Effort-Time Trade-Off

    •  COCOMO

    ETSF01 / Lecture 3, 2011

    Estimation Techniques – Main Types

    Cost/Schedule Estimation Techniques

    Expert Judgment Algorithmic/ Parametric Models

    Empirical Factor Models: - COCOMO / COCOMO II - ESTIMACS - PRICE S - Softcost - DOTY - CheckPoint - etc.

    Constraint Models: - SLIM - Jensen Model - COPMO - etc.

    Analogy

    Machine Learning: - Case-Based Reasoning - Collaborative Filtering - Classification Systems - etc.

    Other

    Parkinson’s Law Pricing-to-Win Top-Down Estimation Bottom-Up Estimation

    Source: Boehm (1981)

    ETSF01 / Lecture 3, 2011

    Top-Down Estimation

    •  A cost/schedule estimate is established by considering the overall functionality of the product and how that functionality is provided by interacting sub-functions.

    •  Cost estimates are made on the basis of the logical functionality rather than implementation details.

    •  Advantage: Takes into account costs such as integration, configuration management and documentation

    •  Disadvantage: Can underestimate the cost of solving difficult low-level technical problems

    ETSF01 / Lecture 3, 2011

    Example: Top-down schedule estimation

    •  Produce overall schedule estimate

    •  Distribute proportions of overall estimate to components

    design code

    overall project

    test

    Estimate: 100 days

    30% i.e. 30 days

    30% i.e. 30 days

    40% i.e. 40 days

    ETSF01 / Lecture 3, 2011

    Bottom-Up Estimation

    •  Start at the lowest system level. The cost/schedule of each component is estimated. All these costs are added to produce a final cost estimate.

    •  Advantage: –  Can be accurate, if the system has been designed in

    detail •  Disadvantage:

    –  May underestimate costs of system level activities such as integration and documentation

  • 2011-03-22

    3

    ETSF01 / Lecture 3, 2011

    Pricing-to-Win

    •  The software cost/schedule is estimated to be whatever the customer has available to spend on the project. The estimated effort depends on the customer's budget and not on the software functionality.

    •  Advantage: Good chances to get the contract •  Disadvantages: The probability that costs accurately

    reflect the work required and the probability that the customer gets the system he or she wants are small.

    ETSF01 / Lecture 3, 2011

    Parkinson's Law

    •  Parkinson's Law states that work expands to fill the time available. In software costing/scheduling, this means that the cost is determined by available resources rather than by objective assessment.

    –  Example: If the software has to be delivered in 12 months and 5 people are available, the effort required is estimated to be 60 person-months.

    •  Advantage: No overspending •  Disadvantage: System is often unfinished / or effort is

    wasted

    ETSF01 / Lecture 3, 2011

    Expert Judgement

    •  One or more experts in both software development and the application domain use their experience to predict software costs. Process iterates until some consensus is reached (e.g., using Delphi Method).

    •  Advantage: Relatively cheap estimation method. Can be accurate if experts have substantial experience with similar systems.

    •  Disadvantage: Very inaccurate if there are no experts! Difficult to trace back, in case the estimate was not accurate.

    ETSF01 / Lecture 3, 2011

    Estimation by Analogy

    •  This technique is applicable when other projects in the same application domain have been done in the past. The cost of a new project is computed by comparing the project to a similar completed project in the same application domain

    •  Advantages: Accurate if similar project data are available

    •  Disadvantages: Impossible if no comparable project available. Needs systematically maintained project database (à expensive). It’s not always clear how to define a good similarity function.

    ETSF01 / Lecture 3, 2011

    How to find similar projects in a data base?

    Case-Based Reasoning (CBR): –  Involves (a) matching the current problem

    against ones that have already been encountered in the past and (b) adapting the solutions of the past problems to the current context.

    –  It can be represented as a cyclical process that is divided into the four following sub-processes as depicted in the Figure (Aamodt & Plaza 1994):

    •  retrieve the most similar cases from the case base

    •  reuse the case to solve the problem •  revise the proposed solution – if necessary •  retain the solution for future problem

    solving

    ETSF01 / Lecture 3, 2011

    Effort Estimation Model – Example (1) Case-Based Reasoning (CBR) Example:

    Attributes New Case Retrieved Case 1 Retrieved Case 2 Project Category Real Time Real Time Simulator Language C++ C++ C++ Team Size 10 10 9 System Size 150 200 175 Effort ? 1000 950 Similarity 90% ~50%

    Possible adaptation rule: 7501000

    200 150

    =∗=Effort_edictedPr

    Possibilities to predict effort: •  adapted effort based on 1 project •  average effort of 2 projects •  weighted average effort of 2 projects

    Effort= f (System_Size)

  • 2011-03-22

    4

    ETSF01 / Lecture 3, 2011

    Effort Estimation Model – Example (2) Case-Based Reasoning (CBR) Example:

    Attributes New Case Retrieved Case 1 Retrieved Case 2 Project Category Real Time Real Time Simulator Language C++ C++ C++ Team Size 10 10 9 System Size 150 200 175 Effort ? 1000 950 Similarity 90% ~50%

    Possible adaptation rule: Possibilities to predict effort: •  adapted effort based on 1 project •  average effort of 2 projects •  weighted average effort of 2 projects

    782950 175 1501000

    200 150

    2 1_ ≈⎟

    ⎠

    ⎞ ⎜ ⎝

    ⎛ ∗+∗=EffortedictedPr

    Effort= f (System_Size)

    ETSF01 / Lecture 3, 2011

    Effort Estimation Model – Example (3) Case-Based Reasoning (CBR) Example:

    Attributes New Case Retrieved Case 1 Retrieved Case 2 Project Category Real Time Real Time Simulator Language C++ C++ C++ Team Size 10 10 9 System Size 150 200 175 Effort ? 1000 950 Similarity 90% ~50%

    Possible adaptation rule: Possibilities to predict effort: •  adapte