MATLAB Answers

Error in data fitting in simbiology

6 views (last 30 days)
When I run data fitting with my simbiology model, I saw this error pop up. However I am not sure what exacctly this error means.
I also try to simulate with my model, verify my model, check with my inital conditions and no error pop up.
Could you please tell me how to interpete this error message? And what is the potential problem may occure in my model?
Thank you very much.
Error using (line 53)
One or more simulations failed when using the initial values of estimated parameters. Check your model for errors or try different initial values for estimated parameters.
Error in (line 202)
obj.SimFunctionDoseInputs =, obj.Phi0, obj.Dosing, obj.OutputTimesCell, tfEmptyDose);
Error in sbiofit (line 298)
[varargout{1:nargout}] =, data, responseMap, estimInfo, varargin{:});
Caused by:
Error using (line 37)
Unable to complete simulation for input parameters [0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1] because:
CVODES returned -4 from module CVODES function CVode: At t = 0 and h = 1.46642e-11, the corrector convergence test failed repeatedly or with |h| = hmin.
Empty results have been returned for this simulation.

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 9 Feb 2021
Edited: Arthur Goldsipe on 10 Feb 2021
When you perform a fit in SimBiology, one of the first things that happens is the model is simulated using the initial parameter estimates you provide. If any of those simulations error, then you will get an error message like the one you are seeing.
The specific error you are seeing indicates the ODE solver could not proceed past time = 0. One way this could happen is if one of your model parameters has a non-finite value after evaluating all your assignment rules and initial doses (that is, inf for infinity or NaN for "not a number", which occurs when dividing 0 by 0).
To diagnose the problem, I suggest doing a separate simulation of the model using the doses you will use for fitting and the initial parameter estimate guesses you are providing for fitting. If you are still stuck and can share the model here or with Technical Support, we can help you diagose the problem.
UPDATE: I forgot to mention that the SimBiology Model Debugger is a very useful tool for debugging such simulation errors.
Good luck!
  1 Comment
Jesse Chao
Jesse Chao on 10 Feb 2021
Hello Arthur,
Thank you very much for your clear explanation. I have successfully solved this problem by identifying one of my reaction including a calculation of one number divided by 0.
I am really appreciated for your help.
Thank you. Take care.

Sign in to comment.

More Answers (0)


More Answers in the  SimBiology Community





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!