Unverified Commit abde60fb authored by Stéphane Adjemian (Charybdis)'s avatar Stéphane Adjemian (Charybdis)
Browse files

pac: Changed logic of the tests on growth and steady_state_growth options.

parent 64f55e4a
Pipeline #884 passed with stage
in 1 minute and 29 seconds
...@@ -2627,12 +2627,12 @@ ParsingDriver::pac_model() ...@@ -2627,12 +2627,12 @@ ParsingDriver::pac_model()
else else
aux_model_name = it->second; aux_model_name = it->second;
else else
if (pac_steady_state_growth_rate_number < 0 && pac_steady_state_growth_rate_symb_id < 0) if (pac_growth_symb_id >= 0 && mod_file->symbol_table.getType(pac_growth_symb_id) == SymbolType::parameter
error("when aux_model_name is not passed to the pac_model statement, you must pass steady_state_growth option"); && (pac_steady_state_growth_rate_number >= 0 || pac_steady_state_growth_rate_symb_id >=0))
else if (pac_growth_symb_id >= 0 && mod_file->symbol_table.getType(pac_growth_symb_id) == SymbolType::parameter warning("If growth option is constant, steady_state_growth is ignored");
&& (pac_steady_state_growth_rate_number >= 0 else if (pac_growth_symb_id >= 0 && mod_file->symbol_table.getType(pac_growth_symb_id) != SymbolType::parameter
|| pac_steady_state_growth_rate_symb_id != pac_growth_symb_id)) && (pac_steady_state_growth_rate_number < 0 || pac_steady_state_growth_rate_symb_id < 0))
error("when aux_model_name is not passed to the pac_model statement, steady_state_growth must be a parameter equal to growth"); error("The steady state growth rate of the target must be provided (steady_state_growth option) if option growth is not constant");
if (pac_steady_state_growth_rate_symb_id >= 0 if (pac_steady_state_growth_rate_symb_id >= 0
&& mod_file->symbol_table.getType(pac_steady_state_growth_rate_symb_id) != SymbolType::parameter) && mod_file->symbol_table.getType(pac_steady_state_growth_rate_symb_id) != SymbolType::parameter)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment