"simulations failed when using the initial values of estimated parameters" with simbiology fitting but no error when using the same parameters/setting for sbiosimulate
10 views (last 30 days)
Show older comments
Hello,
I am having some trouble fitting a model to data using Simbiology. The error message seem to indicate simulation failure when using initial parameter estimates. But when I use exactly the same model, dose, Configset, and set parameters to be idential to the initial parameter estimate for fitting to run "sbiosimulate", the simulation finished without error. Could you please advise how to deal with this error. Thank you very much in advance!
The error I got is attached below (there is a dose delay of 2000):
Error using SimBiology.fit.internal.validateSimFunctionWithDoseInputs
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 SimBiology.fit.internal.FitObject/fit (line 216)
obj.SimFunctionDoseInputs = SimBiology.fit.internal.validateSimFunctionWithDoseInputs(obj.SimFunction, values, obj.Dosing, obj.OutputTimesCell, tfEmptyDose);
Error in sbiofit (line 318)
[varargout{1:nargout}] = fitObject.fit(modelObj, data, responseMap, estimInfo, varargin{:});
Error in fitproblem/fit (line 650)
[varargout{1:max(1,nargout)}] = feval(argCell{:});
Caused by:
Unable to complete simulation for input parameters [0.5 0.1 1e-09] because:
CVODES returned -4 from module CVODES function CVode: At t = 2000 and h = 7.28377e-15, the corrector convergence test failed repeatedly or with |h| = hmin.
Empty results have been returned for this simulation.
1 Comment
Torsten
on 18 Mar 2025
Does "sbiosimulate" also use CVODE as ODE integrator ? For the fitting part, could you choose the integrator that was successful in the simulation part ?
Answers (1)
Arthur Goldsipe
on 18 Mar 2025
It's difficult to diagnose without more information. Can you share your code either here on MATLAB Answers or privately with the SimBiology team at MathWorks? (You can contact me via my profile for more details on how to share files privately.)
If you can't share your code, then the only idea I have is that this may be an issue due to calculating sensitivities during the simulation. If that's the case, one option would be to set SensitivityAnalysis to false on the fitproblem object. (By default, we use sensitivity analysis during fitting in order to get more accurate gradient estimates, which can speed up the convergence of the optimization.)
0 Comments
Communities
More Answers in the SimBiology Community
See Also
Categories
Find more on Scan Parameter Ranges in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!