Dakota  Version 6.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
NCSUOptimizer Class Reference

Wrapper class for the NCSU DIRECT optimization library. More...

Inheritance diagram for NCSUOptimizer:
Optimizer Minimizer Iterator

Public Member Functions

 NCSUOptimizer (ProblemDescDB &problem_db, Model &model)
 standard constructor More...
 
 NCSUOptimizer (Model &model, const int &max_iter, const int &max_eval, double min_box_size=-1., double vol_box_size=-1., double solution_target=-DBL_MAX)
 alternate constructor for instantiations "on the fly" More...
 
 NCSUOptimizer (Model &model)
 alternate constructor for Iterator instantiations by name More...
 
 NCSUOptimizer (const RealVector &var_l_bnds, const RealVector &var_u_bnds, const int &max_iter, const int &max_eval, double(*user_obj_eval)(const RealVector &x), double min_box_size=-1., double vol_box_size=-1., double solution_target=-DBL_MAX)
 alternate constructor for instantiations "on the fly" More...
 
 ~NCSUOptimizer ()
 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...
 

Private Member Functions

void initialize ()
 shared code among model-based constructors
 
void check_inputs ()
 verify problem respects NCSU DIRECT Fortran limits
 

Static Private Member Functions

static int objective_eval (int *n, double c[], double l[], double u[], int point[], int *maxI, int *start, int *maxfunc, double fvec[], int iidata[], int *iisize, double ddata[], int *idsize, char cdata[], int *icsize)
 'fep' in Griffin-modified NCSUDirect: computes the value of the objective function (potentially at multiple points, passed by function pointer to NCSUDirect). Include unscaling from DIRECT. More...
 

Private Attributes

short setUpType
 controls iteration mode: SETUP_MODEL (normal usage) or SETUP_USERFUNC (user-supplied functions mode for "on the fly" instantiations). see enum in NCSUOptimizer.cpp NonDGlobalReliability currently uses the model mode. GaussProcApproximation currently uses the user_functions mode.
 
Real minBoxSize
 holds the minimum boxsize
 
Real volBoxSize
 hold the minimum volume boxsize
 
Real solutionTarget
 holds the solution target minimum to drive towards
 
RealVector lowerBounds
 holds variable lower bounds passed in for "user_functions" mode.
 
RealVector upperBounds
 holds variable upper bounds passed in for "user_functions" mode.
 
double(* userObjectiveEval )(const RealVector &x)
 holds function pointer for objective function evaluator passed in for "user_functions" mode.
 

Static Private Attributes

static NCSUOptimizerncsudirectInstance
 pointer to the active object instance used within the static evaluator functions in order to avoid the need for static data
 

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.
 
- 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)
 
- 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 NCSU DIRECT optimization library.

The NCSUOptimizer class provides a wrapper for a Fortran 77 implementation of the DIRECT algorithm developed at North Carolina State University. It uses a function pointer approach for which passed functions must be either global functions or static member functions. Any attribute used within static member functions must be either local to that function or accessed through a static pointer.

The user input mappings are as follows:

Constructor & Destructor Documentation

NCSUOptimizer ( ProblemDescDB problem_db,
Model model 
)

standard constructor

This is the standard constructor with method specification support.

References NCSUOptimizer::check_inputs(), and NCSUOptimizer::initialize().

NCSUOptimizer ( Model model,
const int &  max_iter,
const int &  max_eval,
double  min_box_size = -1.,
double  vol_box_size = -1.,
double  solution_target = -DBL_MAX 
)

alternate constructor for instantiations "on the fly"

This is an alternate constructor for instantiations on the fly using a Model but no ProblemDescDB.

References NCSUOptimizer::check_inputs(), NCSUOptimizer::initialize(), Iterator::maxFunctionEvals, and Iterator::maxIterations.

NCSUOptimizer ( Model model)

alternate constructor for Iterator instantiations by name

This is an alternate constructor for Iterator instantiations by name using a Model but no ProblemDescDB.

References NCSUOptimizer::check_inputs(), and NCSUOptimizer::initialize().

NCSUOptimizer ( const RealVector &  var_l_bnds,
const RealVector &  var_u_bnds,
const int &  max_iter,
const int &  max_eval,
double(*)(const RealVector &x)  user_obj_eval,
double  min_box_size = -1.,
double  vol_box_size = -1.,
double  solution_target = -DBL_MAX 
)

alternate constructor for instantiations "on the fly"

This is an alternate constructor for performing an optimization using the passed in objective function pointer.

References NCSUOptimizer::check_inputs(), Iterator::maxFunctionEvals, and Iterator::maxIterations.

Member Function Documentation

void core_run ( )
virtual
int objective_eval ( int *  n,
double  c[],
double  l[],
double  u[],
int  point[],
int *  maxI,
int *  start,
int *  maxfunc,
double  fvec[],
int  iidata[],
int *  iisize,
double  ddata[],
int *  idsize,
char  cdata[],
int *  icsize 
)
staticprivate

'fep' in Griffin-modified NCSUDirect: computes the value of the objective function (potentially at multiple points, passed by function pointer to NCSUDirect). Include unscaling from DIRECT.

Modified batch evaluator that accepts multiple points and returns corresponding vector of functions in fvec. Must be used with modified DIRECT src (DIRbatch.f).

References Model::asynch_flag(), Model::continuous_variables(), Model::current_response(), Model::evaluate(), Model::evaluate_nowait(), Response::function_value(), Iterator::iteratedModel, NCSUOptimizer::ncsudirectInstance, Model::primary_response_fn_sense(), NCSUOptimizer::setUpType, Model::synchronize(), and NCSUOptimizer::userObjectiveEval.

Referenced by NCSUOptimizer::core_run().


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