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

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

Inheritance diagram for CONMINOptimizer:
Optimizer Minimizer Iterator

Public Member Functions

 CONMINOptimizer (ProblemDescDB &problem_db, Model &model)
 standard constructor
 
 CONMINOptimizer (const String &method_string, Model &model)
 alternate constructor; construct without ProblemDescDB
 
 ~CONMINOptimizer ()
 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 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 initialize ()
 Shared constructor code.
 
void allocate_workspace ()
 Allocates workspace for the optimizer.
 
void deallocate_workspace ()
 Releases workspace memory.
 
void allocate_constraints ()
 Allocates constraint mappings.
 

Private Attributes

int conminInfo
 INFO from CONMIN manual. More...
 
int printControl
 IPRINT from CONMIN manual (controls output verbosity) More...
 
Real objFnValue
 value of the objective function passed to CONMIN
 
RealVector constraintValues
 array of nonlinear constraint values passed to CONMIN More...
 
int numConminNlnConstr
 total number of nonlinear constraints seen by CONMIN
 
int numConminLinConstr
 total number of linear constraints seen by CONMIN
 
int numConminConstr
 total number of linear and nonlinear constraints seen by CONMIN
 
SizetArray constraintMappingIndices
 a container of indices for referencing the corresponding Response constraints used in computing the CONMIN constraints. More...
 
RealArray constraintMappingMultipliers
 a container of multipliers for mapping the Response constraints to the CONMIN constraints. More...
 
RealArray constraintMappingOffsets
 a container of offsets for mapping the Response constraints to the CONMIN constraints. More...
 
int N1
 Size variable for CONMIN arrays. See CONMIN manual. More...
 
int N2
 Size variable for CONMIN arrays. See CONMIN manual. More...
 
int N3
 Size variable for CONMIN arrays. See CONMIN manual. More...
 
int N4
 Size variable for CONMIN arrays. See CONMIN manual. More...
 
int N5
 Size variable for CONMIN arrays. See CONMIN manual. More...
 
int NFDG
 Finite difference flag.
 
int IPRINT
 Flag to control amount of output data.
 
int ITMAX
 Flag to specify the maximum number of iterations.
 
double FDCH
 Relative finite difference step size.
 
double FDCHM
 Absolute finite difference step size.
 
double CT
 Constraint thickness parameter. More...
 
double CTMIN
 Minimum absolute value of CT used during optimization.
 
double CTL
 Constraint thickness parameter for linear and side constraints.
 
double CTLMIN
 Minimum value of CTL used during optimization.
 
double DELFUN
 Relative convergence criterion threshold.
 
double DABFUN
 Absolute convergence criterion threshold.
 
double * conminDesVars
 Array of design variables used by CONMIN (length N1 = numdv+2)
 
double * conminLowerBnds
 Array of lower bounds used by CONMIN (length N1 = numdv+2)
 
double * conminUpperBnds
 Array of upper bounds used by CONMIN (length N1 = numdv+2)
 
double * S
 Internal CONMIN array. More...
 
double * G1
 Internal CONMIN array. More...
 
double * G2
 Internal CONMIN array. More...
 
double * B
 Internal CONMIN array. More...
 
double * C
 Internal CONMIN array. More...
 
int * MS1
 Internal CONMIN array. More...
 
double * SCAL
 Internal CONMIN array. More...
 
double * DF
 Internal CONMIN array. More...
 
double * A
 Internal CONMIN array. More...
 
int * ISC
 Internal CONMIN array. More...
 
int * IC
 Internal CONMIN array. 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 CONMIN optimization library.

The CONMINOptimizer class provides a wrapper for CONMIN, a Public-domain Fortran 77 optimization library written by Gary Vanderplaats under contract to NASA Ames Research Center. The CONMIN User's Manual is contained in NASA Technical Memorandum X-62282, 1978. CONMIN 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 CONMIN's ITMAX parameter, max_function_evaluations is implemented directly in the core_run() loop since there is no CONMIN parameter equivalent, convergence_tolerance is mapped into CONMIN's DELFUN and DABFUN parameters, output verbosity is mapped into CONMIN's IPRINT parameter (verbose: IPRINT = 4; quiet: IPRINT = 2), gradient mode is mapped into CONMIN's NFDG parameter, and finite difference step size is mapped into CONMIN's FDCH and FDCHM parameters. Refer to [Vanderplaats, 1978] for additional information on CONMIN parameters.

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 CONMINOptimizer::A, Iterator::activeSet, CONMINOptimizer::B, Iterator::bestResponseArray, Iterator::bestVariablesArray, Minimizer::bigRealBoundSize, CONMINOptimizer::C, CONMINOptimizer::conminDesVars, CONMINOptimizer::conminInfo, CONMINOptimizer::conminLowerBnds, CONMINOptimizer::conminUpperBnds, CONMINOptimizer::constraintMappingIndices, CONMINOptimizer::constraintMappingMultipliers, CONMINOptimizer::constraintMappingOffsets, CONMINOptimizer::constraintValues, Model::continuous_variables(), Dakota::copy_data(), CONMINOptimizer::CT, CONMINOptimizer::CTL, CONMINOptimizer::CTLMIN, CONMINOptimizer::CTMIN, Model::current_response(), CONMINOptimizer::DABFUN, CONMINOptimizer::deallocate_workspace(), CONMINOptimizer::DELFUN, CONMINOptimizer::DF, Model::evaluate(), CONMINOptimizer::FDCH, CONMINOptimizer::FDCHM, Response::function_gradients(), Response::function_values(), CONMINOptimizer::G1, CONMINOptimizer::G2, Model::gradient_type(), CONMINOptimizer::IC, CONMINOptimizer::IPRINT, CONMINOptimizer::ISC, Iterator::iteratedModel, CONMINOptimizer::ITMAX, Model::linear_eq_constraint_coeffs(), Model::linear_ineq_constraint_coeffs(), Optimizer::localObjectiveRecast, Iterator::maxFunctionEvals, CONMINOptimizer::MS1, CONMINOptimizer::N1, CONMINOptimizer::N2, CONMINOptimizer::N3, CONMINOptimizer::N4, CONMINOptimizer::N5, CONMINOptimizer::NFDG, Model::num_linear_eq_constraints(), Model::num_linear_ineq_constraints(), CONMINOptimizer::numConminConstr, CONMINOptimizer::numConminNlnConstr, Minimizer::numContinuousVars, Minimizer::numFunctions, Optimizer::numObjectiveFns, CONMINOptimizer::objFnValue, Iterator::outputLevel, Model::primary_response_fn_sense(), ActiveSet::request_value(), ActiveSet::request_values(), CONMINOptimizer::S, CONMINOptimizer::SCAL, Minimizer::speculativeFlag, and Minimizer::vendorNumericalGradFlag.

Member Data Documentation

int conminInfo
private

INFO from CONMIN manual.

Information requested by CONMIN: 1 = evaluate objective and constraints, 2 = evaluate gradients of objective and constraints.

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

int printControl
private

IPRINT from CONMIN manual (controls output verbosity)

Values range from 0 (nothing) to 4 (most output). 0 = nothing, 1 = initial and final function information, 2 = all of #1 plus function value and design vars at each iteration, 3 = all of #2 plus constraint values and direction vectors, 4 = all of #3 plus gradients of the objective function and constraints, 5 = all of #4 plus proposed design vector, plus objective and constraint functions from the 1-D search

Referenced by CONMINOptimizer::initialize().

RealVector constraintValues
private

array of nonlinear constraint values passed to CONMIN

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 CONMINOptimizer::allocate_workspace(), and CONMINOptimizer::core_run().

SizetArray constraintMappingIndices
private

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

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

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

RealArray constraintMappingMultipliers
private

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

The length of the container corresponds to the number of CONMIN 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 CONMINOptimizer::allocate_constraints(), and CONMINOptimizer::core_run().

RealArray constraintMappingOffsets
private

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

The length of the container corresponds to the number of CONMIN 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 CONMIN assumes constraint allowables = 0.

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

int N1
private

Size variable for CONMIN arrays. See CONMIN manual.

N1 = number of variables + 2

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::initialize_run().

int N2
private

Size variable for CONMIN arrays. See CONMIN manual.

N2 = number of constraints + 2*(number of variables)

Referenced by CONMINOptimizer::allocate_workspace(), and CONMINOptimizer::core_run().

int N3
private

Size variable for CONMIN arrays. See CONMIN manual.

N3 = Maximum possible number of active constraints.

Referenced by CONMINOptimizer::allocate_workspace(), and CONMINOptimizer::core_run().

int N4
private

Size variable for CONMIN arrays. See CONMIN manual.

N4 = Maximum(N3,number of variables)

Referenced by CONMINOptimizer::allocate_workspace(), and CONMINOptimizer::core_run().

int N5
private

Size variable for CONMIN arrays. See CONMIN manual.

N5 = 2*(N4)

Referenced by CONMINOptimizer::allocate_workspace(), and CONMINOptimizer::core_run().

double CT
private

Constraint thickness parameter.

The value of CT decreases in magnitude during optimization.

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

double* S
private

Internal CONMIN array.

Move direction in N-dimensional space.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

double* G1
private

Internal CONMIN array.

Temporary storage of constraint values.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

double* G2
private

Internal CONMIN array.

Temporary storage of constraint values.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

double* B
private

Internal CONMIN array.

Temporary storage for computations involving array S.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

double* C
private

Internal CONMIN array.

Temporary storage for use with arrays B and S.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

int* MS1
private

Internal CONMIN array.

Temporary storage for use with arrays B and S.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

double* SCAL
private

Internal CONMIN array.

Vector of scaling parameters for design parameter values.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

double* DF
private

Internal CONMIN array.

Temporary storage for analytic gradient data.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

double* A
private

Internal CONMIN array.

Temporary 2-D array for storage of constraint gradients.

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), and CONMINOptimizer::deallocate_workspace().

int* ISC
private

Internal CONMIN array.

Array of flags to identify linear constraints. (not used in this implementation of CONMIN)

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), CONMINOptimizer::deallocate_workspace(), and CONMINOptimizer::initialize_run().

int* IC
private

Internal CONMIN array.

Array of flags to identify active and violated constraints

Referenced by CONMINOptimizer::allocate_workspace(), CONMINOptimizer::core_run(), CONMINOptimizer::deallocate_workspace(), and CONMINOptimizer::initialize_run().


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