Wrapper class for optimizers defined using COLIN. More...
Public Member Functions | |
COLINOptimizer (Model &model) | |
constructor | |
COLINOptimizer (Model &model, int seed) | |
alternate constructor for on-the-fly instantiations | |
COLINOptimizer (NoDBBaseConstructor, Model &model) | |
alternate constructor for Iterator instantiations by name | |
~COLINOptimizer () | |
destructor | |
void | find_optimum () |
iterates the COLIN solver to determine the optimal solution | |
bool | returns_multiple_points () const |
some COLIN methods can return multiple points | |
Protected Member Functions | |
void | solver_setup (Model &model) |
convenience function for setting up the particular COLIN solver and appropriate Application | |
void | set_rng (int seed) |
sets up the random number generator for stochastic methods | |
void | set_solver_parameters () |
sets construct-time options for specific methods based on user specifications, including calling method-specific set functions | |
void | post_run (std::ostream &s) |
Get the final set of points from the solver Look up responses and sort, first according to constraint violation, then according to function value. | |
void | resize_final_points (size_t newsize) |
resize bestVariablesArray | |
void | resize_final_responses (size_t newsize) |
resize bestResponseArray | |
Protected Attributes | |
short | solverType |
COLIN solver sub-type as enumerated in COLINOptimizer.C. | |
colin::SolverHandle | colinSolver |
handle to the COLIN solver | |
std::pair < colin::ApplicationHandle, COLINApplication * > | colinProblem |
handle and pointer to the COLINApplication object | |
colin::EvaluationManager_Base * | colinEvalMgr |
pointer to the COLIN evalutaion manager object | |
utilib::RNG * | rng |
random number generator pointer | |
bool | blockingSynch |
the synchronization setting: true if blocking , false if nonblocking | |
Real | constraint_penalty |
Buffer to hold problem constraint_penalty parameter. | |
bool | constant_penalty |
Buffer to hold problem constant_penalty parameter. |
Wrapper class for optimizers defined using COLIN.
The COLINOptimizer class wraps COLIN, a Sandia-developed C++ optimization interface library. A variety of COLIN optimizers are defined in COLIN and its associated libraries, including SCOLIB which contains the optimization components from the old COLINY (formerly SGOPT) library. COLIN contains optimizers such as genetic algorithms, pattern search methods, and other nongradient-based techniques. COLINOptimizer uses a COLINApplication object to perform the function evaluations.
The user input mappings are as follows: max_iterations
, max_function_evaluations
, convergence_tolerance
, and solution_accuracy
are mapped into COLIN's max_iterations
, max_function_evaluations_this_trial
, function_value_tolerance
, sufficient_objective_value
properties. An outputLevel
is mapped to COLIN's output_level
property and a setting of debug
activates output of method initialization and sets the COLIN debug
attribute to 10000 for the DEBUG output level. Refer to [Hart, W.E., 2006] for additional information on COLIN objects and controls.
COLINOptimizer | ( | Model & | model | ) |
constructor
Default constructor.
References ProblemDescDB::get_int(), Model::init_communicators(), Iterator::iteratedModel, Optimizer::localObjectiveRecast, Iterator::maxConcurrency, Iterator::probDescDB, Minimizer::scaleFlag, COLINOptimizer::set_rng(), COLINOptimizer::set_solver_parameters(), and COLINOptimizer::solver_setup().
COLINOptimizer | ( | Model & | model, |
int | seed | ||
) |
alternate constructor for on-the-fly instantiations
Alternate constructor for on-the-fly instantiations.
References COLINOptimizer::set_rng(), COLINOptimizer::set_solver_parameters(), and COLINOptimizer::solver_setup().
COLINOptimizer | ( | NoDBBaseConstructor | , |
Model & | model | ||
) |
alternate constructor for Iterator instantiations by name
Alternate constructor for Iterator instantiations by name.
References COLINOptimizer::set_solver_parameters(), and COLINOptimizer::solver_setup().
void find_optimum | ( | ) | [virtual] |
iterates the COLIN solver to determine the optimal solution
find_optimum redefines the Optimizer virtual function to perform the optimization using COLIN. It first sets up the problem data, then executes optimize() on the COLIN solver and finally catalogues the results.
Implements Optimizer.
References Model::asynch_flag(), COLINOptimizer::colinEvalMgr, COLINOptimizer::colinProblem, COLINOptimizer::colinSolver, COLINOptimizer::constant_penalty, COLINOptimizer::constraint_penalty, Model::continuous_variables(), Model::discrete_design_set_int_values(), Model::discrete_design_set_real_values(), Model::discrete_int_variables(), Model::discrete_real_variables(), Model::evaluation_capacity(), Iterator::iteratedModel, Iterator::numDiscreteIntVars, Iterator::numDiscreteRealVars, Iterator::outputLevel, Dakota::set_value_to_index(), and COLINOptimizer::solverType.
bool returns_multiple_points | ( | ) | const [virtual] |
some COLIN methods can return multiple points
Designate which solvers can return multiple final points.
Reimplemented from Iterator.
References COLINOptimizer::solverType.
void solver_setup | ( | Model & | model | ) | [protected] |
convenience function for setting up the particular COLIN solver and appropriate Application
This convenience function is called by the constructors in order to instantiate the solver.
References COLINOptimizer::colinProblem, COLINOptimizer::colinSolver, COLINOptimizer::constant_penalty, COLINOptimizer::constraint_penalty, ProblemDescDB::get_string(), Iterator::method_name(), Iterator::probDescDB, and COLINOptimizer::solverType.
Referenced by COLINOptimizer::COLINOptimizer().
void set_rng | ( | int | seed | ) | [protected] |
sets up the random number generator for stochastic methods
Instantiate random number generator (RNG).
References COLINOptimizer::colinSolver, and COLINOptimizer::rng.
Referenced by COLINOptimizer::COLINOptimizer().
void set_solver_parameters | ( | ) | [protected] |
sets construct-time options for specific methods based on user specifications, including calling method-specific set functions
Sets solver properties based on user specifications. Called at construction time.
References Model::asynch_flag(), COLINOptimizer::blockingSynch, COLINOptimizer::colinSolver, COLINOptimizer::constant_penalty, COLINOptimizer::constraint_penalty, Iterator::convergenceTol, ProblemDescDB::get_bool(), ProblemDescDB::get_dsa(), ProblemDescDB::get_int(), ProblemDescDB::get_real(), ProblemDescDB::get_string(), ProblemDescDB::is_null(), Iterator::iteratedModel, Iterator::maxConcurrency, Iterator::maxFunctionEvals, Iterator::maxIterations, Iterator::numContinuousVars, Iterator::outputLevel, Iterator::probDescDB, and COLINOptimizer::solverType.
Referenced by COLINOptimizer::COLINOptimizer().
void post_run | ( | std::ostream & | s | ) | [protected, virtual] |
Get the final set of points from the solver Look up responses and sort, first according to constraint violation, then according to function value.
This overrides Optimizer::post_run(). Do this because we need to unscale variables in order to look responses up in the database.
Reimplemented from Optimizer.
References Iterator::bestResponseArray, Iterator::bestVariablesArray, COLINOptimizer::colinProblem, COLINOptimizer::colinSolver, Variables::continuous_variables(), Variables::copy(), Response::copy(), Model::current_response(), Model::current_variables(), Minimizer::cvScaleMultipliers, Minimizer::cvScaleOffsets, Minimizer::cvScaleTypes, Dakota::data_pairs, Model::discrete_design_set_int_values(), Model::discrete_design_set_real_values(), Variables::discrete_int_variable(), Variables::discrete_real_variable(), Response::function_values(), Model::interface_id(), Iterator::iteratedModel, Optimizer::localObjectiveRecast, Dakota::lookup_by_val(), Minimizer::modify_s2n(), Model::nonlinear_eq_constraint_targets(), Model::nonlinear_ineq_constraint_lower_bounds(), Model::nonlinear_ineq_constraint_upper_bounds(), Model::num_nonlinear_eq_constraints(), Model::num_nonlinear_ineq_constraints(), Iterator::numContinuousVars, Iterator::numDiscreteIntVars, Iterator::numFinalSolutions, Iterator::numFunctions, Minimizer::numUserPrimaryFns, Minimizer::objective(), Model::primary_response_fn_weights(), COLINOptimizer::resize_final_points(), COLINOptimizer::resize_final_responses(), Minimizer::scaleFlag, Dakota::set_index_to_value(), Model::subordinate_model(), and Minimizer::varsScaleFlag.