Dakota  Version 6.15
Explore and Predict with Confidence
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
EffGlobalMinimizer Class Reference
Inheritance diagram for EffGlobalMinimizer:
SurrBasedMinimizer Minimizer Iterator

Public Member Functions

 EffGlobalMinimizer (ProblemDescDB &problem_db, Model &model)
 standard constructor
 
 ~EffGlobalMinimizer ()
 alternate constructor for instantiations "on the fly"
 
void pre_run ()
 destructor
 
void core_run ()
 core portion of run; implemented by all derived classes and may include pre/post steps in lieu of separate pre/post More...
 
void post_run (std::ostream &s)
 post-run portion of run (optional); verbose to print results; re-implemented by Iterators that can read all Variables/Responses and perform final analysis phase in a standalone way More...
 
const Modelalgorithm_space_model () const
 

Private Member Functions

void check_parallelism ()
 function that checks if model supports asynchronous parallelism
 
void build_gp ()
 build initial GP approximations after initial sampling
 
void batch_synchronous_ego ()
 synchronous batch-sequential implementation: main function
 
void batch_asynchronous_ego ()
 synchronous batch-sequential implementation: main function
 
void construct_batch_acquisition (size_t new_acq, size_t new_batch)
 construct a batch of points from performing acquisition cycles
 
void construct_batch_exploration (size_t new_expl, size_t new_batch)
 construct a batch of points from performing exploration cycles
 
void evaluate_batch (bool rebuild)
 evaluate batch in parallel and replace liar responses
 
bool query_batch (bool rebuild)
 perform nonblocking synchronization for parallel evaluation of truth responses and replace liar responses for any completions More...
 
void backfill_batch (size_t new_acq, size_t new_expl)
 backfill any completed truth response evaluations in case of nonblocking synchronization
 
void launch_batch ()
 launch all jobs in the variables map queues
 
void launch_single (const Variables &vars_star)
 launch a single job
 
void process_truth_response_map (const IntResponseMap &truth_resp_map, bool rebuild)
 update approximation data and constraint penalties/multipliers based on new truth data
 
void update_variable_maps (const IntResponseMap &truth_resp_map)
 update variable map queues based on completed jobs
 
bool converged ()
 check convergence indicators to assess if EGO has converged
 
void retrieve_final_results ()
 post-processing: retrieve and export best samples and responses
 
void initialize_counters_limits ()
 initialize counters and limits used for assessing convergence
 
void update_convergence_counters (const Variables &vars_star, const Response &resp_star)
 update counters used for assessing convergence
 
void update_convergence_counters (const Variables &vars_star)
 update counters used for assessing convergence in variables
 
void update_convergence_counters (const Response &resp_star)
 update counters used for assessing convergence in response
 
void pop_liar_responses ()
 delete all liar responses
 
void append_liar (const Variables &vars_star, int liar_id, bool rebuild)
 evaluate and append a liar response
 
int extract_id (IntVarsMCIter it, const IntVariablesMap &map)
 manage special value when iterator has advanced to end
 
void compute_best_sample ()
 determine meritFnStar from among the GP build data for use in EIF More...
 
void extract_best_sample ()
 extract best solution from among the GP build data for final results More...
 
void extract_qoi_build_data (size_t data_index, RealVector &fn_vals)
 extra response function build data from across the set of QoI
 
Real augmented_lagrangian (const RealVector &mean)
 helper for evaluating the value of the augmented Lagrangian merit fn
 
void update_constraints (const RealVector &fn_vals)
 update constraint penalties and multipliers for a single response
 
void update_constraints (const IntResponseMap &truth_resp_map)
 update constraint penalties and multipliers for a set of responses
 
bool empty_queues () const
 helper for checking queued jobs in vars{Acquisition,Exploration}Map
 
Real compute_probability_improvement (const RealVector &means, const RealVector &variances)
 probability improvement (PI) function for the EGO PI acquisition function implementation More...
 
Real compute_expected_improvement (const RealVector &means, const RealVector &variances)
 expected improvement (EI) function for the EGO EI acquisition function implementation More...
 
Real compute_lower_confidence_bound (const RealVector &means, const RealVector &variances)
 lower confidence bound (LCB) function for the EGO LCB acquisition function implementation More...
 
Real compute_variances (const RealVector &variances)
 variance function for the EGO MSE acquisition implementation More...
 
RealVector expected_violation (const RealVector &means, const RealVector &variances)
 expected violation function for the constraint functions More...
 
void update_penalty ()
 initialize and update the penaltyParameter
 
void debug_print_values (const Variables &vars)
 print mean and variance if debug flag is ON
 
void debug_print_dist_counters (Real dist_cv_star)
 print counters if debug flag is ON
 
void debug_print_eif_counters (Real eif_star)
 print counters if debug flag is ON
 
void debug_plots ()
 DEBUG_PLOTS conditional - output set of samples used to build the GP if problem is 2D.
 

Static Private Member Functions

static void PIF_objective_eval (const Variables &sub_model_vars, const Variables &recast_vars, const Response &sub_model_response, Response &recast_response)
 static function used as the objective function in the Expected Improvement (EIF) problem formulation for EGO More...
 
static void EIF_objective_eval (const Variables &sub_model_vars, const Variables &recast_vars, const Response &sub_model_response, Response &recast_response)
 static function used as the objective function in the Expected Improvement (EIF) problem formulation for EGO More...
 
static void LCB_objective_eval (const Variables &sub_model_vars, const Variables &recast_vars, const Response &sub_model_response, Response &recast_response)
 static function used as the objective function in the Lower-Confidence Bound (LCB) problem formulation for EGO More...
 
static void Variances_objective_eval (const Variables &sub_model_vars, const Variables &recast_vars, const Response &sub_model_response, Response &recast_response)
 Variance formulation for primary. More...
 

Private Attributes

Model fHatModel
 GP model of response, one approximation per response function.
 
Model approxSubProbModel
 recast model which assimilates either (a) mean and variance to solve the max(EIF) sub-problem (used by EIF_objective_eval()) or (b) variance alone for pure exploration (used by Variances_objective_eval())
 
Real meritFnStar
 minimum penalized response from among truth build data
 
RealVector prevSubProbSoln
 previous solution to EIF approximation sub-problem
 
short dataOrder
 order of the data used for surrogate construction, in ActiveSet request vector 3-bit format; user may override responses spec
 
int batchSize
 total batch size for parallel EGO
 
int batchSizeAcquisition
 number of new sampling points defined from maximizing acquisition function
 
int batchSizeExploration
 number of new sampling points defined from maximizing posterior variance
 
int batchEvalId
 counter for incrementing evaluation ids to allow synchronization with iteratedModel ids across acquisition and exploration job queues
 
IntVariablesMap varsAcquisitionMap
 variable sets for batch evaluation of truth model, accumulated by construct_batch_acquisition()
 
IntVariablesMap varsExplorationMap
 variable sets for batch evaluation of truth model, accumulated by construct_batch_exploration()
 
bool parallelFlag
 bool flag if model supports asynchronous parallelism
 
bool batchAsynch
 algorithm option for fully asynchronous batch updating of the GP
 
Real distanceTol
 convergence checkers tolerance convergence on distance between predicted best-so-far samples
 
unsigned short eifConvergenceCntr
 counter for convergence in EIF
 
unsigned short eifConvergenceLimit
 limit convergence (compared with counter) of EIF
 
unsigned short distConvergenceCntr
 counter for distance in input space
 
unsigned short distConvergenceLimit
 limit for distance (compared with counter) in input space
 
unsigned short globalIterCount
 counter for global iteration
 

Static Private Attributes

static EffGlobalMinimizereffGlobalInstance
 pointer to the active object instance used within the static evaluator functions in order to avoid the need for static data
 

Additional Inherited Members

- Static Public Member Functions inherited from Minimizer
static Real sum_squared_residuals (size_t num_pri_fns, const RealVector &residuals, const RealVector &weights)
 return weighted sum of squared residuals
 
static void print_residuals (size_t num_terms, const RealVector &best_terms, const RealVector &weights, size_t num_best, size_t best_index, std::ostream &s)
 print num_terms residuals and misfit for final results
 
static void print_model_resp (size_t num_pri_fns, const RealVector &best_fns, size_t num_best, size_t best_index, std::ostream &s)
 print the original user model resp in the case of data transformations
 
- Protected Member Functions inherited from SurrBasedMinimizer
 SurrBasedMinimizer (ProblemDescDB &problem_db, Model &model, std::shared_ptr< TraitsBase > traits)
 constructor
 
 ~SurrBasedMinimizer ()
 destructor
 
void derived_init_communicators (ParLevLIter pl_iter)
 derived class contributions to initializing the communicators associated with this Iterator instance
 
void derived_set_communicators (ParLevLIter pl_iter)
 derived class contributions to setting the communicators associated with this Iterator instance
 
void derived_free_communicators (ParLevLIter pl_iter)
 derived class contributions to freeing the communicators associated with this Iterator instance
 
void print_results (std::ostream &s, short results_state=FINAL_RESULTS)
 
void update_lagrange_multipliers (const RealVector &fn_vals, const RealMatrix &fn_grads, SurrBasedLevelData &tr_data)
 initialize and update Lagrange multipliers for basic Lagrangian More...
 
void update_augmented_lagrange_multipliers (const RealVector &fn_vals)
 initialize and update the Lagrange multipliers for augmented Lagrangian More...
 
void initialize_filter (SurrBasedLevelData &tr_data, const RealVector &fn_vals)
 (re-)initialize filter from a set of function values
 
bool update_filter (SurrBasedLevelData &tr_data, const RealVector &fn_vals)
 update filter using a new set of function values More...
 
Real lagrangian_merit (const RealVector &fn_vals, const BoolDeque &sense, const RealVector &primary_wts, const RealVector &nln_ineq_l_bnds, const RealVector &nln_ineq_u_bnds, const RealVector &nln_eq_tgts)
 compute a Lagrangian function from a set of function values More...
 
void lagrangian_gradient (const RealVector &fn_vals, const RealMatrix &fn_grads, const BoolDeque &sense, const RealVector &primary_wts, const RealVector &nln_ineq_l_bnds, const RealVector &nln_ineq_u_bnds, const RealVector &nln_eq_tgts, RealVector &lag_grad)
 compute the gradient of the Lagrangian function
 
void lagrangian_hessian (const RealVector &fn_vals, const RealMatrix &fn_grads, const RealSymMatrixArray &fn_hessians, const BoolDeque &sense, const RealVector &primary_wts, const RealVector &nln_ineq_l_bnds, const RealVector &nln_ineq_u_bnds, const RealVector &nln_eq_tgts, RealSymMatrix &lag_hess)
 compute the Hessian of the Lagrangian function
 
Real augmented_lagrangian_merit (const RealVector &fn_vals, const BoolDeque &sense, const RealVector &primary_wts, const RealVector &nln_ineq_l_bnds, const RealVector &nln_ineq_u_bnds, const RealVector &nln_eq_tgts)
 compute an augmented Lagrangian function from a set of function values More...
 
void augmented_lagrangian_gradient (const RealVector &fn_vals, const RealMatrix &fn_grads, const BoolDeque &sense, const RealVector &primary_wts, const RealVector &nln_ineq_l_bnds, const RealVector &nln_ineq_u_bnds, const RealVector &nln_eq_tgts, RealVector &alag_grad)
 compute the gradient of the augmented Lagrangian function
 
void augmented_lagrangian_hessian (const RealVector &fn_vals, const RealMatrix &fn_grads, const RealSymMatrixArray &fn_hessians, const BoolDeque &sense, const RealVector &primary_wts, const RealVector &nln_ineq_l_bnds, const RealVector &nln_ineq_u_bnds, const RealVector &nln_eq_tgts, RealSymMatrix &alag_hess)
 compute the Hessian of the augmented Lagrangian function
 
Real penalty_merit (const RealVector &fn_vals, const BoolDeque &sense, const RealVector &primary_wts)
 compute a penalty function from a set of function values More...
 
void penalty_gradient (const RealVector &fn_vals, const RealMatrix &fn_grads, const BoolDeque &sense, const RealVector &primary_wts, RealVector &pen_grad)
 compute the gradient of the penalty function
 
Real constraint_violation (const RealVector &fn_vals, const Real &constraint_tol)
 compute the constraint violation from a set of function values More...
 
- Static Protected Member Functions inherited from Iterator
static void gnewton_set_recast (const Variables &recast_vars, const ActiveSet &recast_set, ActiveSet &sub_model_set)
 conversion of request vector values for the Gauss-Newton Hessian approximation More...
 
- Protected Attributes inherited from SurrBasedMinimizer
Iterator approxSubProbMinimizer
 the minimizer used on the surrogate model to solve the approximate subproblem on each surrogate-based iteration
 
size_t globalIterCount
 global iteration counter corresponding to number of surrogate-based minimizations
 
RealVector lagrangeMult
 Lagrange multipliers for basic Lagrangian calculations.
 
RealVector augLagrangeMult
 Lagrange multipliers for augmented Lagrangian calculations.
 
Real penaltyParameter
 the penalization factor for violated constraints used in quadratic penalty calculations; increased in update_penalty()
 
RealVector origNonlinIneqLowerBnds
 original nonlinear inequality constraint lower bounds (no relaxation)
 
RealVector origNonlinIneqUpperBnds
 original nonlinear inequality constraint upper bounds (no relaxation)
 
RealVector origNonlinEqTargets
 original nonlinear equality constraint targets (no relaxation)
 
Real eta
 constant used in etaSequence updates
 
Real alphaEta
 power for etaSequence updates when updating penalty
 
Real betaEta
 power for etaSequence updates when updating multipliers
 
Real etaSequence
 decreasing sequence of allowable constraint violation used in augmented Lagrangian updates (refer to Conn, Gould, and Toint, section 14.4)
 
size_t miPLIndex
 index for the active ParallelLevel within ParallelConfiguration::miPLIters
 
- Static Protected Attributes inherited from Minimizer
static MinimizerminimizerInstance
 pointer to Minimizer used in static member functions
 

Detailed Description

The EffGlobalMinimizer class provides an implementation of the Efficient Global Optimization algorithm developed by Jones, Schonlau, & Welch as well as adaptation of the concept to nonlinear least squares.

Member Function Documentation

void core_run ( )
virtual

core portion of run; implemented by all derived classes and may include pre/post steps in lieu of separate pre/post

Virtual run function for the iterator class hierarchy. All derived classes need to redefine it.

Reimplemented from Iterator.

References EffGlobalMinimizer::batch_asynchronous_ego(), EffGlobalMinimizer::batch_synchronous_ego(), EffGlobalMinimizer::batchAsynch, EffGlobalMinimizer::build_gp(), and EffGlobalMinimizer::effGlobalInstance.

void post_run ( std::ostream &  s)
virtual

post-run portion of run (optional); verbose to print results; re-implemented by Iterators that can read all Variables/Responses and perform final analysis phase in a standalone way

Post-run phase, which a derived iterator may optionally reimplement; when not present, post-run is likely integrated into run. This is a virtual function; when re-implementing, a derived class must call its nearest parent's post_run(), typically after performing its own implementation steps.

Reimplemented from Minimizer.

References EffGlobalMinimizer::approxSubProbModel, Model::finalize_mapping(), Minimizer::post_run(), and EffGlobalMinimizer::retrieve_final_results().

const Model & algorithm_space_model ( ) const
inlinevirtual

default definition that gets redefined in selected derived Minimizers

Reimplemented from Minimizer.

References EffGlobalMinimizer::fHatModel.

bool query_batch ( bool  rebuild)
private

perform nonblocking synchronization for parallel evaluation of truth responses and replace liar responses for any completions

query running jobs and process any new completions

References Model::component_parallel_mode(), EffGlobalMinimizer::empty_queues(), EffGlobalMinimizer::fHatModel, Iterator::iteratedModel, EffGlobalMinimizer::process_truth_response_map(), Model::synchronize_nowait(), and EffGlobalMinimizer::update_variable_maps().

Referenced by EffGlobalMinimizer::batch_asynchronous_ego().

void compute_best_sample ( )
private

determine meritFnStar from among the GP build data for use in EIF

Extract the best merit function from build data through evaluaton of points on fHatModel. This merit fn value is used within the EIF during an approximate sub-problem solve.

References Model::approximation_data(), EffGlobalMinimizer::augmented_lagrangian(), Model::continuous_variables(), Model::current_response(), Model::evaluate(), EffGlobalMinimizer::fHatModel, Response::function_values(), EffGlobalMinimizer::meritFnStar, and Minimizer::numFunctions.

Referenced by EffGlobalMinimizer::construct_batch_acquisition().

void extract_best_sample ( )
private

extract best solution from among the GP build data for final results

Extract the best point from the build data for final results reporting.

References Model::approximation_data(), EffGlobalMinimizer::augmented_lagrangian(), Iterator::bestResponseArray, Iterator::bestVariablesArray, EffGlobalMinimizer::extract_qoi_build_data(), EffGlobalMinimizer::fHatModel, and Minimizer::numFunctions.

Referenced by EffGlobalMinimizer::retrieve_final_results().

Real compute_probability_improvement ( const RealVector &  means,
const RealVector &  variances 
)
private
Real compute_expected_improvement ( const RealVector &  means,
const RealVector &  variances 
)
private
Real compute_lower_confidence_bound ( const RealVector &  means,
const RealVector &  variances 
)
private
Real compute_variances ( const RealVector &  variances)
private

variance function for the EGO MSE acquisition implementation

Compute the variances

Referenced by EffGlobalMinimizer::Variances_objective_eval().

RealVector expected_violation ( const RealVector &  means,
const RealVector &  variances 
)
private
void PIF_objective_eval ( const Variables sub_model_vars,
const Variables recast_vars,
const Response sub_model_response,
Response recast_response 
)
staticprivate

static function used as the objective function in the Expected Improvement (EIF) problem formulation for EGO

To maximize expected improvement (PI), the approxSubProbMinimizer will minimize -(compute_probability_improvement).

References Response::active_set_request_vector(), Model::approximation_variances(), EffGlobalMinimizer::compute_probability_improvement(), EffGlobalMinimizer::effGlobalInstance, EffGlobalMinimizer::fHatModel, Response::function_value(), and Response::function_values().

void EIF_objective_eval ( const Variables sub_model_vars,
const Variables recast_vars,
const Response sub_model_response,
Response recast_response 
)
staticprivate

static function used as the objective function in the Expected Improvement (EIF) problem formulation for EGO

To maximize expected improvement (EI), the approxSubProbMinimizer will minimize -(compute_expected_improvement).

References Response::active_set_request_vector(), Model::approximation_variances(), EffGlobalMinimizer::compute_expected_improvement(), EffGlobalMinimizer::effGlobalInstance, EffGlobalMinimizer::fHatModel, Response::function_value(), and Response::function_values().

Referenced by EffGlobalMinimizer::construct_batch_acquisition().

void LCB_objective_eval ( const Variables sub_model_vars,
const Variables recast_vars,
const Response sub_model_response,
Response recast_response 
)
staticprivate

static function used as the objective function in the Lower-Confidence Bound (LCB) problem formulation for EGO

To maximize lower confidence bound (LCB), the approxSubProbMinimizer will minimize -(compute_lower_confidence_bound).

References Response::active_set_request_vector(), Model::approximation_variances(), EffGlobalMinimizer::compute_lower_confidence_bound(), EffGlobalMinimizer::effGlobalInstance, EffGlobalMinimizer::fHatModel, Response::function_value(), and Response::function_values().

void Variances_objective_eval ( const Variables sub_model_vars,
const Variables recast_vars,
const Response sub_model_response,
Response recast_response 
)
staticprivate

The documentation for this class was generated from the following files: