SimBiology: 'Integration Tolerance Not Met' error occurs when the dose start time is set later than a fixed value.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am using the simbiology QSP model from H Wang et al., "Dynamics of tumor-associated macrophages in a quantitative systems pharmacology model of immunotherapy in triple-negative breast cancer", iScience, 2022.
The model includes a drug treatment that works fine with both the SUNDIALS and ODE15s solvers when the dose start time is set to day 0. However, when the dose start time is set to a value later than 0, I encounter the 'Integration Tolerance Not Met' error. The error appears earlier with SUNDIALS; for example, it occurs when the dose start time is set to 7 days. In contrast, the simulation runs without issues using ODE15s until the dose start time is set to 15 days.
Surprisingly, with ODE15s, when I reduce the dose amount from 100 units to 20 units, the simulation runs fine with the delayed dose start time set to 40 days. However, if I further delay the dose start time to 50 days, the simulation fails again.
Any help will be higly appreciated.
8 Commenti
Arthur Goldsipe
il 31 Mar 2025
Thanks. That is extremely helpful. I can now reproduce the error. I will investigate.
Risposte (1)
Arthur Goldsipe
il 2 Apr 2025
Modificato: Arthur Goldsipe
il 2 Apr 2025
The error is due to an inability to solve the equations within the specified error tolerances. Unfortunately, I believe this is a fundamental characteristic of your model. If I loosen the absolute tolerance to 1e-6 (instead of 1e-9) then I am able to simulate without error for a longer simulation time. However, even with the looser tolerance the equations solve very slowly. In fact, even when I use sbioaccelerate (which typically speeds things up maybe 10 or 20 fold), I estimate it would take several days to simulate this model for the full 400 days on my M2 Max Mac Studio. This is just an indication of how hard these equations are to solve.
When I plot the results, I see that V_1.NabP and V_2.NabP rise very quickly after the first dose is applied. Decreasing the dose amount decreases the rate of increase of these species, allowing the equations to be solved with a tighter tolerance. But the exact conditions that will trigger a solver error will vary depending on a lot of factors.
Unfortunately, I don't have the time to dig deeper into what makes this model so difficult to solve. You could consider doing some sort of analysis, say local sensitivity analysis, if you want to figure out exactly what makes the model so challenging.
1 Commento
Arthur Goldsipe
il 2 Apr 2025
I have an update. If I run your run_me script and then make the following changes, I can successfully and quickly simulate the for the entire 400 days.
cs = getconfigset(model);
cs.SolverOptions.AbsoluteTolerance = 1e-6;
cs.SolverOptions.AbsoluteToleranceScaling = true;
simData = sbiosimulate(model,[],[],dose_schedule);
These changes significantly relax the error control. But it's possible that this means you aren't solving other parts of your model with sufficient accuracy. One reason I say that is because I also tried updating your script to set these options at the beginning (that is, before calling initial_conditions). If I do that, I get the message that 'Tumour did not reach specified initial tumour diameter with current parameters.'
Community
Più risposte nel SimBiology Community
Vedere anche
Categorie
Scopri di più su Scan Parameter Ranges in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!