Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions
Optimizer Class Reference

Base class for the optimizer branch of the iterator hierarchy. More...

Inheritance diagram for Optimizer:
Minimizer Iterator APPSOptimizer COLINOptimizer CONMINOptimizer DOTOptimizer JEGAOptimizer NCSUOptimizer NLPQLPOptimizer NPSOLOptimizer SNLLOptimizer

List of all members.

Protected Member Functions

 Optimizer ()
 default constructor
 Optimizer (Model &model)
 standard constructor
 Optimizer (NoDBBaseConstructor, Model &model)
 alternate constructor for "on the fly" instantiations
 Optimizer (NoDBBaseConstructor, size_t num_cv, size_t num_div, 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 run ()
 run portion of run_iterator; implemented by all derived classes and may include pre/post steps in lieu of separate pre/post
void post_run (std::ostream &s)
void finalize_run ()
 utility function to perform common operations following post_run(); deallocation and resetting of instance pointers
void print_results (std::ostream &s)
virtual void find_optimum ()=0
 Used within the optimizer branch for computing the optimal solution. Redefines the run virtual function for the optimizer branch.

Protected Attributes

size_t numObjectiveFns
 number of objective functions (iterator view)
size_t numUserObjectiveFns
 number of objective functions (user's model view)
bool multiObjFlag
 flag indicating whether multi-objective transformations are necessary
OptimizerprevOptInstance
 pointer containing previous value of optimizerInstance

Static Protected Attributes

static OptimizeroptimizerInstance
 pointer to Optimizer instance used in static member functions

Private Member Functions

void weighted_sum (const Response &full_response, Response &reduced_response, const RealVector &wts) const
 forward mapping: maps multiple objective functions to a single weighted objective for single-objective optimizers
void multi_objective_retrieve (const Variables &vars, Response &response) const
 inverse mapping: retrieves values for multiple objective functions from the solution of a single-objective optimizer

Static Private Member Functions

static void primary_resp_recast (const Variables &native_vars, const Variables &scaled_vars, const Response &native_response, Response &scaled_response)
 primary response conversion map for RecastModel used in scaling and multiobjective: transform objectives (fns, grads, Hessians) from native (user) to iterator space

Detailed Description

Base class for the optimizer branch of the iterator hierarchy.

The Optimizer class provides common data and functionality for DOTOptimizer, CONMINOptimizer, NPSOLOptimizer, SNLLOptimizer, NLPQLPOptimizer, COLINOptimizer, and JEGAOptimizer.


Constructor & Destructor Documentation

Optimizer ( Model model) [protected]

Member Function Documentation

void initialize_run ( ) [protected, virtual]

Implements portions of initialize_run specific to Optimizers. This function should be invoked (or reimplemented) by any derived implementations of initialize_run() (which would otherwise hide it).

Reimplemented from Minimizer.

Reimplemented in CONMINOptimizer, DOTOptimizer, NLPQLPOptimizer, and SNLLOptimizer.

References Iterator::iteratedModel, Optimizer::multiObjFlag, Optimizer::optimizerInstance, Optimizer::prevOptInstance, Minimizer::scaleFlag, and Model::update_from_subordinate_model().

void run ( ) [inline, protected, virtual]

run portion of run_iterator; 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 Optimizer::find_optimum().

void post_run ( std::ostream &  s) [protected, virtual]
void finalize_run ( ) [inline, protected, virtual]

utility function to perform common operations following post_run(); deallocation and resetting of instance pointers

Optional: perform finalization phases of run sequence, like deallocating memory and resetting instance pointers. Commonly used in sub-iterator executions. This is a virtual function; when re-implementing, a derived class must call its nearest parent's finalize_run(), typically _after_ performing its own implementation steps.

Reimplemented from Minimizer.

Reimplemented in SNLLOptimizer.

References Optimizer::optimizerInstance, and Optimizer::prevOptInstance.

void print_results ( std::ostream &  s) [protected, virtual]
void primary_resp_recast ( const Variables native_vars,
const Variables scaled_vars,
const Response native_response,
Response iterator_response 
) [static, private]

primary response conversion map for RecastModel used in scaling and multiobjective: transform objectives (fns, grads, Hessians) from native (user) to iterator space

Objective function map from user/native space to iterator/scaled/combined space using a RecastModel. If resizing the response, copies the constraint (secondary) data from native_response too

References Response::active_set_request_vector(), Response::copy(), Iterator::iteratedModel, Optimizer::multiObjFlag, Minimizer::need_resp_trans_byvars(), Optimizer::numUserObjectiveFns, Optimizer::optimizerInstance, Iterator::outputLevel, Model::primary_response_fn_weights(), Minimizer::primaryRespScaleFlag, Minimizer::response_modify_n2s(), Model::subordinate_model(), Response::update_partial(), and Optimizer::weighted_sum().

Referenced by Optimizer::Optimizer().

void weighted_sum ( const Response full_response,
Response reduced_response,
const RealVector &  multiobj_wts 
) const [private]

forward mapping: maps multiple objective functions to a single weighted objective for single-objective optimizers

This function is responsible for the mapping of multiple objective functions into a single objective for publishing to single-objective optimizers. Used in DOTOptimizer, NPSOLOptimizer, SNLLOptimizer, and SGOPTApplication on every function evaluation. The simple weighting approach (using primaryRespFnWts) is the only technique supported currently. The weightings are used to scale function values, gradients, and Hessians as needed.

References Dakota::abort_handler(), Response::active_set_request_vector(), Response::function_gradients(), Response::function_hessians(), Response::function_value(), Response::function_values(), Iterator::numContinuousVars, Optimizer::numUserObjectiveFns, Iterator::outputLevel, and Dakota::write_precision.

Referenced by Optimizer::primary_resp_recast().

void multi_objective_retrieve ( const Variables vars,
Response response 
) const [private]

inverse mapping: retrieves values for multiple objective functions from the solution of a single-objective optimizer

Retrieve a full multiobjective response based on the data returned by a single objective optimizer by performing a data_pairs search.

References Response::active_set(), Dakota::data_pairs, Model::interface_id(), Iterator::iteratedModel, Dakota::lookup_by_val(), Optimizer::numUserObjectiveFns, and Response::update().

Referenced by Optimizer::post_run().


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