Skip to content

Commit

Permalink
Starter for 10 on #374
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Feb 14, 2024
1 parent 2b219c5 commit 4ecd72c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ tar_target(od_school, {

# School routing ----------------------------------------------------------

# Iterate over each value in parameters$plans with dynamic branching in the targets package:
tar_target(rs_school_plans, {
get_routes(od = od_school %>% slice_max(n = parameters$max_to_route, order_by = all, with_ties = FALSE),
plans = parameters$plans,
purpose = "school",
folder = paste0("outputdata/", parameters$date_routing),
date = parameters$date_routing,
segments = "both")
}
pattern = map(parameters$plans),
iteration = "list",
),
tar_target(rs_school_fastest, {
rs = get_routes(od = od_school %>% slice_max(n = parameters$max_to_route, order_by = all, with_ties = FALSE),
plans = "fastest",
Expand Down

0 comments on commit 4ecd72c

Please sign in to comment.