lcp_rds_infield: Connect satellite pads to their CPF via infield roads

View source: R/simulate_inf.R

lcp_rds_infieldR Documentation

Connect satellite pads to their CPF via infield roads

Description

lcp_rds_infield is a helper function that uses least cost paths to connect satellite pads to their parent central processing facility (CPF) via infield roads. Used by generate_sat_rd.

Usage

lcp_rds_infield(
  x,
  tr,
  cost.map,
  cpf.df,
  min.dist.exist,
  wd.loc,
  path.out,
  scenario,
  n.iter,
  j,
  z = NULL,
  i = NULL,
  debug.out = FALSE
)

Arguments

x

data.frame of satellite pad locations, created within generate_sat_rd. This may contain all satellite pad locations, or a subset, depending on the scenario being analyzed.

tr

Scenario-specific TransitionLayer object, used by the gdistance package for creating least cost paths.

cost.map

RasterLayer indicating land and water areas, used in gravel pad simulation. Created by prep_general_inputs.

cpf.df

data.frame of CPF point locations. Created by generate_cpf.

min.dist.exist

Proximity order-sorted data.frame of distance from CPFs to existing infrastructure. Created within generate_sat_rd.

wd.loc

Character string identifying the base directory containing both input and output data folders.

path.out

Character string identifying the relative path from the base directory (wd.loc) to where output data will be saved. Defaults to an "Output_Data" folder within the base folder.

scenario

Vector of character strings identifying the scenarios being run.

n.iter

Integer indicating the desired number of iterations to be run for each scenario. Defaults to 100.

j

Iterator used within generate_sat_rd to indicate the current CPF being analyzed.

z

Iterator value used by dia to specify the development scenario being analyzed.

i

Iterator value used by dia to run development simulation and impacts analyses in parallel, indicating the specific iteration being run.

debug.out

Logical indicator of whether intermediate infrastructure .csv files should be written out for the purpose of debugging code. Defaults to FALSE.

Value

List containing two objects, a temporary data.frame of generated road coordinates (tmp_rd_df) and a temporary SpatialLines object depicting generated roads (tmp_rd_sl). These are fed into lcp_rds_outfield.


tfullman/dia documentation built on Oct. 17, 2023, 6:31 p.m.