16 #ifndef dakota_application_h
17 #define dakota_application_h
20 #include <base/parameter_handler.h>
38 #include <ParallelLibrary.H>
39 #include <ProblemDescDB.H>
40 #include <DakotaStrategy.H>
41 #include <DakotaModel.H>
42 #include <DirectApplicInterface.H>
94 class DakotaApplication
101 DakotaApplication(boost::shared_ptr<Dakota::ProblemDescDB> global_problem_db,
102 std::string parameter_file);
109 void manage_inputs(ParameterHandler& param);
117 void assign_interface(Dakota::DirectApplicInterface* optimization_interface);
147 inline bool use_NLS()
155 Dakota::RealVector vars_results();
160 Dakota::RealVector resp_results();
165 void declare_parameters(ParameterHandler& param);
171 void synchronize_variables(
unsigned int &n_dvar,
unsigned int &n_resp,
172 std::vector<std::string> &name_design_var, std::vector<std::string> &name_responses);
182 void write_hybrid_dakota_input_file();
186 void write_pareto_dakota_input_file();
190 void write_multi_start_dakota_input_file();
194 void write_single_method_dakota_input_file();
198 void write_method(std::stringstream& inputss, std::string& method_id, std::string method_name, std::string model_ptr);
202 void write_responses(std::stringstream& inputss,
int id, std::string method_name);
206 void write_variables(std::stringstream& inputss,
int id);
244 void set_all_dvar_names();
250 void check_dvar_names()
const;
258 <<
"A " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in available FCST design variables. Please define the variable in DakotaApplication class and in set_parameters in the appropriate class");
288 std::string n_gradient_type;
349 unsigned int n_nl_con;
353 unsigned int n_eq_con;
365 std::vector<std::string> name_design_var;
369 std::vector<std::string> all_name_design_var;
374 std::vector<std::string> name_responses;
379 std::string input_file;
383 boost::shared_ptr<Dakota::ProblemDescDB> problem_db;
389 std::string dakota_version;
398 bool use_dakota_input_file;
402 std::string dakota_input;
410 std::string optimization_strategy;
418 std::string optimization_method;
432 std::string NLS_data_file;
444 double convergence_tol;
448 double constraint_tol;
452 int rand_pareto_weights;
456 int rand_start_points;
460 std::string hybrid_strategy;
464 int n_hybrid_methods;
468 std::vector<std::string> hybrid_opt_method;
472 std::vector<std::string> method_list;
476 std::vector<std::string> model_ptr;
480 std::vector<double> tol;
484 std::vector<double> eval_max;
488 std::vector<double> iter_max;
496 std::vector<int> part_design_var;
500 double step_to_boundary;
508 std::string merit_function;
524 double false_conv_tol;
533 double solution_target;
537 double final_solutions;
541 double min_boxsize_limit;
545 double volume_boxsize_limit;
551 Dakota::StringArray dakota_name_design_var;
555 Dakota::RealVector ip_design_var;
559 Dakota::RealVector lb_design_var;
563 Dakota::RealVector ub_design_var;
567 Dakota::RealVector scale_design_var;
571 Dakota::StringArray scale_types;
575 Dakota::RealVector step_design_var;
579 Dakota::RealVector lb_nl_constraint;
583 Dakota::RealVector ub_nl_constraint;
587 Dakota::RealVector eq_constraint;
597 Dakota::Strategy selected_strategy;
602 double centering_param;
627 double initial_delta;
628 double threshold_delta;
629 double contraction_factor;