evalReal: Evaluate new iterate on real function(s)

Description Usage Arguments Details Value See Also

View source: R/evalReal.R

Description

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).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
evalReal(
  cobra,
  ev1,
  xNew,
  fValue,
  feval,
  optimConv,
  optimTime,
  currentEps,
  fitnessSurrogate = cobra$fitnessSurrogate
)

Arguments

cobra

an object of class COBRA, this is a (long) list containing all settings from cobraPhaseII

ev1

a list, initially empty, gradually filled by calls to evalReal

xNew

the new point, see cobraPhaseII

fValue

fitness value estimated for xNew

feval

function evaluations on surrogates needed by COBRA optimizer

optimConv

see cobraPhaseII

optimTime

see cobraPhaseII

currentEps

artificial current margin for the equality constraints: A point is said to be artificially feasible, if h_j(x) - currentEps ≤ 0, -h_j(x) - currentEps ≤ 0, for all equality constraints and if it is feasible in the inequality constraints.

fitnessSurrogate

[cobra$fitnessSurrogate] see cobraPhaseII

Details

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

∑_i{\max(0,g_i(x))} + ∑_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.

Value

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

In addition, ev1 has these elements:

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 the last four values are for xNew after the refine step. In this case, the first three elements newNumViol, newNumPred, and newMaxViol refer to the artificially enlarged equality constraints, i.e.

h_j(x) - currentEps ≤ 0, -h_j(x) - currentEps ≤ 0,

and the true inequality constraints max(0,g_i(x)). The last element trueMaxViol measures the maximum violation among the true equality constraints |h_j(x)| and the true inequality constraints max(0,g_i(x)).

See Also

cobraPhaseII


SACOBRA documentation built on March 26, 2020, 7:15 p.m.