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.
issue#70
Stéphane Adjemian (Charybdis) 2019-03-02 16:37:00 +01:00
parent e56f994d28
commit 34f02a37e3
Signed by untrusted user who does not match committer: stepan
GPG Key ID: A6D44CB9C64CE77B
1 changed files with 8 additions and 7 deletions

View File

@ -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)