File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 uses : ./.github/actions/install-apt-dependencies
4646
4747 - run : AMICI_PARALLEL_COMPILE="" ./scripts/installAmiciSource.sh
48+ - run : venv/bin/python -m pip install https://github.com/dweindl/sbmlmath/archive/main.zip
4849 - run : AMICI_PARALLEL_COMPILE="" ./scripts/run-SBMLTestsuite.sh ${{ matrix.cases }}
4950
5051 - name : " Upload artifact: SBML semantic test suite results"
Original file line number Diff line number Diff line change 2424from sbmlmath import SBMLMathMLParser , TimeSymbol , CSymbol
2525import numpy as np
2626import sympy as sp
27- from sympy .logic .boolalg import BooleanFalse , BooleanTrue
27+ from sympy .logic .boolalg import BooleanFalse , BooleanTrue , BooleanFunction
2828
2929from . import has_clibs
3030from .de_model import DEModel
@@ -2904,6 +2904,7 @@ def _sympy_from_sbml_math(
29042904 definition_url = "http://www.sbml.org/sbml/symbols/avogadro" ,
29052905 )
29062906 expr = expr .subs (avogadro , sp .Float (float (avogadro )))
2907+
29072908 # replace other symbols, e.g. for handling hardcoded parameters
29082909 expr = expr .subs (
29092910 {
@@ -2929,6 +2930,12 @@ def _sympy_from_sbml_math(
29292930 expr = expr .evalf ()
29302931 _check_unsupported_functions_sbml (expr , expression_type = ele_name )
29312932
2933+ # boolean to numeric piecewise
2934+ if isinstance (expr , BooleanFunction ):
2935+ from sbmlmath .mathml_parser import _bool2num
2936+
2937+ expr = _bool2num (expr )
2938+
29322939 # piecewise to heavisides
29332940 if piecewise_to_heaviside :
29342941 try :
You can’t perform that action at this time.
0 commit comments