Skip to content

Commit

Permalink
fix bug in non constant params
Browse files Browse the repository at this point in the history
  • Loading branch information
longxf21 committed Feb 22, 2024
1 parent f647a74 commit 96b2e7b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ratesb_python/common/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,14 @@ def _check_constant_parameters(self, **kwargs):
reaction_id = kwargs["reaction_id"]
parameters_in_kinetic_law_only = kwargs["parameters_in_kinetic_law_only"]
non_constant_params = kwargs["non_constant_params"]
if len(non_constant_params) > 0:
non_constant_params = ",".join(non_constant_params)
non_constant_params_in_kinetic_law = []
for param in parameters_in_kinetic_law_only:
if param in non_constant_params:
non_constant_params_in_kinetic_law.append(param)
if len(non_constant_params_in_kinetic_law) > 0:
non_constant_params_in_kinetic_law = ",".join(non_constant_params_in_kinetic_law)
self.results.add_message(
reaction_id, 1006, f"Expecting these parameters to be constants: {non_constant_params}")
reaction_id, 1006, f"Expecting these parameters to be constants: {non_constant_params_in_kinetic_law}")

def _check_irreversibility(self, **kwargs):
"""
Expand Down

0 comments on commit 96b2e7b

Please sign in to comment.