Skip to content

Commit 6db86cf

Browse files
author
Michael Morphew
committed
Trying a different way to access all pars
1 parent 8d95c7b commit 6db86cf

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/libs/pestpp_common/Pest.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,29 +1630,29 @@ pair<string,double> Pest::enforce_par_limits(PerformanceLog* performance_log, Pa
16301630
}
16311631
// if there are parameters tied to this one, check the tied parameter bounds
16321632
if (pestpp_options.get_enforce_tied_bounds())
1633-
ss.str("");
1634-
ss << "Enforcing tied bounds for pest++glm" << endl;
16351633
{
1634+
ss.str("");
1635+
ss << "Enforcing tied bounds for pest++glm" << endl;
1636+
Parameters upgrade_ctl_pars = base_par_transform.active_ctl2ctl_cp(upgrade_active_ctl_pars);
16361637
const map<string,pair<string,double>> tied_map = base_par_transform.get_tied_ptr()->get_items();
1637-
for (const auto& potential_name : ctl_ordered_par_names)
1638+
for (auto p_potential : upgrade_ctl_pars)
16381639
{
1639-
const ParameterRec* potential_rec = p_info.get_parameter_rec_ptr(potential_name);
1640-
ParameterRec::TRAN_TYPE tran = potential_rec->tranform_type;
1640+
const ParameterRec *p_potential_rec = p_info.get_parameter_rec_ptr(p_potential.first);
1641+
ParameterRec::TRAN_TYPE tran = p_potential_rec->tranform_type;
16411642
if (tran == ParameterRec::TRAN_TYPE::TIED)
16421643
{
1643-
string partied = tied_map.at(potential_name).first;
1644+
string partied = tied_map.at(p_potential.first).first;
16441645
if (p.first == partied)
1645-
16461646
{
16471647
ss.str("");
16481648
ss << "tied parameter to current active parameter found, checking for tighter bounds" << endl;
1649-
if (p.second > potential_rec->ubnd)
1649+
if (p.second > p_potential_rec->ubnd)
16501650
{
1651-
p.second = potential_rec->ubnd;
1651+
p.second = p_potential_rec->ubnd;
16521652
}
1653-
else if (p.second < potential_rec->lbnd)
1653+
else if (p.second < p_potential_rec->lbnd)
16541654
{
1655-
p.second = potential_rec->lbnd;
1655+
p.second = p_potential_rec->lbnd;
16561656
}
16571657

16581658
}

0 commit comments

Comments
 (0)