Dakota  Version 6.20
Explore and Predict with Confidence
Public Member Functions | Protected Attributes | List of all members
COLINApplication Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ set_problem()

void set_problem ( Model model)

◆ spawn_evaluation_impl()

utilib::Any spawn_evaluation_impl ( const utilib::Any &  domain,
const colin::AppRequest::request_map_t &  requests,
utilib::seed_t &  seed 
)
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.

◆ evaluation_available()

bool evaluation_available ( )
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().

◆ perform_evaluation_impl()

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 
)
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.

◆ collect_evaluation_impl()

utilib::Any collect_evaluation_impl ( colin::AppResponse::response_map_t &  colin_responses,
utilib::seed_t &  seed 
)
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.

◆ colin_request_to_dakota_request()

void colin_request_to_dakota_request ( const utilib::Any &  domain,
const colin::AppRequest::request_map_t &  requests,
utilib::seed_t &  seed 
)
virtual

◆ dakota_response_to_colin_response()

void dakota_response_to_colin_response ( const Response dakota_response,
colin::AppResponse::response_map_t &  colin_responses 
)
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().

◆ map_domain()

bool map_domain ( const utilib::Any &  src,
utilib::Any &  native,
bool  forward = true 
) const
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.


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