Demonstration 2

The second demonstration uses the portfolio tukutuku: a real portfolio of industrial data for a company with E=5 employees working on Web application projects. Copy the portfolio tukutuku to the working directory to begin this demonstration.

A probability model has previously been fitted for this portfolio: the best model was found to be the Lognormal-median family with dispersion=5.816.

Colour coding:
                              # comments
                              > user commands
                              computer output

The demonstration has two sections:


1. Deadline and priority setting.       top


# read in the tukutuku portfolio:

> tukutuku <- read.table("tukutuku", header=T)

# view the tukutuku portfolio:

> tukutuku

name needs finish sofar commit
1 m1 11 0 0 n
2 m2 6 0 0 n
3 m3 33 0 0 n
4 m4 77 0 0 n
5 m5 11 0 0 n
6 m6 7 0 0 n

# set deadlines for tukutuku to attain 80% success probability:

> deadlines.80 <- setdates(tukutuku, E=5, distname="lnorm.med", dispersion=5.816, psuccess=0.8)

Ordered projects:
[1]   m2   m6   m1   m5   m3   m4

fail.ok (%): 3.333333

# view the deadlines obtained:

> deadlines.80

m1 m2 m3 m4 m5 m6
18.877473 7.923555 53.987923 114.636444 22.218961 11.896058

# check in PROJMAN that the deadlines give the 80% success probability expected:

> projman(tukutuku, E=5, distname="lnorm.med", dispersion=5.816, newfinish=deadlines.80)

Projects in order from earliest deadline to latest:
[1]   m2   m6   m1   m5   m3   m4

Starting Monte Carlo simulations... please wait:

name pc.fail pc.firstfail finish finish.95 finish.99
1 m2 3.61 3.61 7.923555 7 14
2 m6 5.13 2.99 11.896058 12 21
3 m1 5.77 3.06 18.877473 20 34
4 m5 9.23 3.68 22.218961 27 43
5 m3 4.68 2.84 53.987923 53 88
6 m4 5.16 3.33 114.636444 116 205

pc.success
80.49

# The output is 80.49% success, which is fine.

# Now suppose that the company manager is particularly keen to win a bid
# for Project M4 (the largest). Currently, SETDATES has suggested a long
# deadline of 114 days for this project. Test the portfolio success probability
# if this deadline is reduced to 70 days, while all others remain the same.

# First make a new data frame, tukutuku2, with finish times given by deadlines.80
# but with the finish time for project M4 then modified to 70 days:

> tukutuku2 <- tukutuku
> tukutuku2$finish <- deadlines.80
> tukutuku2$finish[4] <- 70

# view the new data frame:

> tukutuku2

name needs finish sofar commit
1 m1 11 18.877473 0 n
2 m2 6 7.923555 0 n
3 m3 33 53.987923 0 n
4 m4 77 70.000000 0 n
5 m5 11 22.218961 0 n
6 m6 7 11.896058 0 n

# test the new data (with 70-day deadline for project M4) in PROJMAN:

> projman(tukutuku2, E=5, distname="lnorm.med", dispersion=5.816)

Projects in order from earliest deadline to latest:
[1]   m2   m6   m1   m5   m3   m4

Starting Monte Carlo simulations... please wait:

name pc.fail pc.firstfail finish finish.95 finish.99
1 m2 3.85 3.85 7.923555 7 14
2 m6 5.44 3.11 11.896058 12 22
3 m1 6.23 3.34 18.877473 21 36
4 m5 9.39 3.44 22.218961 28 45
5 m3 5.19 3.20 53.987923 55 91
6 m4 18.37 11.35 70.000000 119 203

pc.success
71.71

# Reducing the deadline for M4 down to 70 days has reduced the overall
# portfolio success probability to 71.71%.
# This is not too bad: however the manager might now wish to adjust
# the other deadlines to regain the 80% overall success probability.
#
# Modify the tukutuku2 data, forcing the deadline of 70 days for project M4
# by setting commit to "y" for that project;

> tukutuku2$commit <- c("n", "n", "n", "y", "n", "n")
> tukutuku2

name needs finish sofar commit
1 m1 11 18.877473 0 n
2 m2 6 7.923555 0 n
3 m3 33 53.987923 0 n
4 m4 77 70.000000 0 y
5 m5 11 22.218961 0 n
6 m6 7 11.896058 0 n

# Now find new deadlines that will fix project M4 at 70 days but achieve
# 80% overall probability of success.

> deadlines.80.2 <- setdates(tukutuku2, E=5, distname="lnorm.med", dispersion=5.816, psuccess=0.8)

Ordered projects:
[1]   m4   m2   m6   m1   m5   m3

p.firstfail: 0.0672

fail.ok (%): 2.656

# view the new deadlines:

> deadlines.80.2

m1 m2 m3 m4 m5 m6
54.28595 60.19040 74.83641 70.00000 54.16584 55.45408

# check the new deadlines in PROJMAN: should get about 80% success rate.

> projman(tukutuku2, E=5, distname="lnorm.med", dispersion=5.816, newfinish=deadlines.80.2)

Projects in order from earliest deadline to latest:
[1]   m5   m1   m6   m2   m4   m3

Starting Monte Carlo simulations... please wait:

name pc.fail pc.firstfail finish finish.95 finish.99
1 m5 0.12 0.12 54.16584 12 25
2 m1 0.28 0.16 54.28595 21 37
3 m6 0.37 0.10 55.45408 25 42
4 m2 0.37 0.06 60.19040 28 46
5 m4 11.11 10.70 70.00000 99 186
6 m3 15.91 4.94 74.83641 118 204

pc.success
83.92

# The success rate is a little higher than expected (84% instead of 80%)
# because SETDATES had no priority specified for project finish times.
# The default ordering chosen by SETDATES is different (in this example)
# from the ordering used by PROJMAN, accounting for the different
# portfolio success probabilities.
# In this example, the default ordering has not been very satisfactory: the
# shortest projects (low "needs" values) have been allotted disproportionately
# long deadlines. Try again, this time specifying a deadline priority that requires
# projects to be finished in order of their estimated efforts.
# This involves specifying priority=c(2, 6, 1, 5, 3, 4) in SETDATES, meaning that
# the first project to finish should be project 2, the second should be project 6, etc.

> deadlines.80.3 <- setdates(tukutuku2, E=5, distname="lnorm.med", dispersion=5.816, psuccess=0.8, priority=c(2, 6, 1, 5, 3, 4))

Ordered projects:
[1]    m2   m6   m1   m5   m3   m4

p.firstfail: 0.1789

fail.ok (%): 0.422

# view the new deadlines:

> deadlines.80.3

m1 m2 m3 m4 m5 m6
31.82293 14.82706 54.96358 70.00000 35.54800 20.45561

# check the new deadlines in PROJMAN:

> projman(tukutuku2, E=5, distname="lnorm.med", dispersion=5.816, newfinish=deadlines.80.3)

Projects in order from earliest deadline to latest:
[1]   m2   m6   m1   m5   m3   m4

Starting Monte Carlo simulations... please wait:

name pc.fail pc.firstfail finish finish.95 finish.99
1 m2 0.57 0.57 14.82706 7 13
2 m6 1.13 0.83 20.45561 12 21
3 m1 1.21 0.82 31.82293 20 34
4 m5 2.08 0.89 35.54800 27 43
5 m3 4.48 3.47 54.96358 53 90
6 m4 17.59 13.16 70.00000 119 210

pc.success
80.26

# This time the deadlines are much more satisfactory, and the desired
# success rate of 80% has been reached.


2. Verifying whether suggested deadlines would have succeeded, given known actual efforts.       top


# For these data we know the actual times taken for the 6 projects:

> actual <- c(16.250, 2.625, 223.250, 112.500, 12.500, 6.250)


# We can test whether the deadlines set by SETDATES would have succeeded
# with the actual times taken, by putting the actual times into the "needs" column
# of the project data and using PROJMAN with virtually zero dispersion.
#
# First set up the new data with "actual" replacing "needs":

> tukutuku3 <- tukutuku
> tukutuku3$needs <- actual


# Now check whether the 80% deadlines returned from SETDATES could have been
# achieved, given the actual times taken.
# This is simply done by setting dispersion to be a very small value, so that the simulations
# all have simulated completion time very close to the actual completion time.

> projman(tukutuku3, E=5, distname="lnorm.med", dispersion=0.00001, newfinish=deadlines.80)

Projects in order from earliest deadline to latest:

[1]   m2   m6   m1   m5   m3   m4 Starting Monte Carlo simulations... please wait:

name pc.fail pc.firstfail finish finish.95 finish.99
1 m2 0 0 7.923555 1 1
2 m6 0 0 11.896058 2 2
3 m1 0 0 18.877473 5 5
4 m5 0 0 22.218961 8 8
5 m3 0 0 53.987923 52 53
6 m4 0 0 114.636444 75 75

pc.success
100


# pc.success=100% indicates that the suggested 80% deadlines could have been met,
# given the actual completion times. By trial and error, we can find out how much leeway
# the 80% deadlines provided: e.g. try deadlines for 60% success:

> deadlines.60 <- setdates(tukutuku, E=5, distname="lnorm.med", dispersion=5.816, psuccess=0.6)
> projman(tukutuku3, E=5, distname="lnorm.med", dispersion=0.00001, newfinish=deadlines.60)


# This gives pc.success=0; so 60% deadlines would not have been sufficient for the
# completed projects.
#
# Further trial and error reveals that the threshold for this portfolio is between
# 78% and 79%: the 79% deadlines could just have been met.
# (The fact that this lies so close to the chosen demonstration level of 80% success
# is complete coincidence.)


Last updated:  14th February 2003