Re: [Planner Dev] Uncertainty management / MonteCarlo simulation



I think that you can just get the result of the simulation and take the
frequency with a given precision.  In the Gantt view what you are doing
actually is scheduling, so you should be able to chose the start and
finishing date to a given percentage of the probability to make it.  Of
course when the task is always away of the critical path you can choose
any number.

I used python to do my Monte Carlo simulation program because it already
has a package for a lot of probability distributions (scipy).

I really think that it is not hard to do the simulation, but get harder
to integrate it visually with all the other things.  Once you have your
uncertain durations, you should calculate your uncertain costs ;-)

I'll need to compile Planner before trying anything because it doesn't
come with Fedora Core 2.

Santiago

On Thu, 2004-04-01 at 09:26, Mark Durrenberger wrote:
> I'm not sure I can do a "Short" lesson in Monte Carlo but let me tell you 
> how I did it in VB as an add-in to Project.
> 
> Number of trials loop (say 1000)
>          for each activity in the project loop
>                  generate random duration (within a range) for each activity
>          next activity
>          calculate project duration (use built in capability)
>          accumulate durations
>          accumulate durations squared
> next trial ' end of big trial
> calculate average duration  AverageDuration = (AccumulatedDuration / 
> NumberOfTrials)
> calculate ave duration squared   AverageDurationSquared = AverageDuration ^ 2
> calculate ave of squared durations  AverageOfSquaredDurations = 
> (AccumulatedSquaredDurations / NumberOfTrials)
> then calc standard devation    StandardDeviation = 
> AverageOfSquaredDurations - AverageDurationSquared
> 
> once you know standard deviation and mean duration you have all you need
> mean duration = 50% likely
> mean + 1 std dev = 84% likely
> mean +2 std dev = 97 %
> mean +3 std dev = 99.7 %
> mean -1 std dev = 16%
> etc...
> translate these durations to the calendar and you can present results as 
> dates instead of durations
> 
> This is about the most data efficient way to do this
> My simulation uses a triangular distribution for the simulation. Naturally 
> there are others (like beta)
> You'll need to store optimistic, likely and pessimistic durations for each 
> task, mean task duration does not need to be stored (you can use the 
> "duration" field - but in the case of the triangle, mean is (opt+Ml+pess)/3 
> - in the case of Beta (opt+4ml+pess)/6 - I use triangle because it is more 
> conservative and easier to work with than the beta. ALso the equation for 
> the mean of a triangle is EXACT. the equation for the mean of a beta is 
> APPROXIMATE.
> 
> With all the programmers we have on Planner ;-) we can generate routines 
> that calculate random durations with just about any distribution - to do 
> this, you would also need to store a distribution name for each task
> 
> A view perhaps that has columns for activity name, three duration values 
> and a "pick list" for the distribution type (triangle, beta,  chi squared 
> etc...)  and the "Mean" duration column which is calculated after the other 
> four columns have been entered...
> 
> Task 
> name       Duration1       duration2       duration3       distributiontype 
>         meanduration
>          A       4days           8days           15days          triangle 
>               9days
>          B       2days           4days           8days           beta 
>       4.3days
> 
> though I'd be happy with just "Triangle"
> 
> Mark
> 
> 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]