optimiseSD: (Spatial) optimisation of sampling designs

Description Usage Arguments Details Value Author(s)

View source: R/optimiseSD.R

Description

This function optimises a sampling design to achieve minimal cost for a given cost function by applying a given optimisation function. It may take into account fix locations or constrain search to a subset of locations.

Usage

1
2
3
4
5
6
optimiseSD(simulations, costFun,
  locationsAll = 1:nLocations(simulations), locationsFix = integer(0),
  locationsInitial = integer(0),
  aimCost = NA, aimNumber = NA,
  optimisationFun,
  nameSave = NA, plot = FALSE, verbatim = FALSE, ...)

Arguments

simulations

Simulations object

costFun

cost function, must have parameters simulations and locations (may be prepared by replaceDefault with type = "costFun.optimiseSD"); it must return cost as a single value or a list where this is the first entry

locationsAll

indices of the locations that are considered possible sensor locations, by default these are all locations

locationsFix

indices of locations with fix sensors – to be considered when computing cost, by default this is empty

locationsInitial

indices of locations where sensors are initially; by default this is empty; if not indicated aimNumber random locations may be used, depending on the

aimCost

limit value of the costFun: the result has to fall below

aimNumber

if no locationsInitial given, it starts from this number of random locations

optimisationFun

function that executes an optimisation algorithm; must have parameters simulations, costFun, locationsAll, locationsFix, locationsInitial, aimCost, aimNumber, nameSave (use type = "optimisationFun.optimiseSD" in replaceDefault). Output must be a list with SD (vector, matrix, or list of one or several SDs) and cost (belonging to the SD); it may return other values in report

nameSave

character path and name (without suffix!) where to save intermediate results (sampling design of each iteration)

plot

if iteration is plotted (currently disabled)

verbatim

print intermediate results and keep sampling designs and cost of all iterations

...

further parameters, currently unused

Details

For examples see optimiseSD_genetic, optimiseSD_global, optimiseSD_greedy, optimiseSD_manual,optimiseSD_ssa.

Value

A list

SD

list, each entry is a matrix of the best (lowest cost) sampling designs found of a size - sampling designs in rows; including locationsFix

evaluation

data.frame, each row belongs to the SD of one size, giving the number of sensors and the cost

aimSD

list indicating which of the SD fulfil the given aimCost and aimNumber, can be empty if no aims given or aims not reached

report

algorithm-specific, e.g. all tested SDs etc., see there.

Author(s)

Kristina B. Helle, kristina.helle@uni-muenster.de


sensors4plumes documentation built on May 1, 2019, 10:27 p.m.