Dakota  Version 6.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
NonlinearCGOptimizer Class Reference
Inheritance diagram for NonlinearCGOptimizer:
Optimizer Minimizer Iterator

Public Member Functions

 NonlinearCGOptimizer (ProblemDescDB &problem_db, Model &model)
 standard constructor
 
 ~NonlinearCGOptimizer ()
 destructor
 
Real linesearch_eval (const Real &trial_step, short req_val=1)
 evaluate the objective function given a particular step size (public for use in boost_ls_eval functor; could use friend)
 

Protected Member Functions

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...
 
- Protected Member Functions inherited from Optimizer
 Optimizer ()
 default constructor
 
 Optimizer (ProblemDescDB &problem_db, Model &model)
 alternate constructor; accepts a model
 
 Optimizer (unsigned short method_name, Model &model)
 alternate constructor for "on the fly" instantiations
 
 Optimizer (unsigned short method_name, size_t num_cv, size_t num_div, size_t num_dsv, size_t num_drv, size_t num_lin_ineq, size_t num_lin_eq, size_t num_nln_ineq, size_t num_nln_eq)
 alternate constructor for "on the fly" instantiations
 
 ~Optimizer ()
 destructor
 
void initialize_run ()
 
void post_run (std::ostream &s)
 
void finalize_run ()
 utility function to perform common operations following post_run(); deallocation and resetting of instance pointers More...
 
void print_results (std::ostream &s)
 
- Protected Member Functions inherited from Minimizer
 Minimizer ()
 default constructor
 
 Minimizer (ProblemDescDB &problem_db, Model &model)
 standard constructor More...
 
 Minimizer (unsigned short method_name, Model &model)
 alternate constructor for "on the fly" instantiations
 
 Minimizer (unsigned short method_name, size_t num_lin_ineq, size_t num_lin_eq, size_t num_nln_ineq, size_t num_nln_eq)
 alternate constructor for "on the fly" instantiations
 
 ~Minimizer ()
 destructor
 
void update_from_model (const Model &model)
 set inherited data attributes based on extractions from incoming model
 
const Modelalgorithm_space_model () const
 
Model original_model (unsigned short recasts_left=0)
 Return a shallow copy of the original model this Iterator was originally passed, optionally leaving recasts_left on top of it.
 
void data_transform_model ()
 Wrap iteratedModel in a RecastModel that subtracts provided observed data from the primary response functions (variables and secondary responses are unchanged) More...
 
void scale_model ()
 Wrap iteratedModel in a RecastModel that performs variable and/or response scaling. More...
 
Real objective (const RealVector &fn_vals, const BoolDeque &max_sense, const RealVector &primary_wts) const
 compute a composite objective value from one or more primary functions More...
 
Real objective (const RealVector &fn_vals, size_t num_fns, const BoolDeque &max_sense, const RealVector &primary_wts) const
 compute a composite objective with specified number of source primary functions, instead of userPrimaryFns More...
 
void objective_gradient (const RealVector &fn_vals, const RealMatrix &fn_grads, const BoolDeque &max_sense, const RealVector &primary_wts, RealVector &obj_grad) const
 compute the gradient of the composite objective function
 
void objective_gradient (const RealVector &fn_vals, size_t num_fns, const RealMatrix &fn_grads, const BoolDeque &max_sense, const RealVector &primary_wts, RealVector &obj_grad) const
 compute the gradient of the composite objective function More...
 
void objective_hessian (const RealVector &fn_vals, const RealMatrix &fn_grads, const RealSymMatrixArray &fn_hessians, const BoolDeque &max_sense, const RealVector &primary_wts, RealSymMatrix &obj_hess) const
 compute the Hessian of the composite objective function
 
void objective_hessian (const RealVector &fn_vals, size_t num_fns, const RealMatrix &fn_grads, const RealSymMatrixArray &fn_hessians, const BoolDeque &max_sense, const RealVector &primary_wts, RealSymMatrix &obj_hess) const
 compute the Hessian of the composite objective function More...
 
void archive_allocate_best (size_t num_points)
 allocate results arrays and labels for multipoint storage
 
void archive_best (size_t index, const Variables &best_vars, const Response &best_resp)
 archive the best point into the results array
 
void resize_best_vars_array (size_t newsize)
 Safely resize the best variables array to newsize taking into account the envelope-letter design pattern and any recasting. More...
 
void resize_best_resp_array (size_t newsize)
 Safely resize the best response array to newsize taking into account the envelope-letter design pattern and any recasting. More...
 
Real sum_squared_residuals (size_t num_pri_fns, const RealVector &residuals, const RealVector &weights)
 return weighted sum of squared residuals
 
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
 
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
 
void local_recast_retrieve (const Variables &vars, Response &response) const
 infers MOO/NLS solution from the solution of a single-objective optimizer More...
 
- Protected Member Functions inherited from Iterator
 Iterator (BaseConstructor, ProblemDescDB &problem_db)
 constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More...
 
 Iterator (NoDBBaseConstructor, unsigned short method_name, Model &model)
 alternate constructor for base iterator classes constructed on the fly More...
 
 Iterator (NoDBBaseConstructor, unsigned short method_name)
 alternate constructor for base iterator classes constructed on the fly More...
 
virtual void derived_init_communicators (ParLevLIter pl_iter)
 derived class contributions to initializing the communicators associated with this Iterator instance
 
virtual const VariablesArray & initial_points () const
 gets the multiple initial points for this iterator. This will only be meaningful after a call to initial_points mutator.
 
StrStrSizet run_identifier () const
 get the unique run identifier based on method name, id, and number of executions
 

Private Member Functions

void parse_options ()
 constructor helper function to parse misc_options from ProblemDescDB
 
void compute_direction ()
 compute next direction via choice of method
 
bool compute_step ()
 compute step: fixed, simple decrease, sufficient decrease
 
void bracket_min (Real &xa, Real &xb, Real &xc, Real &fa, Real &fb, Real &fc)
 bracket the 1-D minimum in the linesearch
 
Real brent_minimize (Real a, Real b, Real tol)
 Perform 1-D minimization for the stepLength using Brent's method. More...
 

Private Attributes

Real initialStep
 initial step length
 
Real linesearchTolerance
 approximate accuracy of absissca in LS
 
unsigned linesearchType
 type of line search (if any)
 
unsigned maxLinesearchIters
 maximum evaluations in line search
 
Real relFunctionTol
 stopping criterion for rel change in fn
 
Real relGradientTol
 stopping criterion for rel reduction in g
 
bool resetStep
 whether to reset step with each linesearch
 
unsigned restartIter
 iter at which to reset to steepest descent
 
unsigned updateType
 type of CG direction update
 
unsigned iterCurr
 current iteration number
 
RealVector designVars
 current decision variables in the major iteration
 
RealVector trialVars
 decision variables in the linesearch
 
Real functionCurr
 current function value
 
Real functionPrev
 previous function value
 
RealVector gradCurr
 current gradient
 
RealVector gradPrev
 previous gradient
 
RealVector gradDiff
 temporary for gradient difference (gradCurr - gradPrev)
 
RealVector searchDirection
 current aggregate search direction
 
Real stepLength
 current step length parameter alpha
 
Real gradDotGrad_init
 initial gradient norm squared
 
Real gradDotGrad_curr
 gradCurr dot gradCurr
 
Real gradDotGrad_prev
 gradPrev dot gradPrev
 

Additional Inherited Members

- Static Public Member Functions inherited from Optimizer
static void not_available (const std::string &package_name)
 Static helper function: third-party opt packages which are not available.
 
- 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 Optimizer
size_t numObjectiveFns
 number of objective functions (iterator view)
 
bool localObjectiveRecast
 flag indicating whether local recasting to a single objective is used
 
OptimizerprevOptInstance
 pointer containing previous value of optimizerInstance
 
- Static Protected Attributes inherited from Optimizer
static OptimizeroptimizerInstance
 pointer to Optimizer instance used in static member functions
 

Detailed Description

Experimental implementation of nonlinear CG optimization

Member Function Documentation

void core_run ( )
protectedvirtual
Real brent_minimize ( Real  a,
Real  b,
Real  tol 
)
private

Perform 1-D minimization for the stepLength using Brent's method.

Perform 1-D minimization for the stepLength using Brent's method. This is a C translation of fmin.f from Netlib.

References NonlinearCGOptimizer::linesearch_eval(), NonlinearCGOptimizer::maxLinesearchIters, and Iterator::outputLevel.

Referenced by NonlinearCGOptimizer::compute_step().


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