Learn R Programming

SACOBRA (version 1.2)

updateSaveCobra: Update and save cobra

Description

Helper for cobraPhaseII: make some assertion tests, update elements in object cobra, including data frames df and df2, and - if cobra$saveIntermediate==TRUE - save cobra in subdir results/. Most importantly cobra$xbest, cobra$fbest, cobra$ibest are updated. They characterize the best feasible point (least violating point if no feasible point was found so far) and influence the next starting point.

Usage

updateSaveCobra(
  cobra,
  ev1,
  subMin,
  sigmaD,
  penaF,
  gama,
  EPS,
  fitFuncPenalRBF,
  distRequirement,
  fitnessSurrogate = cobra$fitnessSurrogate
)

Arguments

cobra

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

ev1

a list filled by calls to evalReal. We need here the elements xNew, feas, feasPred, feval, optimizerConvergence, optimizationTime, predY, predVal

subMin
sigmaD
penaF
gama
fitFuncPenalRBF

helper function from cobraPhaseII

distRequirement

helper function from cobraPhaseII

fitnessSurrogate

the model used for predSoluFunc

Value

cobra, an object of class COBRA, enhanced here by the following elements (among others):

df

data frame with summary of the optimization run (see cobraPhaseII)

df2

data frame with additional summary information (see cobraPhaseII)

dftr

data frame with additional summary information for TR(see cobraPhaseII)

fbest

the best feasible objective value found

xbest

the point in input space yielding the best feasible objective value

ibest

the corresponding iteration number (row of cobra$df, of cobra$A)

fbestArray

vector of all fbest

xbestArray

vector of all xbest

Details

Note: the elements A, Fres, Gres of cobra are set in updateInfoAndCounters, an internal function of cobraPhaseII.

See Also

cobraPhaseII, cobraInit