project limits "Limits" "1.0" 2007-03-01 +1y {
  timezone "Europe/Amsterdam"
}

# Default limit that affects all subsequently defined resources
limits { weeklymax 4d }

# *** EXAMPLE: 1 +
# *** EXAMPLE: 2 +
# *** EXAMPLE: 3 +
# *** EXAMPLE: 4 +
# *** EXAMPLE: 6 +
resource r1 "R1" {
  # Limit the usage of this resource to a maximum of 2 hours per day,
  # 6 hours per week and 2.5 days per month.
  limits { dailymax 2h weeklymax 6h monthlymax 2.5d }
}
# *** EXAMPLE: 6 -

resource r2 "R2"

# *** EXAMPLE: 2 -
# *** EXAMPLE: 3 -
# *** EXAMPLE: 4 -
task t1 "Task 1" {
  start 2007-03-30
  effort 10d
  allocate r2
  limits { dailymax 3h }
}
# *** EXAMPLE: 4 +
task t2 "Task 2" {
  start 2007-03-30
  effort 10d
  allocate r2
  limits { dailymin 5h }
}
# *** EXAMPLE: 1 -
# *** EXAMPLE: 2 +
# *** EXAMPLE: 4 -
task t3 "Task 3" {
  start 2007-03-30
  effort 10d
  allocate r2
  limits { weeklymax 2d }
}
# *** EXAMPLE: 2 -
# *** EXAMPLE: 3 +
task t4 "Task 4" {
  start 2007-03-30
  effort 10d
  allocate r2
  limits { monthlymax 1w }
}
# *** EXAMPLE: 1 +
# *** EXAMPLE: 2 +
# *** EXAMPLE: 4 +
task t5 "Task 5" {
  start ${projectstart}
  duration 60d
  # allocation is subject to resource limits
  allocate r1
}
# *** EXAMPLE: 4 -
task t6 "Task 6" {
  start ${projectstart}
  duration 60d
  allocate r2
  limits { dailymax 4h weeklymax 3d monthlymax 2w }
}
# *** EXAMPLE: 3 -
# *** EXAMPLE: 5 +
# *** EXAMPLE: 4 +
task t7 "Task 7" {
  start 2007-06-20
  duration 20d
  allocate r1, r2
  # limits can also be specified per resource
  limits {
    # Limit r1 to half days only
    dailymax 4h { resources r1 }
    # Limit r2 to 6 hours per day
    dailymax 6h { resources r2 }
  }
}
# *** EXAMPLE: 1 -
# *** EXAMPLE: 2 -
# *** EXAMPLE: 4 -
# *** EXAMPLE: 5 -

