SimBiology simulation not working

789 Views Asked by At

I am trying to simulate a model (using the sundials solver) in MATLAB and I get the following error:

CVODES returned -4 from module CVODES function CVode: At t = 0 and h = 1.3093e-009, the corrector convergence test failed repeatedly or with |h| = hmin.

I cannot find anything on the internet regarding this error.

What does this error mean? How can I fix this?

1

There are 1 best solutions below

1
On BEST ANSWER

This error is described in the CVODE documentation as "Convergence test failures occurred too many times during one internal time step or minimum step size was reached.

In less technical terms, it means you probably have some "bad math" in your model. Since this error occurs when simulation time = 0, it likely means you have a problem with your initial conditions. Maybe you have an initial assignment or repeated assignment that results in NaN (not a number, like 0 divided by 0) or Inf (infinity).

To debug the problem, you could try setting the simulation stop time to 0 and looking at the results. Make sure all the numbers make sense. If they do, then plug all of those numbers into any reaction rates or rate rules and make sure those make sense.

If you're still stuck and you can share the model, then the SimBiology development team might be able to help you. (I'm one of them.) The best way to reach us is to contact technical support. But in a pinch, you can try contacting me directly.