addSimplex2Surface: Adds the simplex movements to a response surface contour

Description Usage Arguments Value Author(s) See Also Examples

Description

The function complements the contour plot produced by using cntr function. Given a contour plot and a simplex (an object of class smplx) the function adds the simplex movements to the contour plot to illustrate the optimization process and the path that was followed.

Usage

1
addSimplex2Surface(p, simplex)

Arguments

p

contour plot produced by using cntr function

simplex

simplex object of class smplx. Usually produced using exampleOptimization

Value

a ggplot object with the optimization path over the contour plot provided.

Author(s)

Cristhian Paredes, craparedesca@unal.edu.co

Jesús Ágreda, jagreda@unal.edu.co

See Also

cntr exampleOptimization

Examples

1
2
3
4
5
6
simplex <- exampleOptimization(surface = exampleSurfaceR2,
                               centroid = c(7, 340),
                               stepsize = c(1.2, 15))
p <- cntr(surface = exampleSurfaceR2)
p <- addSimplex2Surface(p = p, simplex = simplex)
print(p)

labsimplex documentation built on July 1, 2020, 9:08 p.m.