Usually this function is called after a raw plan with tasks was prepared by wrangle_raw_plan. It takes a set of tasks and their estimated duration as well as dependencies between those tasks. This implicitly defines start and end dates for each task and this function calculates the corresponding explicit start and end times

calculate_time_lines(df)

Arguments

df

A data.frame preprocessed by wrangle_raw_plan.

Value

A data.table object with explicit start and end times for every (grouped) task

misc. columns

columns from df

time_start/end

calculated start- and end-time of a task

dist_end_to_deadline

number of workdays (weekends exludede) from the calculated end-time to the specified deadline

See also

Examples

raw_plan <- import_xlsx(system.file("template","projects.xlsx", package = "projectPlan")) pre_plan <- wrangle_raw_plan(raw_plan) calculate_time_lines(pre_plan)
#> WARN -- 2019-12-28 09:25:25 -- projectPlan/h.exclude_weekends(earliest_start_time, end): start 2019-12-28 is on a weekend. Shift end 2019-12-29 by 2 day(s).
#> project id depends_on #> 1: kitchen kitchen::NOT_SPECIFIED_1 NA #> 2: kitchen kitchen::roughplan kitchen::NOT_SPECIFIED_1 #> 3: kitchen kitchen::NOT_SPECIFIED_3 NA #> 4: kitchen kitchen::NOT_SPECIFIED_4 kitchen::NOT_SPECIFIED_3,kitchen::roughplan #> 5: kitchen kitchen::plan kitchen::NOT_SPECIFIED_4 #> 6: kitchen kitchen::buy kitchen::plan #> 7: kitchen kitchen::NOT_SPECIFIED_7 kitchen::plan #> 8: kitchen kitchen::NOT_SPECIFIED_8 kitchen::buy,kitchen::NOT_SPECIFIED_7 #> start prior_ids #> 1: NA NA #> 2: NA kitchen::NOT_SPECIFIED_1 #> 3: kitchen::roughplan kitchen::roughplan #> 4: NA kitchen::NOT_SPECIFIED_3,kitchen::roughplan #> 5: NA kitchen::NOT_SPECIFIED_4 #> 6: NA kitchen::plan #> 7: NA kitchen::plan #> 8: NA kitchen::buy,kitchen::NOT_SPECIFIED_7 #> section resource #> 1: kitchen::0_prep I #> 2: kitchen::0_prep I #> 3: kitchen::0_prep F1, F2, I #> 4: kitchen::1_offer Company, I #> 5: kitchen::1_offer Company, I #> 6: kitchen::1_offer I #> 7: kitchen::2_installation I #> 8: kitchen::2_installation Company, I #> task progress deadline #> 1: measure kitchen 0 <NA> #> 2: make a rough plan 0 <NA> #> 3: ask friends which companies they can recommend 0 <NA> #> 4: make appointment with company for planning 0 <NA> #> 5: plan new kitchen 0 <NA> #> 6: buy new kitchen 0 <NA> #> 7: make appointment for installation 0 <NA> #> 8: installation of the new kitchen 0 2020-02-07 #> fixed_start_date fixed_end_date est_days waiting aborted unscheduled #> 1: 2019-12-28 <NA> 1 FALSE FALSE TRUE #> 2: <NA> <NA> 2 FALSE FALSE TRUE #> 3: <NA> <NA> 2 FALSE FALSE TRUE #> 4: <NA> <NA> 5 FALSE FALSE TRUE #> 5: <NA> <NA> 1 FALSE FALSE TRUE #> 6: <NA> <NA> 1 FALSE FALSE TRUE #> 7: <NA> <NA> 1 FALSE FALSE TRUE #> 8: <NA> <NA> 1 FALSE FALSE TRUE #> nmb_combined_entries time_start time_end dist_end_to_deadline #> 1: 1 2019-12-28 2019-12-31 NA days #> 2: 1 2019-12-31 2020-01-02 NA days #> 3: 1 2020-01-02 2020-01-06 NA days #> 4: 1 2020-01-06 2020-01-13 NA days #> 5: 1 2020-01-13 2020-01-14 NA days #> 6: 1 2020-01-14 2020-01-15 NA days #> 7: 1 2020-01-14 2020-01-15 NA days #> 8: 1 2020-01-15 2020-01-16 16 days