Description Usage Arguments Value Examples

View source: R/performMultiObjectiveLocalSearch.R

Given three initial points `x1`

, `x2`

and `x3`

, of which is known that
the angle between `x2 - x1`

and `x3 - x2`

is larger than 90 degree (i.e.,
they point in opposite directions), this optimizer tries to find a local effient
point that has to be located betwen `x1`

and `x2`

.

1 2 3 | ```
performMultiObjectiveLocalSearch(x1, x2, x3, fn1, fn2, prec.grad = 1e-06,
prec.norm = 1e-06, prec.angle = 1e-04, scale.step = 0.5, lower,
upper, max.steps = 1000L)
``` |

`x1` |
[ |

`x2` |
[ |

`x3` |
[ |

`fn1` |
[ |

`fn2` |
[ |

`prec.grad` |
[ |

`prec.norm` |
[ |

`prec.angle` |
[ |

`scale.step` |
[ |

`lower` |
[ |

`upper` |
[ |

`max.steps` |
[ |

[`list(5L)`

]

List containing the matrix of points, which were visited in the course
of the optimization, another matrix providing the number of performed
function evaluations, two vectors providing the single-objective gradients
of the last individual and a logical flag, indicating whether the optimizer
found a local efficient point.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
# Define two single-objective test problems:
fn1 = function(x) sum((x - c(2, 0))^2)
fn2 = function(x) sum((x - c(0, 1))^2)
# Visualize locally efficient set, i.e., the "area" where we ideally want to find a point:
plot(c(2, 0), c(0, 1), type = "o", pch = 19,
xlab = expression(x[1]), ylab = expression(x[2]), las = 1, asp = 1)
text(2, 0, "Optimum of fn1", pos = 2, offset = 1.5)
text(0, 1, "Optimum of fn2", pos = 4, offset = 1.5)
# Place two points x1 and x2 on opposite sides of the bi-objective optimum:
x1 = c(1, 1)
x2 = c(0.5, 0)
x3 = c(0.8, 0.2)
points(rbind(x1, x2, x3), pch = 19, type = "o", lty = "dotted")
text(rbind(x1, x2, x3), labels = c("x1", "x2", "x3"), pos = 4)
# Optimize using weighted bisection optimization:
result = performMultiObjectiveLocalSearch(x1 = x1, x2 = x2, x3 = x3,
fn1 = fn1, fn2 = fn2, lower = c(0, 0), upper = c(2, 1))
opt.path = result$opt.path
# Visualize the optimization path:
points(opt.path)
# Highlight the found local efficient point (= local optimum w.r.t. both objectives):
n = nrow(opt.path)
points(opt.path[n, 1], opt.path[n, 2], pch = 4, col = "red", cex = 2)
text(opt.path[n, 1], opt.path[n, 2], "Found Local Efficient Point", pos = 4, offset = 1.5)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.