From 34f02a37e375ab464905daae36c8d01a764a83c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Sat, 2 Mar 2019 16:37:00 +0100 Subject: [PATCH] Fixed logic in pac_model command. If option aux_model_name is assigned a value, this value must not be discarded if options growth and steady_state_growth are simultaneously used. --- src/ParsingDriver.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc index 39f89247..a2b4beb9 100644 --- a/src/ParsingDriver.cc +++ b/src/ParsingDriver.cc @@ -2634,14 +2634,15 @@ ParsingDriver::pac_model() string aux_model_name = ""; it = options_list.string_options.find("pac.aux_model_name"); if (it != options_list.string_options.end()) - if (pac_steady_state_growth_rate_number >= 0 || pac_steady_state_growth_rate_symb_id >= 0) - { - pac_steady_state_growth_rate_number = -1; - pac_steady_state_growth_rate_symb_id = -1; - warning("when aux_model_name is used in the pac_model statement, steady_state_growth is ignored"); - } - else + { aux_model_name = it->second; + if (pac_steady_state_growth_rate_number >= 0 || pac_steady_state_growth_rate_symb_id >= 0) + { + pac_steady_state_growth_rate_number = -1; + pac_steady_state_growth_rate_symb_id = -1; + warning("when aux_model_name is used in the pac_model statement, steady_state_growth is ignored"); + } + } if (pac_steady_state_growth_rate_symb_id >= 0 && mod_file->symbol_table.getType(pac_steady_state_growth_rate_symb_id) != SymbolType::parameter)