Skip to content

Commit

Permalink
Fix adding repeated State symbols (similar to parameters)
Browse files Browse the repository at this point in the history
  • Loading branch information
twomagpi committed Jul 2, 2020
1 parent 4c79c79 commit b4b305d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygom/model/base_ode_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ def _addStateSymbol(self, input_str):
symbol_name = self._addSymbol(var_obj.ID)

if isinstance(symbol_name, sympy.Symbol):
if symbol_name not in self._paramList:
if str(symbol_name) not in self._paramList:
self._addVariable(symbol_name, var_obj,
self._stateList,
self._stateDict)
Expand All @@ -796,6 +796,7 @@ def _addStateSymbol(self, input_str):
return None

def _addParamSymbol(self, input_str):
# turn input_str into a ODEVarialbe if required
if isinstance(input_str, str):
var_obj = ODEVariable(input_str, input_str)
elif isinstance(input_str, ODEVariable):
Expand Down

0 comments on commit b4b305d

Please sign in to comment.