old projectified

where brian kennemer used to endlessly obsess about project server, so that you did not have to

November, 2009

Posts
  • old projectified

    Three Point Estimation (PERT) in Project 2010: Take 1

    • 7 Comments
     

    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:

    Field Name Purpose
    Duration1 Optimistic Duration
    Duration2 Most Likely Duration
    Duration3 Pessimistic Duration
    Number1 Optimistic Weight
    Number2 Most Likely Weight
    Number3 Pessimistic Weight
    Text30 Calculation State

     

    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.)

    image

     

    To use this sample code in your own projects:

    1. Open Project 2010
    2. Click on the View Tab of the Ribbon
    3. Click Macro | Visual Basic
    4. Double Click on the “ThisProject (Global.MPT)” node just under the ProjectGlobal node
      image
    5. In the code window that opens up on the right paste in the code below
    6. Decide if you want to use only one set of weights or if you want each task to have its own set of weights
      If you want one set leave the code as it is. If you want separate weights then change this: “UseOneSetofWeights = True” to this:
      ”UseOneSetofWeights = False”
    7. Close the Visual Basic Editor
    8. Click on the “Customize Quick Access Toolbar” item on the ribbon
      image
    9. Click on “More Commands”
    10. In the “Choose commands from” list box pick “Macros”
    11. Select “PERT” in the left hand box and then click the Add button
      image
    12. Click OK

     

    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:

    • Should there be the ability to specify which tasks should have their Durations estimated when the tool is run?
    • Do you prefer a form for setting the weights?
    • What other options would you like to see?

     

    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 Task
    Dim tskFirst As Task
    Dim FoundBadWeights As Boolean
    Dim UseOneSetofWeights As Boolean

    UseOneSetofWeights = True
    FoundBadWeights = 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 tskT
    Else
        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 tskT
    End If
    If 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 If
    End Sub

  • old projectified

    New Project Server Admin Blog

    • 0 Comments

    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.

  • old projectified

    It’s a Thanksgiving Beta!

    • 4 Comments

    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:

    image

    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.

Page 1 of 1 (3 items)