Skip to content

Commit

Permalink
fix in opt for init obs par transform
Browse files Browse the repository at this point in the history
  • Loading branch information
jdub authored and jdub committed Aug 9, 2022
1 parent 722c226 commit 4e24c37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/libs/common/config_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define CONFIG_OS_H_


#define PESTPP_VERSION "5.1.18";
#define PESTPP_VERSION "5.1.19";

#if defined(_WIN32) || defined(_WIN64)
#define OS_WIN
Expand Down
15 changes: 11 additions & 4 deletions src/libs/pestpp_common/sequential_lp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,8 @@ void sequentialLP::solve()
cout << " ---------------------------------" << endl << endl << endl;

iter_presolve();
iter_solve();
iter_postsolve();
iter_solve();
iter_postsolve();
if (terminate) break;
slp_iter++;
if (slp_iter > pest_scenario.get_control_info().noptmax)
Expand Down Expand Up @@ -1112,10 +1112,11 @@ void sequentialLP::iter_presolve()

bool init_obs = false;
if (slp_iter == 1) init_obs = true;

bool success = jco.build_runs(current_pars, current_constraints_sim, names_to_run, par_trans,
pest_scenario.get_base_group_info(), pest_scenario.get_ctl_parameter_info(),
*run_mgr_ptr, out_of_bounds,false,init_obs);

if (!success)
{
const set<string> failed = jco.get_failed_parameter_names();
Expand All @@ -1133,6 +1134,7 @@ void sequentialLP::iter_presolve()
set<int> failed = run_mgr_ptr->get_failed_run_ids();

//process the remaining responses

success = jco.process_runs(par_trans, pest_scenario.get_base_group_info(), *run_mgr_ptr,
*null_prior, false,false);
if (!success)
Expand All @@ -1154,8 +1156,13 @@ void sequentialLP::iter_presolve()

if (init_obs)
{
//Observations temp_obs;
//Observations temp_obs
//Parameters temp = current_pars;
run_mgr_ptr->get_run(0, current_pars, current_constraints_sim, false);
// for (auto& n : dv_names) {
// current_pars.update_rec(n, temp.get_rec(n));
// }
par_trans.model2ctl_ip(current_pars);
}
}

Expand Down

0 comments on commit 4e24c37

Please sign in to comment.