This function tranforms the output of a Gurobi opitimisation into map coordinates

read_CHWplacement_sol(
  population.raster,
  friction.raster,
  shp,
  name,
  buffer,
  radius,
  capacity.name,
  access.raster,
  popurb.raster,
  is.inside,
  filepath,
  write = F,
  check = TRUE
)

Arguments

population.raster

raster map containing population densities

friction.raster

raster map containing friction surface

shp

shapefile of the area of interest

name

name (character) of the .sol file

buffer

buffer around current HF

radius

dimension of the radius around the point (same dimension as T.GC, e.g minutes)

capacity.name

name (character) given to the capacity definition (for folder naming purposes)

access.raster

raster map containing the distance to HF layer

popurb.raster

raster map containing the urban population layer (urban pixels show the population in the pixel and the rural pixels are NA). Can be created with DefineUrban.

is.inside

whether CHW are placed inside the buffer (if FALSE, they are placed outside)

filepath

directory where to store the MPS file

write

if TRUE, the output is written as a csv file in filepath

check

Run sanity checks?

Value

a MPS file containing the optimisation program