Helper for cobraPhaseII
: The new iterate xNew
, which was found by optimization
on the surrogate models, is evaluated on the real function cobra$fn
. In the case of equality
constraints, evalReal
does the additional refine step (see Details).
evalReal(
cobra,
ev1,
xNew,
fValue,
feval,
optimConv,
optimTime,
currentEps,
fitnessSurrogate = cobra$fitnessSurrogate
)
an object of class COBRA, this is a (long) list containing all settings
from cobraPhaseII
a list, initially empty, gradually filled by calls to evalReal
the new point, see cobraPhaseII
fitness value estimated for xNew
function evaluations on surrogates needed by COBRA optimizer
see cobraPhaseII
see cobraPhaseII
artificial current margin for the equality constraints: A point is said to be artificially feasible, if \(h_j(x) - currentEps \le 0, -h_j(x) - currentEps \le 0,\) for all equality constraints and if it is feasible in the inequality constraints.
[cobra$fitnessSurrogate
] see cobraPhaseII
ev1
, a list with the following n
-dim vectors ( n
= number of
iterations, the last element is from the new iterate / point xNew
):
predY
prediction of fitnessSurrogate
at xNew
predVal
fvalue
(fitness + penalty in case of NMKB et al.)
feval
function evaluations on surrogates needed by COBRA optimizer
optimizerConvergence
see cobraPhaseII
optimizationTime
see cobraPhaseII
predC
prediction of cobra$constraintSurrogates
at xNew
feas
TRUE, if xNew
is feasible for the current constraints
feasPred
TRUE, if xNew
is feasible for cobra$constraintSurrogates
xNew
d
-dim vector, the new point, refined in the case of equality handling
xNewEval
cobra$fn(xNew)
, an (1+nConstraints)
-dim vector
(objective,constraints)
newNumViol
scalar, the number of constraint violations (above
cobra$conTol
) on true constraints from xNewEval
newNumPred
scalar, the number of constraint violations (above
cobra$conTol
) on constraint surrogates for xNew
newMaxViol
scalar, the maximum constraint violation (with
currentEps
subtracted) on true constraints from xNewEval
trueMaxViol
scalar, the maximum constraint violation (w/o
currentEps
subtracted) on true constraints from xNewEval
If cobra$equHandle$active==TRUE
, then xNew
is first refined: The artificially feasible
solution xNew
is replaced by a refined solution ev1$xNew
.
ev1$xNew
is created by using optim
to minimize the function
$$ \sum_i{\max(0,g_i(x))} + \sum_j{h_j^2(x) } $$
Ideally, the refined solution ev1$xNew
should be on the equality constraints
(within machine accuracy), but there is no guarantee that optim
reaches this desired result.