Presentation is loading. Please wait.

Presentation is loading. Please wait.

Schedule and Cost Estimation

Similar presentations


Presentation on theme: "Schedule and Cost Estimation"— Presentation transcript:

1 Schedule and Cost Estimation
Dr. Phil Laplante, PE Lecture 5

2 Topics Theory based estimation using SLIM
Schedule and cost estimation using COCOMO Some rules of thumb for schedule and cost estimation Finance 101 for Software Project Managers

3 SLIM: Theory-based Estimation Model
SLIM: Software Lifecycle Management The estimation model is based on two equations in two unknowns (effort and time) simultaneous solutions to the equations provide estimates as combinations of effort and time impossible solutions are indicated e.g. 60 persons for 1 month is an impossible estimate Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

4 The Theory: The Norden-Rayleigh Effort Equation
Effort: total area under the curve Effort Rate y' td y’ ~ t e –t2 time, t Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

5 The Original SLIM Equations (in simplified form)
Two equations in two unknowns (E and T) E: effort in staff-months T: schedule in months E ~ MBI * T (based on the Norden-Rayleigh equation) E ~ (Size/PI)3* T (- 4) (based on Larry Putnam’s software equation) adjustment factors are also provided Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

6 The Original SLIM Equations (in simplified form)
The input parameters of the equations are: Size: estimated product size (expressed in source lines of code, function points, or other size units; and MBI: a Manpower Buildup Index that reflects the estimated rate of staff build-up for the project; PI: the Productivity Index. Local data can be used to calibrate the PI parameter or industry-average values for different types of products can be used The output: combinations of effort and time for given Size, MBI, and PI adjustment factors are also provided Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

7 Simultaneous Solution of the SLIM Equations
Time Effort Feasible Effort & Time Solutions Minimum Time Maximum Infeasible Effort & Time Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

8 SLIM Summary Advantages :
Uses linear programming to consider development constraints on both cost and effort. SLIM has fewer parameters needed to generate an estimate over COCOMO A commercial tool is available ( ) Disadvantage: Estimates are extremely sensitive to the technology factor Not suitable for small projects Not widely used

9 Cost estimation using COCOMO
Basic COCOMO Intermediate and detailed COCOMO COCOMO II WEBMO COSYSMO

10 Basic COCOMO COCOMO is an acronym for constructive cost model. That is, it is a predictive model. COCOMO model is based on thousands of lines of deliverable source instructions. This is the effort equation for the basic COCOMO model: L is lines of code and a and b are a function of the type of software system to be constructed.

11 Intermediate and detailed COCOMO
Intermediate or detailed COCOMO models dictate the kinds of adjustments used. For example, the effort adjustment factor, can be made to the number of delivered source instructions based on a variety of other factors including: product attributes computer attributes personnel attributes project attributes

12 Intermediate and detailed COCOMO
Each of these attributes is assigned a number based on an assessment that rates them on a relative scale. Then, a simple linear combination of the attribute numbers is formed based on project type. This gives a new adjustment factor

13 Fifteen COCOMO81 Cost Drivers
Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

14 A COCOMO81 EXAMPLE 1.17 Estimated size = 50,000 KDSI
Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

15 AN EXAMPLE (continued)
Effort = 2.8 * ( 50 )1.20 = SM EAF = 1.17 Adjusted Effort = * 1.17 = SM Schedule = 2.5 * ( ) 0.32 = 16.4 MO Average Staff Level = / 16.4 ~ 22 people Productivity = 50,000 / ~ 140 LOC/SM Cost = $10,000 per SM * SM = $ 3.58 M Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

16 COCOMO II In this model some of the more important factors that contribute to a project’s expected duration and cost are included as new scale drivers. These include: precedentedness (that is, novelty of the project) development flexibility architectural / risk resolution team cohesion process maturity The first two describe many of the same influences found in the adjustment factors of COCOMO 81.

17 The COCOMO II Effort Estimation Equation
Effort in Person-Months (PM) is estimated using an equation of the form: PM = 2.94 * (SIZE)B * P (17 Effort Multipliers) The exponent B is of the form B = x S (five Scale Factors) The exponent scale factors are: PREC: precedentedness of the system FLEX: flexibility in the requirements RESL: degree of risk resolution and interface specification at design review TEAM: cohesiveness of the development team PMAT: process maturity rating Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

18 COCOMO II Cost Drivers (1)
Product Factors RELY: required reliability DATA: ratio of data size to code size CPLX: product complexity RUSE: effort required for reuse* DOCU: documentation match to lifecycle needs* Platform Factors TIME: execution time constraint on target processor STOR: memory constraint on target processor PVOL: platform volatility * New in COCOMO II Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

19 COCOMO II COST DRIVERS (2)
Personnel Factors ACAP: analyst capability PCAP: programmer capability APEX: application experience PLEX: platform experience LTEX: language and tools experience PCON: personnel continuity* Project Factors TOOL: use of software tools SITE: multiple development sites* SCED: required development schedule * New in COCOMO II Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

20 The SCED Effort Multiplier
The effort multiplier for SCED was recalibrated from 1.23 in COCOMO81 to 1.43 in COCOMO II for compressing the schedule by 25% And with no penalty for extending the schedule in COCOMO II The total number of effort multipliers was extended from 15 to 17 in COCOMO II Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

21 Some Other Attributes of COCOMO II
COCOMO provides estimates of total effort and schedule effort and schedule by development phase effort and schedule for 7 kinds of work activities within each development phase monthly milestones, costs, and costs to date early estimates (pre-architecture) refined estimates (post-architecture) COCOMO II supports estimates for incremental development reuse of software components developing components for reuse function points or lines of code Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

22 A CAUTION COCOMO II is calibrated to “industry averages” for many companies doing many different types of software development these averages may or may not be appropriate for your project and your company Accurate estimates result from collecting project data within your organization and calibrating the model to your situation Managing and Leading Software Projects, by R. Fairley, © Wiley, 2009

23 COCOMO II Implementations of COCOMO II can be found at:
or You should experiment with these ….

24 COCOMO II summary COCOMO can be used to produced person-month data.
This data is used to calculate cost (based on a weighted combination of the carrying cost of each individual involved). It is also used to drive the development of the WBS and subsequently, whatever process model used (e.g. PERT or CPM).

25 Need new methodology that extends function points
WEBMO FP and SLOC are not suitable for Web estimation because they do not take all of the Web Objects Need new methodology that extends function points WEBMO is derivative of COCOMO II that computes the number of Web Objects using size predictor groupings. Reference: Don Reifer 2002

26 WEBMO estimation model
Extension of the COCOMO II early design model. Square root relationship exists between effort and duration (<100 objects square root). This relationship tends to break down when the number of Web Objects exceeds 300 (>100 objects cube root). Developed using a mix of expert judgment and actual data from 64 projects using linear regression data(46 projects).

27 Web Objects Predictors
Description Number of function points Traditional metrics used to predict the size of non-Web applications using number of inputs, outputs, files, inquiries, and interfaces as the basis of estimate. Number of xml, html, and query language links Takes into account the effort to link applications, integrate them together dynamically, and bind them to the database and other applications in a persistent manner. Number of multimedia files Takes into account the effort required to insert audio, video, and images into applications. Number of scripts Takes into account the effort required to link html/xml data with applications and files and generate reports. Number of Web building blocks Takes into account the effort required to develop Web enabled fine-grained building block libraries and related wrapper code needed to instantiate them.

28 WEBMO estimation model

29 WEBMO estimation model
Nine cost drivers CPLX (RCPX): Product Reliability and Complexity PDIF : Platform Difficulty PERS : Personal Capabilities PREX : personal experience FCIL : Facilities SCED : Schedule Constraints RUSE : Degree of Planned Reuse TEAM : Teamwork PEFF : Process Efficiency Rating 5 level( Very Low to Very High) TEAM and PEFF are different from COCOMO II

30 WEBMO estimation model
Computes exponents P1 , P2 using five application domains. Estimating equations for effort( in person month) and duration( in calendar month) assume size is provided in Web Objects. Differs from the original COCOMO II. 9 cost drivers/ 7 cost drivers Fixed effort power law / variable power law

31 WEBMO vs. COCOMO II Web portal domain (size 11.4 thousand SLOC)
effort 24 person-months, duration 5.0 calendar months assuming cube root relationship. COCOMO II : effort 38.4 person-months, duration 11.4 calendar months Actual : 6 people for four months

32 COSYSMO (2002) COCOMO like tool for systems engineering project cost and schedule estimation. Model now contains a calibration data set of more than 50 projects provided by major aerospace and defense companies such as Raytheon, Northrop Grumman, Lockheed Martin, SAIC, General Dynamics, and BAE Systems. Like COCOMO, computes effort (and cost) as a function of system functional size and adjusts it based on a number of environmental factors related to systems engineering.

33 Rules of thumb for schedule and cost estimation
Use more than one complementary technique. The role of your experience in estimation How to combine estimates (averages?)… Two or more – why they have to be complementary -- portfolio theory Adjust schedule as project progresses

34 Some complementary methods
expert opinion with analogy expert opinion with function points algorithmic models and use case points expert opinions by experts with different project experiences and responsibilities use case points and analogy

35 Non-complementary estimates
Algorithmic models based on the same underlying algorithms (such as all of the COCOMO derivatives) Experts who have had similar responsibilities on similar projects.

36 Estimate often For traditional developments, you should estimate the job at least three times: macroestimation during the feasibility phase, detailed estimation during the requirements phase, and refined estimation during the design phase.

37 Three golden rules of estimation [Laird]
Require all estimates to be justified. Gut feeling is not an adequate justification. Don’t use methods or tools blindly. Try estimating previous (completed) projects to validate and tune the methods. Educate your estimators. Knowing how to do something doesn’t mean you know how long it will take. Train people in estimation. Accuracy is correlated with training and the ability to see results, not development experience.

38 Three golden rules [Laird]
Require all estimates to be justified. Gut feeling is not anadequate justification. Don’t use methods or tools blindly.Try estimating previous (completed) projects to validate and tune themethods. Educate your estimators. Knowing how to do something doesn’t mean you know how long it will take.Train people in estimation.Accuracy is correlated with training and the ability to see results, not development experience.

39 Finance 101 for SWPMs A simple financial question NPV IRR Payback
Others

40 A simple financial question
Suppose you win $1MM in the Pennsylvania lottery. Assume that the average rate of inflation will be 3% for the next 20 years, and forget about tax implications. Which would you rather have, the $1MM paid to you in 20 equal annual payments, or $800K now?

41 Net present value To answer the lottery question you need to know how to calculate the net present value (NPV) of a financial alternative. It’s based on the principle that one dollar today is, worth more than a dollar tomorrow (which only holds true if there is inflation – it is the opposite if there is deflation). NPV is used to compare financial alternatives for all kinds of management decisions, including software project management.

42 Calculation of compound interest
Suppose you have some money in a savings account, that pays interest at the rate r, compounded annually. Your principal will grow according to the following schedule : Year Balance Now P 1 P + rP 2 (P + rP) + r(P + rP)

43 Calculation of compound interest
This starts to get messy in a hurry. But you can simplify it by noticing that you can keep pulling out factors of (1 + r) from each line. If you do that, the balances collapse to a simple pattern: Year Balance Now P 1 P(1 + r) 2 P(1 + r)2

44 Calculation of compound interest
If you follow this pattern out for Y years, you get the general formula for future value: FV = P(1 + r)Y But this formula is only for interest that is compounded annually. Most interest is compounded monthly, weekly, daily, or even instantaneously.

45 Calculation of compound interest
To get the general formula we'll start out with interest compounded n times per year: FVn   =   P(1 + r/n)Yn where P is the starting principal and FV is the future value after Y periods. When n=1 it is just interest compounded annually. For n=12, compounded monthly. For n=52, compounded weekly and for n=356, compounded daily.

46 Calculation of compound interest
To get to the instantaneous case we take the limit for an infinite number of infinitesimally small time intervals: FV   =     limit   P(1 + r/n)Yn n→∞        We can simplify the right side by introducing a new variable, defining m = n/r

47 Calculation of compound interest
FV   =     limit   P(1 + 1/m)Ymr m→∞        =     P   [limit   (1 + 1/m)m]Yr m→∞        The limit in the square brackets converges to the number e = …. So the formula becomes FV   =   PeYr

48 Interest compounded continuously
Suppose you have $1000 in a savings account that pays 2% interest per year compounded instantaneously. In 5 years, how much will your $1000 be worth? FVinstant=1,000e(5)(.02)=1,105.17 Compare this to the same $1000 in an account saved at 2% compounded annually. FVannual= 1,000(1+.02)5=1,104.08

49 Net present value FV = P(1 + r)Y
Returning to our calculation of compound interest and viewing inflation as a rate compounded “annually” (called the “discount rate”). We have the future value of today’s money as: FV = P(1 + r)Y Where P is the amount of cash, r is the discount rate, and Y is the number of years. So what is the net present value of money given to me in the future?

50 Net present value P = FV/(1 + r)Y
In other words, I want to find the value of P, given some future value of the cash, the inflation rate, and the number of years into the future. This is found simply by dividing both sides of the FV equation by (1 + r)Y P = FV/(1 + r)Y Finally, we can answer the question about the lottery.

51 The lottery question We are receiving $1 million in 20 equal annual payments, or $50,000 per year. The initial payment, P0, has an NPV of $50,000. But the second payment has an NPV of P1 = 50,000/( )1 = 48,544

52 The lottery question The third payment has an NPV of:
And so on until P19. If you add up all the annual payments NPVs, you get a total present value for the lottery ticket of $766,190 So obviously, you would take the $800K today. P2 = 50,000/( )2 = 47,130

53 A software project management question
A project manager has the option of either purchasing a new testing tool for $250,000 or using the same resources to hire and train additional testers. Currently $1,000,000 is budgeted for software testing. It has been projected that the new testing tool would provide $500,000 in immediate cost savings by automating several aspects of the testing effort.

54 A software project management question
The effort savings would allow fewer testers to be assigned to the project. Should the manager decide to hire new testers, they would have to be hired and trained (these costs are included in the $250,000 outlay), before they can contribute to the project. Such a cost is called a “sunken cost” because the money is gone whether one decides to proceed with the project or not.

55 A software project management question
In any case, at the end of two years, it is expected that the new testers will be responsible for $750,000 in rework cost savings by finding defects prior to release that would not otherwise be found. What should the software project manager do? Assume an annual discount rate of 10% for ease of calculation:

56 A software project management question
To answer this we calculate the NPV of both alternatives. The Testing Tool is worth $500,000 today so its NPV is PVtool = $500,000/(1.10)0 = $500,000 To Hire Testers is worth $750,000 in 2 years so its NPV is PVhire = $750,000/(1.10)2 = $619,835

57 A software project management question
Therefore, under these assumptions, the personnel hire option would be the preferred course of action. However, as the projected return goes farther and farther into the future, it becomes more and more difficult to project the amount of the return. All sorts of things could happen – the project could be cancelled, new technology could be discovered, the original estimate of rework could change. Thus, the risk of the project may differ accordingly.

58 Another software project management question
A code reading initiative is expected to cost your company $50,000. The returns of this improvement are expected to total $100,000 of reduced rework two years in the future. If the discount rate is 10%, should the initiative be undertaken?

59 Another software project management question
To answer this, we calculate the NPV of the strategy, taking into account its cost NPV = 100,000 / – 50,000 = 32,645 Since the NPV is positive, yes, the project should be undertaken.

60 Internal rate of return (IRR)
NPV is an indirect measure: you are required to specify the market opportunity cost (discount rate) of the capital involved. IRR is defined as the discount rate in the NPV equation that causes the calculated NPV to be zero. It is not the return on investment (ROI). IRR is popular because it does not require knowledge of the cost of capital.

61 Internal rate of return (IRR)
To get the IRR we need to calculate the rate, r, that causes P to go to zero in the FV equation, that is 0 = FV/(1 + r)Y - c where c is the cost of the alternative that is being considered. We need to solve for r. Moving the cost to the LHS of the equation yields c = FV/(1 + r)Y

62 Internal rate of return (IRR)
Multiplying both sides by (1+r)Y/c yields (1 + r)Y = FV/c Taking the Yth root of both sides gives us 1 + r = [FV/c]1/Y Finally, subtracting 1 from both sides gives us r = [FV/c]1/Y – 1 Where r is the internal rate of return.

63 Internal rate of return (IRR) : example
The code reading initiative just discussed is expected to cost $50,000. The returns of this improvement are expected to be $100,000 of reduced rework two years in the future. What is the internal rate of return on this activity?

64 Internal rate of return (IRR) : example
Here, NPV = 100,000 / (1+r) 2 – 50,000 We wish to find the r that makes the NPV =0, that is the “break even” value. Using our IRR equation r = [100,000/50,000)]1/2– 1 Plugging this into a calculator gives r =0.414 =41.4%

65 Internal rate of return (IRR) : example
To decide if we should make this decision, we compare the IRR to the return of another investment alternative. For example, if the IRR was very low, then we might simply want to take this money and find an equivalent investment with lower risk (e.g. buy bonds with it). But if the IRR is very high, then the decision might be worth whatever risk is involved.

66 Profitability index (PI)
PI is defined as PV/I. That is, we take the present value of an investment and divide it by the initial outlay, I. This yields a kind of “bang-for-the-buck” measure.

67 Profitability index (PI): example
The code reading initiative previously discussed is expected to cost the company $50,000. The returns of this improvement are expected to be $100,000 of reduced rework two years in the future.

68 Profitability index (PI): example
The Net Present Value for this initiative at a discount rate of 10% is: PV = 100,000 / 1.102 = 82,645 for a Profitability Index of 82,645/50,000 or 1.65

69 Profitability index (PI): epilogue
The Profitability Index is appealing to managers who must decide between many competing investments with positive NPVs, but who have limited investment resources (or to managers in government agencies with limited budgets and many opportunities). The idea is to take the investment options with the highest PI first, until the investment budget runs out. This approach is not bad, but can sub-optimize the investment portfolio. Rank ordering by PI may rule out a large project with a good NPV because it is just over the limit.

70 Profitability index (PI): epilogue
Project Investment NPV PI A 100 130 1.3 B 125 1.25 C 300 360 1.20 D 200 220 1.1

71 Profitability index (PI): epilogue
If the capital budget is $400, the Profitability Index ranking technique will pick A and B first, leaving inadequate resources for C. Therefore, D will round out the budget, and the overall NPV will be 475. However, using an integer programming approach will recommend taking projects A and C for a total NPV of 490. Overall, PI is recommended as a secondary measure used to augment NPV to help optimize the allocation of investment dollars.

72 Payback Payback is the time it takes to get the initial investment back out of the project. Projects with short paybacks are preferred, although the term “short” is completely arbitrary. The intuitive appeal is reasonably clear: it is easy to calculate, communicate, and understand. Because of this, it is the least likely to confuse managers.

73 Payback However, if payback period is the only criterion used, then there is no recognition of any cash flows, small or large, to arrive after the cutoff period. Furthermore, there is no recognition of the opportunity cost of tying up funds. Inasmuch as discussions of payback tend to coincide with discussions of risk, it is probable that a short payback period is viewed as a way to respond to higher risks. However all criteria are arbitrary.

74 Discounted payback The payback period determined on discounted cash flows rather than undiscounted cash flows. Takes into account the time (and risk) value of money invested. Effectively, it answers the question "how long does it take to recover the investment and the minimum required return?"

75 Discounted payback If the discounted payback period is finite in length, it means that the investment plus its capital costs are indeed recovered eventually, which means that the NPV is at least as great as zero. Consequently, a criterion that says, go ahead with the project if it has any finite discounted payback period is consistent with the NPV rule. Beyond that, however, discounted payback has the same shortcomings as payback.

76 Average rate of return (ARR)
Can stand for “Average Rate of Return” or "Accounting Rate of Return“. Traditionally, it considers accounting net income rather than cash flows. It does this by including depreciation/ amortization in the computation of the cash flow (meaning it treats depreciation as an out-of-pocket expense, reducing the cash flow).

77 Average rate of return (ARR)
Its proponents argue that ultimately publicly traded organizations are evaluated on accounting measures of net income . So capital budgeting techniques should be based on this approach to determining cash flow. There are a variety of different ARR measures based on some notion of benefits divided by some notion of investment.

78 Average rate of return (ARR)
Here are some example definitions, the first one being the one normally mentioned in textbooks. Average projected after-tax profit / Average investment Average projected after-tax profit / Initial investment Average projected after-tax cash flow / Average investment Average projected after-cash flow / Initial investment Profit and investment can have varying definitions, so various accounting adjustments may or may not be made.

79 And what about taxes? Is software a capital budget item or expense?
Staff as permanent employees or contract employees? Tax treatment of investment in new development and profits made on that development? And a host of more, very complicated questions that only armies of lawyers, accountants, and prognosticators can attempt to guess at.

80 Summary of financial measures

81 References Linda Laird, “The Limits of Estimation,” IT Professional, November/December 2006, pp David Raffo, John Settle, Warren Harrison, “Investigating Financial Measures for Planning of Software IV&V”, Portland State University Research Report #TR-99-05, 1999. Donald J. Reifer, “Web Development: Estimating Quick-to-Market Software,” IEEE Software, pp , Nov./Dec Donald J. Reifer, “Estimating Web Development Costs: There are differences,” June 2002.


Download ppt "Schedule and Cost Estimation"

Similar presentations


Ads by Google