generateVertex {labsimplex} | R Documentation |
Generates the new vertex of a simplex optimization
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
generateVertex(simplex, qflv = NULL, crit = "max", algor = "fixed",
overwrite = FALSE)
Arguments
simplex |
object of class |
qflv |
response for the vertex (or vertexes) without responses |
crit |
optimization criteria indicating if the goal is maximize
( |
algor |
algorithm to be followed in the vertex generation.
|
overwrite |
logical argument. If |
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
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)