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
DOTOptimizer Class Reference

Wrapper class for the DOT optimization library. More...

Inheritance diagram for DOTOptimizer:
Optimizer Minimizer Iterator

Public Member Functions

 DOTOptimizer (ProblemDescDB &problem_db, Model &model)
 standard constructor
 
 DOTOptimizer (const String &method_string, Model &model)
 alternate constructor; construct without ProblemDescDB
 
 ~DOTOptimizer ()
 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...
 

Protected Member Functions

void initialize_run ()
 performs run-time set up
 
- 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 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 initialize ()
 Shared constructor code.
 
void allocate_workspace ()
 Allocates workspace for the optimizer.
 
void allocate_constraints ()
 Allocates constraint mappings.
 

Private Attributes

int dotInfo
 INFO from DOT manual. More...
 
int dotFDSinfo
 internal DOT parameter NGOTOZ More...
 
int dotMethod
 METHOD from DOT manual. More...
 
int printControl
 IPRINT from DOT manual (controls output verbosity) More...
 
RealArray realCntlParmArray
 RPRM from DOT manual. More...
 
IntArray intCntlParmArray
 IPRM from DOT manual. More...
 
RealVector designVars
 array of design variable values passed to DOT
 
Real objFnValue
 value of the objective function passed to DOT
 
RealVector constraintValues
 array of nonlinear constraint values passed to DOT More...
 
int realWorkSpaceSize
 size of realWorkSpace
 
int intWorkSpaceSize
 size of intWorkSpace
 
RealArray realWorkSpace
 real work space for DOT
 
IntArray intWorkSpace
 int work space for DOT
 
int numDotNlnConstr
 total number of nonlinear constraints seen by DOT
 
int numDotLinConstr
 total number of linear constraints seen by DOT
 
int numDotConstr
 total number of linear and nonlinear constraints seen by DOT
 
SizetArray constraintMappingIndices
 a container of indices for referencing the corresponding Response constraints used in computing the DOT constraints. More...
 
RealArray constraintMappingMultipliers
 a container of multipliers for mapping the Response constraints to the DOT constraints. More...
 
RealArray constraintMappingOffsets
 a container of offsets for mapping the Response constraints to the DOT constraints. More...
 

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

Wrapper class for the DOT optimization library.

The DOTOptimizer class provides a wrapper for DOT, a commercial Fortran 77 optimization library from Vanderplaats Research and Development. It uses a reverse communication mode, which avoids the static member function issues that arise with function pointer designs (see NPSOLOptimizer and SNLLOptimizer).

The user input mappings are as follows: max_iterations is mapped into DOT's ITMAX parameter within its IPRM array, max_function_evaluations is implemented directly in the core_run() loop since there is no DOT parameter equivalent, convergence_tolerance is mapped into DOT's DELOBJ parameter (the relative convergence tolerance) within its RPRM array, output verbosity is mapped into DOT's IPRINT parameter within its function call parameter list (verbose: IPRINT = 7; quiet: IPRINT = 3), and optimization_type is mapped into DOT's MINMAX parameter within its function call parameter list. Refer to [Vanderplaats Research and Development, 1995] for information on IPRM, RPRM, and the DOT function call parameter list.

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 Iterator::activeSet, Iterator::bestResponseArray, Iterator::bestVariablesArray, DOTOptimizer::constraintMappingIndices, DOTOptimizer::constraintMappingMultipliers, DOTOptimizer::constraintMappingOffsets, DOTOptimizer::constraintValues, Model::continuous_lower_bounds(), Model::continuous_upper_bounds(), Model::continuous_variables(), Model::current_response(), DOTOptimizer::designVars, DOTOptimizer::dotFDSinfo, DOTOptimizer::dotInfo, DOTOptimizer::dotMethod, Model::evaluate(), Response::function_gradients(), Response::function_values(), Model::gradient_type(), DOTOptimizer::intCntlParmArray, DOTOptimizer::intWorkSpace, DOTOptimizer::intWorkSpaceSize, Iterator::iteratedModel, Model::linear_eq_constraint_coeffs(), Model::linear_ineq_constraint_coeffs(), Optimizer::localObjectiveRecast, Iterator::maxFunctionEvals, Model::num_linear_eq_constraints(), Model::num_linear_ineq_constraints(), Minimizer::numContinuousVars, DOTOptimizer::numDotConstr, DOTOptimizer::numDotNlnConstr, Minimizer::numFunctions, Optimizer::numObjectiveFns, DOTOptimizer::objFnValue, Iterator::outputLevel, Model::primary_response_fn_sense(), DOTOptimizer::printControl, DOTOptimizer::realCntlParmArray, DOTOptimizer::realWorkSpace, DOTOptimizer::realWorkSpaceSize, ActiveSet::request_value(), ActiveSet::request_values(), Minimizer::speculativeFlag, and Minimizer::vendorNumericalGradFlag.

Member Data Documentation

int dotInfo
private

INFO from DOT manual.

Information requested by DOT: 0=optimization complete, 1=get values, 2=get gradients

Referenced by DOTOptimizer::core_run(), and DOTOptimizer::initialize_run().

int dotFDSinfo
private

internal DOT parameter NGOTOZ

the DOT parameter list has been modified to pass NGOTOZ, which signals whether DOT is finite-differencing (nonzero value) or performing the line search (zero value).

Referenced by DOTOptimizer::core_run().

int dotMethod
private

METHOD from DOT manual.

For nonlinear constraints: 0/1 = dot_mmfd, 2 = dot_slp, 3 = dot_sqp. For unconstrained: 0/1 = dot_bfgs, 2 = dot_frcg.

Referenced by DOTOptimizer::allocate_constraints(), DOTOptimizer::allocate_workspace(), DOTOptimizer::core_run(), and DOTOptimizer::DOTOptimizer().

int printControl
private

IPRINT from DOT manual (controls output verbosity)

Values range from 0 (least output) to 7 (most output).

Referenced by DOTOptimizer::core_run(), and DOTOptimizer::DOTOptimizer().

RealArray realCntlParmArray
private

RPRM from DOT manual.

Array of real control parameters.

Referenced by DOTOptimizer::core_run(), and DOTOptimizer::initialize().

IntArray intCntlParmArray
private

IPRM from DOT manual.

Array of integer control parameters.

Referenced by DOTOptimizer::core_run(), and DOTOptimizer::initialize().

RealVector constraintValues
private

array of nonlinear constraint values passed to DOT

This array must be of nonzero length and must contain only one-sided inequality constraints which are <= 0 (which requires a transformation from 2-sided inequalities and equalities).

Referenced by DOTOptimizer::allocate_constraints(), and DOTOptimizer::core_run().

SizetArray constraintMappingIndices
private

a container of indices for referencing the corresponding Response constraints used in computing the DOT constraints.

The length of the container corresponds to the number of DOT constraints, and each entry in the container points to the corresponding DAKOTA constraint.

Referenced by DOTOptimizer::allocate_constraints(), and DOTOptimizer::core_run().

RealArray constraintMappingMultipliers
private

a container of multipliers for mapping the Response constraints to the DOT constraints.

The length of the container corresponds to the number of DOT constraints, and each entry in the container stores a multiplier for the DAKOTA constraint identified with constraintMappingIndices. These multipliers are currently +1 or -1.

Referenced by DOTOptimizer::allocate_constraints(), and DOTOptimizer::core_run().

RealArray constraintMappingOffsets
private

a container of offsets for mapping the Response constraints to the DOT constraints.

The length of the container corresponds to the number of DOT constraints, and each entry in the container stores an offset for the DAKOTA constraint identified with constraintMappingIndices. These offsets involve inequality bounds or equality targets, since DOT assumes constraint allowables = 0.

Referenced by DOTOptimizer::allocate_constraints(), and DOTOptimizer::core_run().


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