Description Usage Arguments Value Author(s) See Also Examples
Improve the feasible solution using the SACOBRA optimizer phase II
by searching new infill points with the help of RBF surrogate models.
May be even called if no feasible solution is found yet, then phase II will try to find
feasible solutions.
The problem to solve iteratively is:
\mbox{Minimize}\quad f(\vec{x}) , \vec{x} \in [\vec{a},\vec{b}] \subset \mathbf{R}^d
\mbox{subject to}\quad g_i(\vec{x}) ≤ 0, i=1,…,m
\mbox{~~~~~~~~~~}\quad\quad h_j(\vec{x}) = 0, j=1,…,r.
In this phase the main optimization steps are repeated in a loop as long as the budget is not exhausted.
In every iteration the surrogate models are updated and an optimization on the surrogates is done in order
to find a better feasible solution.
1 | cobraPhaseII(cobra)
|
cobra |
an object of class COBRA, this is a (long) list containing all settings
from |
cobra
, an object of class COBRA from cobraInit
,
enhanced here by the following elements (among others):
|
function accepting a |
|
data frame with summary of the optimization run (see below) |
|
data frame with additional summary information (see below) |
|
data frame with additional summary information for TR (see below) |
|
|
|
a vector of the objective values of all evaluated points |
|
a |
|
a |
|
the best feasible objective value found |
|
the point in input space yielding the best feasible objective value |
|
the corresponding iteration number (row of cobra$df, of cobra$A) |
|
If TRUE, then the objective surrogate model is trained on the
|
Note that cobra$Fres
, cobra$fbest
, cobra$fbestArray
and similar contain
always the objective values of the orignial function cobra$fn[1]
. (The surrogate models
may be trained on a plog
-transformed version of this function.)
feval
= cobra$feval
is the maximum number of function evaluations.
The data frame cobra$df
contains one row per iteration with columns
iteration index
true objective value Fres
surrogate objective value. Note: The surrogate may be trained on
plog-transformed training data, but predY
is transformed back to the original
objective range. NA for the initial design points.
surrogate objective value at best-known solution cobra$solu
, if given.
If cobra$solu
is NULL, take the current point instead. Note: The surrogate may be trained on
plog-transformed training data, but predSolu
is transformed back to the original
objective range. NA for the initial design points.
boolean indicating the feasibiltiy of infill point
boolean indicating if each infill point is feasible for cobra$constraintSurrogates
number of violated constraints
maximum constraint violation.
number of function evaluations in sequential optimizer. NA if it was a repair step
ever-best feasible objective value fbest
. As long as there is
no feasible point, take among those with minimum number of violated constraints the
one with minimum Fres.
e.g. "COBYLA"
in sec
optimizer convergence code
distance of the current point (row of cobra$A
) to the true solution
cobra$solu
in rescaled space. If there is more than one solution, take the one
which has the minimum distance element (since this is the solution to which the
current run converges).
same as dist
, but in original space
the DRC element used in the current iteration
the used seed in every run
The data frame cobra$df2
contains one row per phase-II-iteration with columns
iteration index
surrogate objective value. Note: The surrogate may be trained on
plog-transformed training data, but predY
is transformed back to the original
objective range. NA for the initial design points.
surrogate objective value + penalty
surrogate objective value at true solution (see cobra$df$predSolu
)
surrogate objective value + penalty at true solution (only diagnostics)
the sigmaD element used in the current iteration (see cobraInit
)
penalty factor used in the current iteration (see cobraInit
)
the DRC element used in the current iteration
the current used margin for constraint function modeling (see epsilonInit
in cobraInit
)
Wolfgang Konen, Samineh Bagheri, Patrick Koch, Cologne University of Applied Sciences
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Initialize cobra. The problem to solve is the unconstrained sphere function sum(x^2).
## In version 1.1 and higher there is no need for defining a dummy
## constraint function for the unconstrained problems
d=2
fName="sphere"
cobra <- cobraInit(xStart=rep(5,d), fName=fName,
fn=function(x){c(obj=sum(x^2))},
lower=rep(-10,d), upper=rep(10,d), feval=40)
## Run cobra optimizer
cobra <- cobraPhaseII(cobra)
## The true solution is at solu = c(0,0)
## where the true optimum is fn(solu)[1] = optim = 0
## The solution found by SACOBRA:
print(getXbest(cobra))
print(getFbest(cobra))
## Plot the resulting error (best-so-far feasible optimizer result - true optimum)
## on a logarithmic scale:
optim = 0
plot(cobra$df$Best-optim,log="y",type="l",ylab="error",xlab="iteration",main=fName)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.