SciML / CellMLToolkit.jl

CellMLToolkit.jl is a Julia library that connects CellML models to the Scientific Julia ecosystem.
https://docs.sciml.ai/CellMLToolkit/stable/
Other
62 stars 15 forks source link

DomainError: Exponentiation yielding a complex result requires a complex argument. #53

Open anandijain opened 3 years ago

anandijain commented 3 years ago

https://models.cellml.org/workspace/iyer_hajjar_armoundas_2007/@@file

ERROR: LoadError: DomainError with -0.14962747399673745:
--
Exponentiation yielding a complex result requires a complex argument.
Replace x^y with (x+0im)^y, Complex(x)^y, or similar.

I figured it would be good to have a tracker issue on this one, since it's come up before but only discussed on slack.

@shahriariravanian I forget, this issue would be quite difficult to resolve, right?

shahriariravanian commented 3 years ago

This usually happens because the model is unstable and you get something like a negative argument to a log or, as in here, a negative number raised to a non-integer power. It can be fixed by adjusting the solver and its parameters (smaller dt and such) but we are using a generic ODE solver to test the models. The actual user of a model should test different solvers and parameters to find the right combinations.