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 ):
predYprediction of fitnessSurrogate at xNew
predValfvalue (fitness + penalty in case of NMKB et al.)
fevalfunction evaluations on surrogates needed by COBRA optimizer
optimizerConvergencesee cobraPhaseII
optimizationTimesee cobraPhaseII
predCprediction of cobra$constraintSurrogates at xNew
feasTRUE, if xNew is feasible for the current constraints
feasPredTRUE, if xNew is feasible for cobra$constraintSurrogates
xNewd-dim vector, the new point, refined in the case of equality handling
xNewEvalcobra$fn(xNew), an (1+nConstraints)-dim vector
(objective,constraints)
newNumViolscalar, the number of constraint violations (above
cobra$conTol) on true constraints from xNewEval
newNumPredscalar, the number of constraint violations (above
cobra$conTol) on constraint surrogates for xNew
newMaxViolscalar, the maximum constraint violation (with
currentEps subtracted) on true constraints from xNewEval
trueMaxViolscalar, 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.