Estimate multi-objective Pareto front using NSGAII

paretoObjectivesNsga2(
  MODEL,
  objective = hydromad.getOption("objective"),
  control = hydromad.getOption("nsga2.control")
)

Arguments

MODEL

a model specification created by hydromad. It should not be fully specified, i.e one or more parameters should be defined by ranges of values rather than exact values.

objective

objective functions to maximise, as a list with elements as function(Q, X, ...). See objFunVal.

control

arguments for nsga2 function. See nsga2.

Value

runlist of models on Pareto front

Author

Joseph Guillaume

Examples


data(Cotter)
x <- Cotter[1:1000]

## IHACRES CWI model with exponential unit hydrograph
## an unfitted model, with ranges of possible parameter values
modx <- hydromad(x,
  sma = "cwi", routing = "expuh",
  tau_s = c(2, 100), v_s = c(0, 1)
)
## Multi-objective optimisation
front <- paretoObjectivesNsga2(modx, objective = list(hmadstat("r.sq.log"), hmadstat("r.squared")))
#> Loading required namespace: mco
## Pairwise plot of parameters on Pareto front
splom(coef(front))

## Calculate objectives
stats <- t(sapply(front, objFunVal, objective = list(hmadstat("r.sq.log"), hmadstat("r.squared"))))
splom(stats)