taskjuggler / TaskJuggler

TaskJuggler - Project Management beyond Gantt chart drawing
http://www.taskjuggler.org
GNU General Public License v2.0
737 stars 171 forks source link

Bad resource allocation when combining task duration and limits weeklymax #83

Closed deusmax closed 11 years ago

deusmax commented 12 years ago

The resources are not properly allocated to the task of fixed duration when weeklymax is used.

Check the "Organization.html" report to see the bad resource allocation. Remove the weeklymax attribute and get a correct allocation (but not what we really want).

deusmax commented 12 years ago

How do I attach a file ?

Here is a sample tjp file to reproduce this:


project test "TEST" "1.0" 2012-04-13 - 2014-03-31 {
    timezone "Europe/Athens"
    # Hide the clock time. Only show the date.
    timeformat "%Y-%m-%d"
    # The currency for all money values is EUR.
    currency "EUR"
    now  ${projectstart}
    # limit working days
    dailyworkinghours 8
    weekstartsmonday
    workinghours mon - fri 08:00 - 16:00
    workinghours sat, sun  off
    # We want to compare the baseline scenario, to one with a slightly
    # delayed start.
    scenario plan "Plan" {
        scenario actual "Actual" {
            scenario trial "Trial" {
                active no
            }
        }
    }
    extend resource {
        text Phone "Phone"
    }
}
rate 100.0 
leaves holiday "Christmas"      2012-12-25,
       holiday "New Year's Day" 2013-01-01,
       holiday "Epiphany"       2013-01-06,
       holiday "Labor Day"      2013-05-01,
       holiday "Greek Easter"   2013-05-05,
       holiday "Ochi Day"       2013-10-28,
       holiday "Polytechneio"   2013-11-17,
       holiday "Christmas"      2013-12-25,
       holiday "New Year's Day" 2014-01-01,
       holiday "Epiphany"       2014-01-06,
       holiday "Labor Day"      2014-05-01,
       holiday "Ochi Day"       2014-10-28,
       holiday "Polytechneio"   2014-11-17,
       holiday "Christmas"      2014-12-25
flags team
resource people "People" {
    resource directors "Directors" {
        resource rp_m1 "Director1" {
            email "dir1@gmail.com"
            Phone  "x93555"
        }
    }
    resource lawyer "Lawyer" { }
    resource afs "Sales staff"  {
        resource rp_foo1 "Foo B." {
            email  "foobaz@gmail.com"
            Phone  "x97777"
        }
        managers rp_foo1
        resource rp_dib "Dib staff" {
            email  "dib@gmail.com"
            Phone  "x93666"
        }
        resource rp_sprv "Supervisor" { }
        resource rp_spc2 "Specialist"     { }
        resource rp_sima "SIMA"           { }
        flags team
    }
    resource itt "ITT staff" {
        resource rp_m2 "Staff2 T." {
            email "staff2@gmail.com"
            Phone "x9300"
        }
        managers rp_m2
        resource rp_head "Heads" { }
        resource supervisors "ITT supervisors" {
            resource rp_m3 "Staff3" {
                email "staff3@gmail.com"
                Phone "x9338"
            }
        }
        resource engineers "Engineers" {
            resource rp_eng1 "Eng 1" { }
            resource rp_eng2 "Eng 2" { }
            purge managers
            managers rp_m3
            flags team
        }
        flags team
    }
    managers directors
}
account costs "Project Cost" {
    account dev "Development"
    account eqp "Equipment"
    account sfw "Software"
    account doc "Documentation"
    account train "Training"
}
account rev "Payments" {
}
balance costs rev
task testT  "Test iT" {
    start ${projectstart}
    # All work related costs will be booked to this account unless the
    # sub tasks specifies it differently.
    chargeset dev
    task orgstruct "Organizational Structure" {
        allocate rp_m1, lawyer, rp_foo1, rp_head, rp_dib
        task mou "MOU signing" {
            start 2013-03-01
            duration 1m
#            effort 7d
            limits {
                maximum  5d  { resources rp_m1 } # weeklymax 2d
                maximum 12d { resources lawyer } # weeklymax 4d
                maximum 10d  { resources rp_foo1 } # weeklymax 3d
                maximum 10d weeklymax 4d { resources rp_dib } # weeklymax 3d
                maximum  5d  { resources rp_head } # weeklymax 2d
            }
        }
    } #endtask orgstruct
} # endtask test
#
# Reports follow here 
#
navigator navbar {
  hidereport @none
}
macro TaskTip [
  tooltip istask() -8<-
    '''Start: ''' <-query attribute='start'->
    '''End: ''' <-query attribute='end'->
    ----
    '''Resources:'''
    <-query attribute='resources'->
    ->8-
]
textreport frame "" {
  header -8<-
    == Test iT Project ==
    <[navigator id="navbar"]>
  ->8-
  footer "----"
  textreport index "Overview" {
    formats html
    center '<[report id="overview"]>'
  }
  textreport "AllTasks" {
    formats html
    center '<[report id="alltasks"]>'
  }
  textreport wps "WorkPackage" {
      textreport wp9 "Organization" {
          formats html
          center '<[report id="wp9"]>'
      }
  }
  textreport "ContactList" {
    formats html
    title "Contact List"
    center '<[report id="contactList"]>'
  }
  textreport "ResourceGraph" {
    formats html
    title "Resource Graph"
    center '<[report id="resourceGraph"]>'
  }
}
# A traditional Gantt chart with a project overview.
taskreport overview "" {
  header -8<-
    === Original Project Plan ===
  ->8-
  columns bsi { title 'WBS' },
          name, start, end, effort,  # cost, revenue,
          chart { ${TaskTip} }
  # For this report we like to have the abbreviated weekday in front
  # of the date. %a is the tag for this.
  timeformat "%a %Y-%m-%d"
  loadunit days
  sorttasks tree
  hidetask (isleaf() & ~ismilestone(plan))
  hideresource @all
  balance costs rev
  caption 'All effort values are in man days.'
  footer -8<-
    === Staffing ===
    See [[ResourceGraph]] for detailed resource allocations.
    === Current Status ===
    Check here for updates on the current situation.
    === MS Project ===
    A MS-Project file of the project is here [MSproject.xml]
  ->8-
}
taskreport alltasks "" { 
    columns bsi { title 'WBS' },
            name, start, end, effort,  # cost, revenue,
            chart { ${TaskTip} }
    # For this report we like to have the abbreviated weekday in front
    # of the date. %a is the tag for this.
    timeformat "%a %Y-%m-%d"
    loadunit days
    # sorttasks tree
    hidetask     @none 
    hideresource @all
    balance costs rev
    caption 'All effort values are in man days.'
}
# Macro to set the background color of a cell according to the alert
# level of the task.
macro AlertColor [
  cellcolor plan.alert = 0 "#00D000" # green
  cellcolor plan.alert = 1 "#D0D000" # yellow
  cellcolor plan.alert = 2 "#D00000" # red
]
# A list of tasks showing the resources assigned to each task.
macro rep_workpackage  [
    taskreport wp${1} "" {
        headline "Work package ${1} - Resource Allocation Report"
        columns bsi { title 'WBS' }, name, start, end, effort { title "Work" },
                duration, chart { ${TaskTip} scale day width 500 }
        timeformat "%Y-%m-%d"
        loadunit days
        hideresource ~(isleaf() & isleaf_())
        sortresources name.up
        taskroot testT.${2}
    }
]
${rep_workpackage "9" "orgstruct"}
# A list of all employees with their contact details.
resourcereport contactList "" {
    headline "Contact list and duty plan"
    columns name,
            email { celltext 1 "[mailto:<-email-> <-email->]" },
            managers { title "Manager" },
            chart { scale day }
    hideresource ~isleaf()
    sortresources tree
    hidetask @all
}
# A graph showing resource allocation. It identifies whether each
# resource is under- or over-allocated for.
resourcereport resourceGraph "" {
    headline "Resource Allocation Graph"
    columns no, name, effort, rate, weekly { ${TaskTip} }
    loadunit shortauto
    # We only like to show leaf tasks for leaf resources.
    hidetask ~(isleaf() & isleaf_())
    sorttasks plan.start.up
}
accountreport "Accounting" {
    formats html
    headline "P&L for the Project"
    columns no, name, monthly
    caption "Profit and Loss Analysis and Cashflow"
}
accountreport "TeamBudget" {
  formats html
  accountroot costs
  balance -
  columns no, name, quarterly { celltext 1 "<-query attribute='turnover'->" }
}
# Local Variables:
# mode: taskjuggler
# tab-width: 4
# indent-tabs-mode: nil
# End:
scrapper commented 11 years ago

What do you mean by "resources are not properly allocated". Please provide a more detailed error description.

scrapper commented 11 years ago

Closed due to lack of response.