# NOT RUN {
# Example #1: Only with activities
sch <- sch_new() %>%
sch_add_activity(1L, "Task 1", 5L) %>%
sch_add_activity(2L, "Task 2", 6L) %>%
sch_add_activity(3L, "Task 3", 8L) %>%
sch_add_activity(4L, "Task 4", 6L) %>%
sch_add_activity(5L, "Task 5", 9L) %>%
sch_add_activity(6L, "Task 6", 3L) %>%
sch_add_activity(7L, "Task 7", 4L) %>%
sch_plan()
sch_duration(sch)
sch_activities(sch)
# Example #2: With activities and relations.
sch <- sch_new() %>%
sch_add_activity(1L, "Task 1", 5L, 2L, 3L) %>%
sch_add_activity(2L, "Task 2", 6L, 4L) %>%
sch_add_activity(3L, "Task 3", 8L, 5L) %>%
sch_add_activity(4L, "Task 4", 6L, 6L) %>%
sch_add_activity(5L, "Task 5", 9L, 6L) %>%
sch_add_activity(6L, "Task 6", 3L, 7L) %>%
sch_add_activity(7L, "Task 7", 4L) %>%
sch_plan()
sch_duration(sch)
sch_activities(sch)
sch_relations(sch)
# }
Run the code above in your browser using DataLab