INFO 636 Software Engineering Process I Prof. Glenn Booker Week 6 – Estimating Resources and Schedule INFO636 Week 6 www.ischool.drexel.edu.

Download Report

Transcript INFO 636 Software Engineering Process I Prof. Glenn Booker Week 6 – Estimating Resources and Schedule INFO636 Week 6 www.ischool.drexel.edu.

INFO 636
Software Engineering Process I
Prof. Glenn Booker
Week 6 – Estimating
Resources and Schedule
INFO636 Week 6
1
www.ischool.drexel.edu
Overview
• This chapter covers planning multiple
small tasks, and assigning earned value to
each task
• As we get further into the course, notice
the forms focus more on program
management concerns than the details of
programming or other technical matters
INFO636 Week 6
2
www.ischool.drexel.edu
Resource Planning
• Last week we focused on estimation of the
size of our product
• Now we will apply the same techniques to
estimate the time it will take to produce
that work product
• The math and overall concept are the
same - we just tweak what variables we’re
using
INFO636 Week 6
3
www.ischool.drexel.edu
Productivity
• Productivity is the amount of effort (staff
hours of work) needed to accomplish a
task
– Here, might measure hours/LOC, or to write
or review a document, hours/page
– Warning!! The text switches between
LOC/hour and hours/LOC frequently
• As usual, our estimates of productivity are
based on our own work history
INFO636 Week 6
4
www.ischool.drexel.edu
Estimating Time
• The procedure for estimating the time for
developing software is on page 149
– N track – you started estimating time directly
from your proxies, so you have essentially
skipped directly to this step
– Once again, the method for estimation is
based on historic data, the amount of work
detail, and whether enough data is available
for regression analysis
INFO636 Week 6
5
www.ischool.drexel.edu
Enough Data?
• Recall that the basis for having ‘enough
data’ for regression analysis is pretty loose
here:
– At least three sets of data points
– Their linear regression results in R2 of at least
0.50
• If you don’t have ‘enough data’, the
estimate is pretty much a WAG (wild
guess)
INFO636 Week 6
6
www.ischool.drexel.edu
Regression Analysis
• Following the same math used for beta0
and beta1 last week, now use:
– The X axis is the number of “Estimated New
and Changed LOC”
• This was (N) on form C39
– The Y axis is the total number of Actual hours
(not planned) for each project
– See p. 153 for sample data
INFO636 Week 6
7
www.ischool.drexel.edu
Sample Regression
25
20
Actual Hours
• R2 = 0.83 ≥ 0.50 so
we can use
regression, which
gives us
• Slope beta1 = 0.12
hrs/LOC
• Intercept beta0 =
-2.3 hrs
Data from Table 6.3, p. 153
15
Y
Predicted Y
10
5
0
0
50
100
150
200
Est. New and Changed LOC
INFO636 Week 6
8
www.ischool.drexel.edu
Note on Time Units
• The text uses hours for actual effort
on each project
– Warning: the text frequently omits units
• We have been using minutes, since these
are small projects
• If you want to keep using minutes
consistently, that’s fine
– E.g. your slope would be in min/LOC
INFO636 Week 6
9
www.ischool.drexel.edu
Range and Interval
• A revised time estimate (p. 154) is
– Time = beta0 + beta1*(P+M)
• Be careful – this beta0 and beta1 have
different values from those used for
refining the size estimate
• We still use (P+M) since the X axis is LOC
• The calculations for range and interval
stay similar to before
INFO636 Week 6
10
www.ischool.drexel.edu
Range and Interval
• The range is also found on page 154
– Now sigma (s) is based on the hours and
LOC data
– The ‘t’ variable is the same, but be careful
with its ‘n’ value (number of data sets)
– The big square root term just uses LOC data
• The interval formula uses hours & range
INFO636 Week 6
11
www.ischool.drexel.edu
Estimating Larger Tasks
• As projects get bigger, you may need
to combine several estimates from smaller
tasks
– Also handy for INFO 637, the Team Software
Process
• Typically want a project broken into tasks
between 10% and 25% of the whole effort
INFO636 Week 6
12
www.ischool.drexel.edu
Multiple Estimates
• As before, we want to define tasks in a
way that will allow prediction of their size
and effort
• The same rules apply for at least three
data pairs and R2 at least 0.50
• For example, see data on page 158 for
three parts of a larger project
INFO636 Week 6
13
www.ischool.drexel.edu
Multiple Estimates
• For each task, find the estimated hours,
LPI, and UPI
• Find the variance for each task
– Variance = (UPI-LPI)2/4
• Add the variances, and take the square
root to get the standard deviation of the
estimate (32.28 hrs in the example)
INFO636 Week 6
14
www.ischool.drexel.edu
Multiple Estimates
– Std dev estimate = √[S(variance)]
• Add all the UPI and LPI values, and divide
by 2 to get the midpoint of the combined
range
– Midpoint = [S(LPI) + S(UPI)]/2
– This is 142.5 hrs in the example
INFO636 Week 6
15
www.ischool.drexel.edu
Multiple Estimates
• The UPI and LPI for the combined
estimate are
– UPI = midpoint + std dev estimate
– LPI = midpoint – std dev estimate
– This gives the values shown on p. 159 of
LPI = 110.22 and UPI = 174.78 hrs
– Notice this is a smaller span than the sum of
LPI (89.8) to the sum of UPI (195.2)
INFO636 Week 6
16
www.ischool.drexel.edu
Multiple PROBE Estimates
• The previous method works for a wide
range of estimation methods – parts of the
project could be coding, parts
documentation, etc.
• If all the parts are coding, and we have a
good set of data for estimation, we can
simplify the process
INFO636 Week 6
17
www.ischool.drexel.edu
Multiple PROBE Estimates
• Suppose we have the data on p. 163
as our historic data
• We want to estimate the time for
developing three projects, which are
114, 193, and 318 object LOC = (P+M)
– This is the example starting on p. 161
INFO636 Week 6
18
www.ischool.drexel.edu
Multiple PROBE Estimates
• From the historic data, find beta1 and
beta0
– beta1 = 0.1482 hrs/LOC
– beta0 = -5.95 hrs
• Combine the tasks into a single task
– Size = 114 + 193 + 318 = 655 LOC
• Hours = beta0 + beta1*Size = 91.13 hr
INFO636 Week 6
19
www.ischool.drexel.edu
Multiple PROBE Estimates
• The historic data is used to find
– s = 5.69 hrs
• The Range is based on the Size of this
combined project, and the historic LOC
– Recall that ‘t’ is the only place where the
prediction interval percent appears, 70%
– Range = 16.27 hrs (same units as s)
INFO636 Week 6
20
www.ischool.drexel.edu
Multiple PROBE Estimates
• Hence the prediction intervals are
– UPI = 91.13 + 16.27 = 107.40 hrs
– LPI = 91.13 - 16.27 = 74.86 hrs
• So this is the same process as finding the
time interval for one task – since they are
all based on the same data, we can
combine them into one big estimate
INFO636 Week 6
21
www.ischool.drexel.edu
Multiple Regression
• The example in section 6.5 on multiple
regression is beyond the scope of
this course
• Feel free to read it on your own, but
we won’t be getting that messy 
• Skip to section 6.6
INFO636 Week 6
22
www.ischool.drexel.edu
Estimating Schedule
• So far we have focused on estimating the
size of the product (e.g. LOC) and the
effort or resources needed to create it
• Now add the dimension of calendar
schedule to the picture
INFO636 Week 6
23
www.ischool.drexel.edu
Estimating Schedule
• A work year should, in theory, have about
52 weeks * 40 hrs/week = 2080 work
hours available
• Holidays, sick leave, and vacation typically
cut this by 10-15% (say, 5 hrs per week on
average)
INFO636 Week 6
24
www.ischool.drexel.edu
Estimating Schedule
• Most people spend some time each week
dealing with other projects, general
meetings, etc. which is another 25% lost
(~10 hrs/wk)
• Therefore we only have about 25 hours
per week for actual productive work!
INFO636 Week 6
25
www.ischool.drexel.edu
Utilization Factor
• On a personal level, you can track how
much time you actually get work done in a
normal time interval
– If you set aside 4 hours for homework, what
percent of that 4 hours is actually spent on the
homework?
– Typically 75% is a good utilization factor
INFO636 Week 6
26
www.ischool.drexel.edu
Schedule Planning
• The PSP schedule planning process is
outlined on page 171
• The basic concept is straightforward
– Determine the time needed for the task
– Find the time available to work on the task
– Allocate available time to the task, until the
task is done
– That’s your schedule
INFO636 Week 6
27
www.ischool.drexel.edu
Schedule Planning
• Complicating factors can include
– Other time commitments (which take away
from your available time)
– Figuring out the sequence in which tasks
need to be accomplished
– Establish milestones to mark significant
accomplishments toward task completion
INFO636 Week 6
28
www.ischool.drexel.edu
Planning Examples
• Pages 178-179 show an example, from
the author’s tasks to write the text
• Each task has a number of Hours
estimated (the Plan section)
• Those are added going down the column
in the Cumulative Hours column
• Notice the Date when each task is planned
is also shown
INFO636 Week 6
29
www.ischool.drexel.edu
Earned Value
• “Earned value” is a method for planning
and tracking progress on a project
– See INFO 630, lecture 3 for more details
• It balances measuring the time, effort
(resources), and work accomplished on a
project by assigning an ‘earned value’ to
reward completion of each task
INFO636 Week 6
30
www.ischool.drexel.edu
Earned Value
• In reality, earned value for a task is often
related to its cost
– If a task is estimated to cost $3000, then 3000
is its ‘earned value’ when we complete it
• Here, we’ll use the planned earned value
of a task to be ‘the planned percent of the
overall project effort’
INFO636 Week 6
31
www.ischool.drexel.edu
Earned Value
• So to determine the Planned Value
for each task
– Estimate the effort for all tasks, and add them
up for the total hours for the project
– Each project’s Planned Value is its Hours,
divided by the total hours, times 100
• Planned Value = Hours / (Total Hours) * 100
INFO636 Week 6
32
www.ischool.drexel.edu
Earned Value
• The Cumulative Planned Value (CPV) is
just adding up Planned Value (PV) as you
go down the column
• In the example on page 184
– The first CPV equals the first PV
– The second CPV is the previous CPV,
plus the current PV (0.99+0.53=1.52)
– The third CPV is (1.52+1.43 = 2.95), etc.
INFO636 Week 6
33
www.ischool.drexel.edu
Earned Value
• The last CPV for the last task should
always be 100.0 (%)
– This isn’t true for the examples in the text,
because they don’t show all tasks for writing
the book 
• So the Plan section tells how much effort
each task will be, and what percent of the
overall project it is
INFO636 Week 6
34
www.ischool.drexel.edu
Earned Value
• Now for the Actual part
• As each task is accomplished, note the
Date is was completed
• The Earned Value for each task is
equal to its Planned Value – regardless of
how much time it really took to perform the
task
INFO636 Week 6
35
www.ischool.drexel.edu
Earned Value
• Then the (Actual) Cumulative Earned
Value (CEV) is added up the same way as
the Planned CEV
• When all the tasks have been completed,
the last entry (Actual) CEV should
normally be 100%
– The only time this isn’t true is if you had
to change a plan after the project started
INFO636 Week 6
36
www.ischool.drexel.edu
Adjusted Earned Value
• The Adjusted Earned Value column is only
used if you had to replan a project
– Typically done when new tasks are identified,
but you don’t want to recalculate earned
values for every task
– If an existing task turns out to have much
different scope than planned, you don’t replan
– just accept it as a poor estimate
INFO636 Week 6
37
www.ischool.drexel.edu
Adjusted Earned Value
• So to add tasks to an existing plan, use
the same estimation method to determine
the amount of effort (Hours) needed for
each new task
• Assign each new task a Planned Value
based on the original number of total
hours for the project
INFO636 Week 6
38
www.ischool.drexel.edu
Adjusted Earned Value
• Now treat the new tasks like any others in
the plan
• The main impact will be that the final (end
of project) values for Cumulative Planned
Value and Cumulative Earned Value will
be greater than 100%, but equal to each
other
– This is discussed, sort of, on pp. 182-3
INFO636 Week 6
39
www.ischool.drexel.edu
Using Earned Value
• As described in the INFO 630 notes in
more detail, the primary benefit of earned
value is that, by tracking work
accomplished separately from the amount
of actual effort, we can estimate both
when the project will finish, and the total
effort (cost) needed
– Good estimates can be made only 15-20%
into the project
INFO636 Week 6
40
www.ischool.drexel.edu
Estimating Accuracy
• There are many ways to compare the
results of planning with the actual project
performance
• Here we focus on the Percent Error
– Percent Error = 100*(actual - estimate) /
(estimate)
• This can be calculated for each project, for
example
INFO636 Week 6
41
www.ischool.drexel.edu
Estimating Accuracy
• We can find the Percent Error for anything
we are planning and measuring:
– Program Size
– Effort
– Schedule
INFO636 Week 6
42
www.ischool.drexel.edu
Estimating Accuracy
• On pp. 197-201 of the text, there are many
examples of Percent Error during a typical
PSP course
• The main reason for plotting this is to
determine if your estimates are getting
more accurate
– In class, the process you follow is changing
often, so I wouldn’t worry if they don’t
INFO636 Week 6
43
www.ischool.drexel.edu
Composite Estimates
• Many small estimates together will have
less error than the worst of them
– This is part of our motivation for breaking a
project into small parts for estimation
• You also can examine your trend for
Percent Error to see if you are
overcompensating for your estimation
errors
INFO636 Week 6
44
www.ischool.drexel.edu