Dakota
Version 6.20
Explore and Predict with Confidence
|
Inherits Application< colin::MO_MINLP2_problem >.
Public Member Functions | |
COLINApplication () | |
Default constructor. Rrequired by COLIN's ApplicationHandle creation. | |
COLINApplication (Model &model) | |
Constructor with Model (not presently used). | |
~COLINApplication () | |
Destructor. | |
void | set_problem (Model &model) |
Helper function called after default construction to extract problem information from the Model and set it for COLIN. More... | |
void | set_blocking_synch (const bool blockingSynchFlag) |
publishes whether or not COLIN is operating synchronously | |
virtual utilib::Any | spawn_evaluation_impl (const utilib::Any &domain, const colin::AppRequest::request_map_t &requests, utilib::seed_t &seed) |
Schedule one or more requests at specified domain point, returning a DAKOTA-specific evaluation tracking ID. More... | |
virtual bool | evaluation_available () |
Check to see if there are any function values ready to be collected. More... | |
virtual void | perform_evaluation_impl (const utilib::Any &domain, const colin::AppRequest::request_map_t &requests, utilib::seed_t &seed, colin::AppResponse::response_map_t &colin_responses) |
Perform a function evaluation at t given point. More... | |
virtual utilib::Any | collect_evaluation_impl (colin::AppResponse::response_map_t &responses, utilib::seed_t &seed) |
Collect a completed evaluation from DAKOTA. More... | |
virtual void | colin_request_to_dakota_request (const utilib::Any &domain, const colin::AppRequest::request_map_t &requests, utilib::seed_t &seed) |
Helper function to convert evaluation request data from COLIN structures to DAKOTA structures. More... | |
virtual void | dakota_response_to_colin_response (const Response &dakota_response, colin::AppResponse::response_map_t &colin_responses) |
Gelper function to convert evaluation response data from DAKOTA structures to COLIN structures. More... | |
virtual bool | map_domain (const utilib::Any &src, utilib::Any &native, bool forward=true) const |
Map the domain point into data type desired by this application context. More... | |
Protected Attributes | |
Model | iteratedModel |
Shallow copy of the model on which COLIN will iterate. | |
bool | blockingSynch |
Flag for COLIN synchronous behavior (Pattern Search only). | |
ActiveSet | activeSet |
Local copy of model's active set for convenience. | |
std::vector< int > | requestedEvals |
Evaluations queued for asynch evaluation. | |
IntResponseMap | dakota_responses |
eval_id to response mapping to cache completed jobs. | |
COLINApplication is a DAKOTA class that is derived from COLIN's Application hierarchy. It redefines a variety of virtual COLIN functions to use the corresponding DAKOTA functions. This is a more flexible algorithm library interfacing approach than can be obtained with the function pointer approaches used by NPSOLOptimizer and SNLLOptimizer.
void set_problem | ( | Model & | model | ) |
Helper function called after default construction to extract problem information from the Model and set it for COLIN.
Set variable bounds and linear and nonlinear constraints. This avoids using probDescDB, so it is called by both the standard and the on-the-fly COLINOptimizer constructors.
References Response::active_set(), COLINApplication::activeSet, Model::continuous_lower_bounds(), Model::continuous_upper_bounds(), Dakota::copy_data_partial(), Model::current_response(), Model::cv(), Model::discrete_int_lower_bounds(), Model::discrete_int_sets(), Model::discrete_int_upper_bounds(), Model::discrete_set_int_values(), Model::discrete_set_real_values(), Model::discrete_set_string_values(), Model::div(), Model::drv(), Model::dsv(), Dakota::get_nonlinear_bounds(), COLINApplication::iteratedModel, Model::linear_eq_constraint_coeffs(), Model::linear_eq_constraint_targets(), Model::linear_ineq_constraint_coeffs(), Model::linear_ineq_constraint_lower_bounds(), Model::linear_ineq_constraint_upper_bounds(), Model::num_linear_eq_constraints(), Model::num_linear_ineq_constraints(), Model::num_primary_fns(), Model::num_secondary_fns(), and Model::primary_response_fn_sense().
Referenced by COLINApplication::COLINApplication().
|
virtual |
Schedule one or more requests at specified domain point, returning a DAKOTA-specific evaluation tracking ID.
Schedule one or more requests at specified domain point, returning a DAKOTA-specific evaluation tracking ID. This is only called by COLIN's concurrent evaluator, which is only instantiated when the Model supports asynch evals. The domain point is guaranteed to be compatible with data type specified by map_domain(...)
References COLINApplication::colin_request_to_dakota_request(), Model::evaluate_nowait(), Model::evaluation_id(), and COLINApplication::iteratedModel.
|
virtual |
Check to see if there are any function values ready to be collected.
Check to see if any asynchronous evaluations have finished. This is only called by COLIN's concurrent evaluator, which is only instantiated when the Model supports asynch evals.
References COLINApplication::blockingSynch, COLINApplication::dakota_responses, COLINApplication::iteratedModel, Model::synchronize(), and Model::synchronize_nowait().
|
virtual |
Perform a function evaluation at t given point.
Perform an evaluation at a specified domain point. Wait for and return the response. This is only called by COLIN's serial evaluator, which is only instantiated when the Model does not support asynch evals. The domain point is guaranteed to be compatible with data type specified by map_domain(...)
References COLINApplication::colin_request_to_dakota_request(), Model::current_response(), COLINApplication::dakota_response_to_colin_response(), Model::evaluate(), and COLINApplication::iteratedModel.
|
virtual |
Collect a completed evaluation from DAKOTA.
Collect the next completed evaluation from DAKOTA. Always returns the evalid of the response returned.
References COLINApplication::dakota_response_to_colin_response(), and COLINApplication::dakota_responses.
|
virtual |
Helper function to convert evaluation request data from COLIN structures to DAKOTA structures.
Map COLIN info requests to DAKOTA objectives and constraints.
References Model::continuous_variables(), Model::discrete_int_sets(), Model::discrete_int_variable(), Model::discrete_real_variable(), Model::discrete_set_int_values(), Model::discrete_set_real_values(), Model::discrete_set_string_values(), Model::discrete_string_variable(), Model::div(), Model::drv(), Model::dsv(), COLINApplication::iteratedModel, Model::response_size(), and Dakota::set_index_to_value().
Referenced by COLINApplication::perform_evaluation_impl(), and COLINApplication::spawn_evaluation_impl().
|
virtual |
Gelper function to convert evaluation response data from DAKOTA structures to COLIN structures.
Map DAKOTA objective and constraint values to COLIN response.
References Response::active_set_request_vector(), and Response::function_value().
Referenced by COLINApplication::collect_evaluation_impl(), and COLINApplication::perform_evaluation_impl().
|
virtual |
Map the domain point into data type desired by this application context.
Map the domain point into data type desired by this application context (utilib::MixedIntVars). This data type can be exposed from the Any &domain presented to spawn and collect.