$extrastylesheet
Dakota  Version 6.2
Public Member Functions | Private Attributes
APPSEvalMgr Class Reference

Evaluation manager class for APPSPACK. More...

List of all members.

Public Member Functions

 APPSEvalMgr (Model &model)
 constructor
 ~APPSEvalMgr ()
 destructor
bool isReadyForWork () const
 tells APPS whether or not there is a processor available to perform a function evaluation
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
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
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
void set_constraint_map (std::vector< int > constraintMapIndices, std::vector< double > constraintMapMultipliers, std::vector< double > constraintMapOffsets)
 publishes constraint transformation

Private Attributes

ModeliteratedModel
 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
std::vector< int > constrMapIndices
 map from Dakota constraint number to APPS constraint number
std::vector< double > constrMapMultipliers
 multipliers for constraint transformations
std::vector< double > constrMapOffsets
 offsets for constraint transformations
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()

Detailed Description

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.


Constructor & Destructor Documentation

APPSEvalMgr ( 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.


Member Function Documentation

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::asynch_compute_response(), Model::compute_response(), Model::continuous_variables(), Model::current_response(), Model::evaluation_id(), Response::function_values(), APPSEvalMgr::functionList, APPSEvalMgr::iteratedModel, APPSEvalMgr::modelAsynchFlag, APPSEvalMgr::numWorkersTotal, APPSEvalMgr::numWorkersUsed, APPSEvalMgr::tagList, and APPSEvalMgr::xTrial.

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::constrMapIndices, APPSEvalMgr::constrMapMultipliers, APPSEvalMgr::constrMapOffsets, APPSEvalMgr::dakotaResponseMap, APPSEvalMgr::functionList, APPSEvalMgr::iteratedModel, APPSEvalMgr::modelAsynchFlag, Model::num_nonlinear_eq_constraints(), APPSEvalMgr::numWorkersUsed, Model::primary_response_fn_sense(), Model::synchronize(), Model::synchronize_nowait(), and APPSEvalMgr::tagList.


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