• No results found

Monte Carlo Simulation for Software Cost Estimation. Pete MacDonald Fatma Mili, PhD.

N/A
N/A
Protected

Academic year: 2021

Share "Monte Carlo Simulation for Software Cost Estimation. Pete MacDonald Fatma Mili, PhD."

Copied!
23
0
0

Loading.... (view fulltext now)

Full text

(1)

Monte Carlo Simulation for

Software Cost Estimation

Pete MacDonald Fatma Mili, PhD.

(2)

Definition

• Software Maintenance - The activities

involved in implementing a set of relatively small changes to an existing program.

Barry Boehm, Software Engineering

(3)

Quotes

• “Estimating maintenance is rather a tricky problem.” Caper Jones, Estimating

Software Costs, McGraw-Hill 1998

• “Inaccurate size estimates automatically translate into questionable budgets.”

Eduardo Miranda, Improving Subjective

Estimates Using Paired Comparisons, IEEE

(4)

In the Beginning

• Before you can have Software Maintenance, there exists new development

• For new or substantially new development estimation is accomplished via COCOMO, etc.

• After several projects, REVIC estimates were within 10% of actuals if SLOC

(5)

Typical New Development

• Starts with a set of user requirements • Analyze these requirements to develop

software requirements • Produce a design

(6)

Software Maintenance

• Frequently performed by “newer” employees • Understand the problem

– There is a known problem with the code – Typically requires instrumenting the code

• After the problem is identified

– The code is modified and tested.

– Changes made to the code are then reflected in the analysis and design documents

(7)

Maintenance Life-Cycle Model

Understand the Problem Implement the Change Verify the Change Document the Change

(8)

Discussion

• Understand the problem - typically requires instrumenting the software to discover the problem location and/or

potential solutions

• Implement the change - coding a potential correction into the software

• Verify the Change - test the change to verify the problem has been corrected

• Document the Change - Update the Software

Requirements and/or Design Documents to reflect change in the software

(9)

SW estimating at GD

• Evolved via software process improvement activities

• Initially performed using REVIC

– Once calibrated, estimates were within 10% if SLOC estimate was correct

• In ‘95 started software maintenance of existing software

(10)

Initial Approach

• Difficult to estimate % of change

– Design, Code & Test

• Looked at effort required

– Used an average

– Eliminated high and low outliers

• Went to engineering judgement

(11)

Initial Approach continued

• The way REVIC was applied led to inaccurate estimates

• Reverted to Engineering Estimates

• Example - Modification requires 25 SLOC

– Is percentage of the Program or File?

– Are Integration changes only the amount of tests changed or include the effort to execute the required test cases?

(12)

Second Approach

• Effort data for changes were available • Discarded the outliers

• Take mean of remaining data and use as a “typical” Change

• Tended to cause an under estimation.

(13)

Effort Distribution

Histogram 0 20 40 60 80 100 120 140 160 180 200 36 158 278 398 518 638 758 878 998 1118 1238 1358 1478 1598 1718 1838 Frequency

(14)

Engineering Judgment

• Accomplished by senior developers • May incorporate “Delphi technique” • Difficult to quantify and/or justify

• Lacks the structure of a parametric model • Historical data only in the memory of the

(15)

Monte Carlo Simulation

• Necessitates the use of multiple random distribution functions

– Single distribution would like using the mean

• Distributions are slightly overlapping subsets of historical effort data

• Run multiple simulations to produce an estimate

(16)

Current Approach

• Apply Monte Carlo Simulation Model • Senior Developers classify changes as

– Simple, Typical or Difficult

• Each classification has its own distribution function

• Implementing a change into a baseline can induce the requirement to include additional changes

(17)

Model Overview

Distribution by Classification Simple Changes Typical Changes Difficult Changes Defects Induced

• Total effort = Sum of the hours estimated to all changes plus the effort to correct induced defects

(18)

Defining the Distribution

Functions

• Historical effort data is collected and maintained in ascending order

• Must have at least 40 data points to generate a distribution function

• Must validate each distribution

– Mean square error < 0.005

(19)

An Example

• Given 30 changes to be implemented as follows

– 10 easy – 15 typical – 5 difficult

• Produce an estimate to implement the changes.

(20)

Example Continued

Disc(1, 0.33, 2, 0.83, 3, 1.0) 75 + Logn (130, 70) Σ = 8067 hours Tria (39,55,7, 170) Disc(1, 0.80, 2, 1.0) 505 + Expo (293)

(21)

Results utilizing Arena

Project: SW Estimator Run execution date : 9/24/2002 Analyst: Pete MacDonald Model revision date: 9/24/2002

OUTPUTS

Identifier Average Half-width Min Max Replications Duration 1976.9 26.61 1651.1 2405.2 100

Effort 8065.9 346.18 4526.6 14681. 100 Simulation run time: 0.08 minutes.

(22)

Comparison of Methods

No. of Changes 36 30 16 Actual 14710 9429 8468 Typical Fix 9000 7500 4000 % Error 38% 20% 53% 3rd Try 11465 7115 6936 % Error 22% 14% 18% Current 14369 9848 8023 % Error 2.5% 4.5% 5%

(23)

Where do we go from here

• Automate generation of random distribution functions.

• Evaluate induced error data.

• Evaluate the application of Monte Carlo simulation as a Systems Engineering

estimation tool.

References

Related documents

Spectrum analysis showed that as compared to normal rest, the alpha wave power in the frontal and occipital lobe increased in both early-stage and post stage of MBSR training, while

Look through past bills, receipts, and your spending diary to figure out where your money goes each month. On this worksheet, savings is listed first so you get in the habit of

After having disbursed the holiday allowance, your employer, holiday card administrator or FerieKonto must retain the form for one year after expiry of the application deadline

Proactive investors who understand the inherent risks of the stock market have been quietly reallocating their retirement funds from the high- risk stakes of Wall Street into

Three extensions to the current work include extending the Steve Lewis case in chapter 4 as a complex ANP model that include economic, social, political and religious clusters,

We have applied for 5.5 credit hours of continuing education, provided through co-sponsorship of the University of Pittsburgh, School of Social Work, Pennsylvania Child

at 1125 (holding that the defendant should have been permitted to inform the jury about the fact that he was acquitted of the prior crime, as it could “help the jury weigh the

Thirty-eight papers published in the Journal of Geoscience Education (JGE) from 1989 through 2003 explicitly use or recommend the use of spreadsheets as part of classroom or