generateVertex: Generates the new vertex of a simplex optimization

Description Usage Arguments Details Value Author(s) Examples

View source: R/generateVertex.R

Description

Gives the coordinates for the new vertex that must be performed based on the responses for the vertexes on the current simplex and considering the optimization criteria.

Usage

1
2
generateVertex(simplex, qflv = NULL, crit = "max", algor = "fixed",
  overwrite = FALSE)

Arguments

simplex

object of class smplx with the simplex information. See labsimplex

qflv

response for the vertex (or vertexes) without responses

crit

optimization criteria indicating if the goal is maximize ('max') or minimize ('min') the response. It can also be a numeric value to which the response is supposed to approach

algor

algorithm to be followed in the vertex generation. 'fixed' for a fixed step-size simplex or 'variable' for a variable step-size simplex

overwrite

logical argument. If TRUE, the output simplex will replace the one provided in the simplex parameter. Default overwrite = FALSE

Details

When minimization is the criteria, the algorithm will tend to approach zero. If negative responses are possible and the most negative value is desired, a very large negative number must be provided in crit parameter.

Value

An object of class smplx with the new simplex information including the conditions for the new experiment to be permormed.

Author(s)

Cristhian Paredes, craparedesca@unal.edu.co

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  simplex <- labsimplex(n = 3, centroid = c(320, 7, 0.4),
                        stepsize = c(35, 2, 0.3))
  ## The experiments must be performed and the responses passed to qflv.
  ## Here we get the responses by using an example response surface
  ## included in the package:
  ##
  ## Initially, the response must be provided for all the vertexes
  response <- exampleSurfaceR3(x1 = simplex$coords[, 1],
                               x2 = simplex$coords[, 2],
                               x3 = simplex$coords[, 3])
  simplex <- generateVertex(simplex = simplex, qflv = response)

  ## After this, the last vertex is the only one that must be evaluated
  response <- exampleSurfaceR3(x1 = simplex$coords[nrow(simplex$coords), 1],
                               x2 = simplex$coords[nrow(simplex$coords), 2],
                               x3 = simplex$coords[nrow(simplex$coords), 3])
  simplex <- generateVertex(simplex = simplex, qflv = response)

  ## Alternatively the simplex object can overwrite the older one:
  generateVertex(simplex = simplex, qflv = response, overwrite = TRUE)

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