Dakota
Version 6.19
Explore and Predict with Confidence
|
Evaluation manager class for APPSPACK. More...
Inherits Executor.
Public Member Functions | |
APPSEvalMgr (Optimizer &, Model &model) | |
constructor More... | |
~APPSEvalMgr () | |
destructor | |
bool | isReadyForWork () const |
tells APPS whether or not there is a processor available to perform a function evaluation More... | |
bool | submit (const int apps_tag, const HOPSPACK::Vector &apps_xtrial, const HOPSPACK::EvalRequestType apps_request) |
performs a function evaluation at APPS-provided x_in More... | |
int | recv (int &apps_tag, HOPSPACK::Vector &apps_f, HOPSPACK::Vector &apps_cEqs, HOPSPACK::Vector &apps_cIneqs, string &apps_msg) |
returns a function value to APPS More... | |
std::string | getEvaluatorType (void) const |
return the type of the Dakota linked evaluator | |
void | printDebugInfo (void) const |
empty implementation of debug info needed to complete the interface | |
void | printTimingInfo (void) const |
empty implementation of timing info needed to complete the interface | |
void | set_asynch_flag (const bool dakotaAsynchFlag) |
publishes whether or not to do asynchronous evaluations | |
void | set_blocking_synch (const bool blockingSynchFlag) |
publishes whether or not APPS is operating synchronously | |
void | set_total_workers (const int numDakotaWorkers) |
publishes the number of processors available for function evaluations | |
Private Attributes | |
Optimizer & | dakOpt |
reference to the DakotaOptimizer | |
Model & | iteratedModel |
reference to the APPSOptimizer's model passed in the constructor | |
bool | modelAsynchFlag |
flag for asynchronous function evaluations | |
bool | blockingSynch |
flag for APPS synchronous behavior | |
int | numWorkersUsed |
number of processors actively performing function evaluations | |
int | numWorkersTotal |
total number of processors available for performing function evaluations | |
RealVector | xTrial |
trial iterate | |
std::map< int, int > | tagList |
map of DAKOTA eval id to APPS eval id (for asynchronous evaluations) | |
std::map< int, RealVector > | functionList |
map of APPS eval id to responses (for synchronous evaluations) | |
IntResponseMap | dakotaResponseMap |
map of DAKOTA responses returned by synchronize_nowait() | |
Evaluation manager class for APPSPACK.
The APPSEvalMgr class is derived from APPSPACK's Executor class. It implements the methods of that class in such away that allows DAKOTA to manage the computation of responses instead of APPS. Iterate and response values are passed between Dakota and APPSPACK via this interface.
APPSEvalMgr | ( | Optimizer & | opt, |
Model & | model | ||
) |
constructor
Evaluation manager class for APPSPACK.
The APPSEvalMgr class is derived from APPSPACK's Executor class. It implements the methods of that class in such away that allows DAKOTA to manage the computation of responses instead of APPS. Iterate and response values are passed between Dakota and APPSPACK via this interface.
bool isReadyForWork | ( | ) | const |
tells APPS whether or not there is a processor available to perform a function evaluation
Check to see if all processors available for function evaluations are being used. If not, tell APPS that one is available.
References APPSEvalMgr::numWorkersTotal, and APPSEvalMgr::numWorkersUsed.
bool submit | ( | const int | apps_tag, |
const HOPSPACK::Vector & | apps_xtrial, | ||
const HOPSPACK::EvalRequestType | apps_request | ||
) |
performs a function evaluation at APPS-provided x_in
Convert APPSPACK vector of variables to DAKOTA vector of variables and perform function evaluation asynchronously or not as specified in the DAKOTA input deck. If evaluation is asynchronous, map the dakota id to the APPS tag. If evaluation is synchronous, map the responses to the APPS tag.
References Model::current_response(), Model::current_variables(), Model::evaluate(), Model::evaluate_nowait(), Model::evaluation_id(), Response::function_values(), APPSEvalMgr::functionList, APPSEvalMgr::iteratedModel, APPSEvalMgr::modelAsynchFlag, APPSEvalMgr::numWorkersTotal, APPSEvalMgr::numWorkersUsed, and APPSEvalMgr::tagList.
int recv | ( | int & | apps_tag, |
HOPSPACK::Vector & | apps_f, | ||
HOPSPACK::Vector & | apps_cEqs, | ||
HOPSPACK::Vector & | apps_cIneqs, | ||
string & | apps_msg | ||
) |
returns a function value to APPS
Retrieve a set of reponse values, convert to APPS data structures, and return them to APPS. APPS tags are tied to corresponding responses using the appropriate (i.e., asynchronous or synchronous) map.
References APPSEvalMgr::blockingSynch, APPSEvalMgr::dakOpt, APPSEvalMgr::dakotaResponseMap, APPSEvalMgr::functionList, Optimizer::get_responses_from_dakota(), APPSEvalMgr::iteratedModel, APPSEvalMgr::modelAsynchFlag, APPSEvalMgr::numWorkersUsed, Model::synchronize(), Model::synchronize_nowait(), and APPSEvalMgr::tagList.