Dakota
Version
Explore and Predict with Confidence
|
NOMAD-based Evaluator class. More...
Inherits Evaluator.
Public Member Functions | |
Evaluator (const NOMAD::Parameters &p, Model &model) | |
Constructor. More... | |
~Evaluator (void) | |
Destructor. | |
bool | eval_x (NOMAD::Eval_Point &x, const NOMAD::Double &h_max, bool &count_eval) const |
Main Evaluation Method. More... | |
bool | eval_x (std::list< NOMAD::Eval_Point * > &x, const NOMAD::Double &h_max, std::list< bool > &count_eval) const |
multi-point variant of evaluator | |
void | set_constraint_map (int numNomadNonlinearIneqConstraints, int numNomadNonlinearEqConstraints, std::vector< int > constraintMapIndices, std::vector< double > constraintMapMultipliers, std::vector< double > constraintMapOffsets) |
publishes constraint transformation | |
void | set_surrogate_usage (std::string useSurrogate) |
publishes surrogate usage | |
Private Member Functions | |
void | set_variables (const NOMAD::Eval_Point &x) const |
map NOMAD evaluation point to Dakota model | |
void | eval_model (bool allow_asynch, const NOMAD::Eval_Point &x) const |
evaluate the Dakota model (block or not, but don't collect response) | |
void | get_responses (const RealVector &ftn_vals, NOMAD::Eval_Point &x) const |
map Dakota model responses to NOMAD evaluation point | |
Private Attributes | |
Model & | _model |
int | n_cont |
int | n_disc_int |
int | n_disc_real |
int | numNomadNonlinearIneqConstr |
Number of nonlinear constraints after put into Nomad format. | |
int | numNomadNonlinearEqConstr |
std::vector< int > | constrMapIndices |
map from Dakota constraint number to Nomad constraint number | |
std::vector< double > | constrMapMultipliers |
multipliers for constraint transformations | |
std::vector< double > | constrMapOffsets |
offsets for constraint transformations | |
std::string | useSgte |
defines use of surrogate in NOMAD | |
NOMAD-based Evaluator class.
The NOMAD process requires an evaluation step, which calls the Simulation program. In the simplest version of this call, NOMAD executes the black box executable, which proceeds to write a file in a NOMAD-compatible format, which NOMAD reads to continue the process.
Because DAKOTA files are different form NOMAD files, and the simulations processed by DAKOTA already produce DAKOTA-compatible files, we cannot use this method for NOMAD. Instead, we implement the NomadEvaluator
class, which takes the NOMAD inputs and passes them to DAKOTA's Interface for processing. The evaluator then passes the evaluation Responses into the NOMAD objects for further analysis.
bool eval_x | ( | NOMAD::Eval_Point & | x, |
const NOMAD::Double & | h_max, | ||
bool & | count_eval | ||
) | const |
Main Evaluation Method.
Method that handles the communication between the NOMAD search process and the Black Box Evaluation managed by DAKOTA's Interface.
x | Object that contains the points that need to evaluated. Once the evaluation is completed, this object also stores the output back to be read by NOMAD. |
h_max | Current value of the barrier parameter. Not used in this implementation. |
count_eval | Flag that indicates whether this evaluation counts towards the max number of evaluations, often set to false when the evaluation does not meet certain costs during expensive evaluations. Not used in this implementation. |
true
if the evaluation was successful; false
otherwise. References Dakota::get_responses(), and Dakota::set_variables().