As some of you may already know the PERT Addin that was in Project for several versions was NOT included in Project 2010. The good news is that below we have the first version of some sample code you can use to add the feature back into the product! This first version does not use a form like the old one. It uses custom fields at the task level to store the Pessimistic, Optimistic and Most Likely estimates and the weights for each estimate. This is just a preliminary version. We hope to gather feedback and then release a future version of the code as a Visual Studio project that can be customized and used to create a Project 2010 Addin.
This code depends on using 7 task level custom fields:
The image below shows a Gantt Chart view with these fields inserted. In this example we see weights only on the first task. This is an option you can set in the code. If the option is set to ‘False’ then each task can have its own set of weights. Duration estimates are inserted for each task. The code at this point will estimate every task. (We could add the option to allow a project manager to specify which tasks should be estimated.)
To use this sample code in your own projects:
Now the code is ready to be used. All that is left is to insert the fields in the table above into a Gantt Chart view, enter your estimates and your weights (Remember that the weights must add up to 6!!) and then run the macro using the Quick Launch button you just added.
Feedback Wanted!!
This is just a first pass at a sample for replacing the PERT functionality. Please email me (brian.kennemer@microsoft.com) with your feedback.
Some things to think about:
One last thing: This is just sample code and should be thoroughly tested before you use it on a ‘production’ project.
_____________________________________________________________________________________________________________
Sub PERT()Dim tskT As TaskDim tskFirst As TaskDim FoundBadWeights As BooleanDim UseOneSetofWeights As Boolean
UseOneSetofWeights = TrueFoundBadWeights = False
CustomFieldRename FieldID:=pjCustomTaskDuration1, NewName:="Optimistic Duration"CustomFieldRename FieldID:=pjCustomTaskDuration2, NewName:="Most Likely Duration"CustomFieldRename FieldID:=pjCustomTaskDuration3, NewName:="Pessimistic Duration"CustomFieldRename FieldID:=pjCustomTaskNumber1, NewName:="Optimistic Weight"CustomFieldRename FieldID:=pjCustomTaskNumber2, NewName:="Most Likely Weight"CustomFieldRename FieldID:=pjCustomTaskNumber3, NewName:="Pessimistic Weight"CustomFieldRename FieldID:=pjCustomTaskText30, NewName:="PERT State"
If UseOneSetofWeights = True Then Set tskFirst = ActiveProject.Tasks(1) For Each tskT In ActiveProject.Tasks If Not (tskT Is Nothing) Then If tskT.PercentComplete = 0 And tskT.PercentWorkComplete = 0 Then If (tskFirst.Number1 + tskFirst.Number2 + tskFirst.Number3) = 6 Then tskT.Duration = ((((tskT.Duration1) * tskFirst.Number1) _ + ((tskT.Duration2) * tskFirst.Number2) _ + ((tskT.Duration3) * tskFirst.Number3)) / 6) tskT.Text30 = "Duration Calc'd: " & Now() Else tskT.Text30 = "Not Calc'd: Weights <> 6" FoundBadWeights = True End If Else tskT.Text30 = "Not Calc'd: Task In Progress or Complete" End If End If Next tskTElse For Each tskT In ActiveProject.Tasks If Not (tskT Is Nothing) Then If tskT.PercentComplete = 0 And tskT.PercentWorkComplete = 0 Then If (tskT.Number1 + tskT.Number2 + tskT.Number3) = 6 Then tskT.Duration = ((((tskT.Duration1) * tskT.Number1) _ + ((tskT.Duration2) * tskT.Number2) _ + ((tskT.Duration3) * tskT.Number3)) / 6) tskT.Text30 = "Duration Calc'd: " & Now() Else tskT.Text30 = "Not Calc'd: Weights <> 6" FoundBadWeights = True End If Else tskT.Text30 = "Not Calc'd: Task In Progress or Complete" End If End If Next tskTEnd IfIf FoundBadWeights = True Then MsgBox Prompt:="Some Tasks Weight Values were found to be incorrect." & _ Chr(13) & "Check the Text30 fields for details.", Buttons:=vbCritical, _ Title:="WorkPERT Weights Error"End IfEnd Sub
The product team for Project and Project Server have started a new blog to segment their content about the administration of Project Server environments. It can be found here and will be a must read if you are involved in the deployment or administration of Project Server.
If you are enough of a Project-nerd to read this blog you likely already know that the Project 2010 public beta is out and ready for you to download. I have been using and testing it several months and I can honestly say that it is the strongest version of Project I have ever seen. I mean that from a feature standpoint (lots of cool new stuff) and from a product quality standpoint. I have been looking at beta versions of Project since Project 98 and I have never seen a set of pre-beta builds with the quality and stability I have been seeing with 2010. Just amazing work by the product team. Everyone, testers, developers and program managers, really kicked it up a notch with this version. Great work to all of them. NOW…on with the nerdiness!
I am hosting a Thanksgiving dinner party for my family (sorry, not enough room for everyone) and my wife and I were thinking about the timing of all the food and preparations and we were wondering if we could do it all. Last year we just went for it and found out that our dishes all needed different oven temps and it was a huge, and very late mess. This year my wife asked "Hey, software bigshot, doesn't Microsoft make some kind of tool for planning and scheduling things?". "Well yes, I suppose they do", I said sheepishly. :-)
So I broke out my trusty copy of Project 2010 and started lining out my WBS. I started with the prep work and even had tasks for my kids to cleaning up the yard and such but I abandoned that idea and started concentrating on the food part of the event. I looked at all the recipes and broke them down into sets of tasks with proper durations. Then I figured out that to solve my oven problem I would need some Oven resources. So I entered a resource for each oven temp my dishes required. Oven - 350, Oven - 375, Oven - 400. I assigned the cooking tasks for each dish to the proper resource and then I went to the Team Planner and found that the only way I would be able to do all those dishes is if I had 3 ovens or I cooked them serially and had several of them sitting out cooling off while the others cooked. Obviously this was not good. So I moved some things to the day before and then planned to just heat them up just before the service. Then my wife and I went through and found some great dishes that all required the same oven temp! I reworked the plan and and now things are much better. The end result is a great dinner (I predict!) that is doable from a schedule standpoint and now I’m even more in love with the Team Planner than I was before! Here is how my Oven – 275 resource looks in the Team Planner, now that I reworked it:
You can see that the Oven is overallocated but I did check and all three of the overlapping items will fit at the same time. :-)
So bottom line? Project 2010 saved my Thanksgiving! :-)
I have attached the mpp file to this post. Feel free to download the beta (link above) and play around with it, use it for your party planning, make fun of it or point out where my schedule is flawed. Hopefully, all of those things will happen1 LOL
This sample project contains resources for me, my wife and my daughter as well as various oven temps, burner sizes and other appliances I will be using. Most of the tasks started out as manually scheduled tasks while I was moving things around and messing around and then once I wanted full scheduling I moved them to Auto Scheduling. (I was not sure what I thought about manual tasks at first but I really like them now for that early scheduling stage when you are building your WBS and just experimenting with timings before the real scheduling starts!) It has a custom field for aligning tasks to a specific dish (there is also a view that shows the tasks grouped by this field that I used to make sure I did not leave anything out). I used a bunch of Start-to-Finish links (first time I ever used one outside of a training class!) to make sure that if the service time moved that it would “re-flow” my cooking tasks in relation to the new date. I even went with an old-school feature and added a drawing object and pinned it to a specific task so I could have a vertical line on the Gantt chart tied to the “Guests Arrive” milestone to make it more visible. LOL
So download the beta (it pretty much kicks ass!), mess around with this project and have a good, filling and safe Thanksgiving holiday (or for those of you NOT in the US, have a great Thursday the 26th!) :-)
PS, the beta will install a little ‘Send a Smile’ and ‘Send a Frown’ tool for giving feedback and you should certainly make use of it if you find an issue. But if you find something really interesting or something you think is a big problem feel free to send me an email (brian.kennemer@microsoft.com) I would be interested in hearing about it.