# This script shows how to set up practical units for
# doing workhour and employee-count computations.

@aliases(workhours)
unit workhour

@aliases(workdays)
unit workday = 8 workhours

@aliases(workyears)
unit workyear = 200 workdays

unit FTE = 1 workyear per year

let rate = 1000 € / workday
print(0.5 million € / rate)
assert_eq(0.5 million € / rate, 500 workday)

let budget = 0.5 million €
let duration = 0.5 year
print(3 FTE * 0.5 years -> workdays)
print(budget / rate / duration -> FTE)
assert_eq(3 FTE * 0.5 years -> workdays, 300 workday)
assert_eq(budget / rate / duration -> FTE, 5 FTE, 1e-6 FTE)
