Skip to content

Commit f278b8e

Browse files
committed
Fix compilation error for models with events and xdot=0
Fixes #2110
1 parent fcd467d commit f278b8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/sdist/amici/de_export.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,9 @@ def _compute_equation(self, name: str) -> None:
20012001
# symbols
20022002
if not smart_is_zero_matrix(self.eq("stau")[ie]):
20032003
tmp_eq += smart_multiply(
2004-
(self.sym("xdot_old") - self.sym("xdot")),
2004+
(self.sym("xdot_old") - self.sym("xdot"))
2005+
if not smart_is_zero_matrix(self.eq("xdot"))
2006+
else self.sym("xdot_old"),
20052007
self.sym("stau").T,
20062008
)
20072009

0 commit comments

Comments
 (0)