Skip to content

Commit fd1e22e

Browse files
authored
Fix compilation error for models with events and xdot=0 (#2111)
Fixes #2110
1 parent 3b4e12d commit fd1e22e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/sdist/amici/de_export.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,9 +1999,10 @@ def _compute_equation(self, name: str) -> None:
19991999

20002000
# need to check if equations are zero since we are using
20012001
# symbols
2002-
if not smart_is_zero_matrix(self.eq("stau")[ie]):
2002+
if not smart_is_zero_matrix(self.eq("stau")[ie]) \
2003+
and not smart_is_zero_matrix(self.eq("xdot")):
20032004
tmp_eq += smart_multiply(
2004-
(self.sym("xdot_old") - self.sym("xdot")),
2005+
self.sym("xdot_old") - self.sym("xdot"),
20052006
self.sym("stau").T,
20062007
)
20072008

0 commit comments

Comments
 (0)