Skip to content

Commit

Permalink
revised fixed instruction to allow trailing whitespace - j doh says t…
Browse files Browse the repository at this point in the history
…his is allowed...
  • Loading branch information
jtwhite79 committed Dec 3, 2024
1 parent 5e36ab8 commit c24d977
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion benchmarks/basic_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,8 @@ def tenpar_uniform_invest():


if __name__ == "__main__":
mf6_v5_sen_test()
tplins1_test()
#mf6_v5_sen_test()
#tenpar_uniform_invest()
#tenpar_collapse_invest()
#plot_collapse_invest()
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tplins_test_1/template/out1.dat.ins
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ l1 ~,~ ~,~ ~,~ ~,~ ~,~ ~,~ ~,~ ~,~ !h02_09!
~ primary ~ !h01_10! ~ secondary ~ [h01_09]45:54
l3
l1 !h01_01! ~secondary~ !h01_02! !h01_03! !h01_04! !h01_05! !h01_06! !h01_07! (h01_08)107:114
l1 [h02_01]1:8 [h02_02]9:16 [h02_03]17:24 !h02_04! !h02_05! !h02_06! !h02_07! !h02_08!
l1 [h02_01]1:8 [h02_02]9:16 [h02_03]17:26 !h02_04! !h02_05! !h02_06! !h02_07! !h02_08!
l1 [h02_10]1:5
l1 ~dummy_obs~ !dummy_obs!

Expand Down
5 changes: 4 additions & 1 deletion src/libs/run_managers/abstract_base/model_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,10 @@ pair<string, double> InstructionFile::execute_fixed(const string& token, string&
}
if ((info.first != "DUM") && (idx != temp.size()))
{
throw_ins_error("error converting '" + temp + "' to double on output line '" + last_out_line + "' for fixed instruciton: '" + token + "', left-over chars: '" + temp.substr(idx, temp.size()) + "'", ins_line_num, out_line_num);
string leftover = temp.substr(idx, temp.size());
pest_utils::strip_ip(leftover);
if (leftover.size() > 0)
throw_ins_error("error converting '" + temp + "' to double on output line '" + last_out_line + "' for fixed instruciton: '" + token + "', left-over chars: '" + leftover + "'", ins_line_num, out_line_num);
}
int pos = line.find(temp);
if (pos == string::npos)
Expand Down

0 comments on commit c24d977

Please sign in to comment.