Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infusion end time too close to another data set record causes solver failure. #9

Closed
kylebaron opened this issue Mar 8, 2016 · 1 comment

Comments

@kylebaron
Copy link
Collaborator

When the problem includes an infusion, the calculated end of the infusion
may come too close to another record. If you printed the times of these two records (infusion end and the next record) they would appear the same, but if you took the difference it would be some very small positive number (2.353E-16). When the times are too close, the solver may fail with
the message DLSODA- TOUT(=R1) too close to T(=R2) to start integration..

To fix this, I added the argument mindt to mrgsolve. If needed, you can set mindt to be greater than zero but small ... maybe 1E-12. When mindt is greater than zero and tto - tfrom (the times of two adjacent records) is less than mindt, mrgsolve will set tto equal to tfrom.

@kylebaron
Copy link
Collaborator Author

This is what the solver error looks like

DLSODA-  TOUT(=R1) too close to T(=R2) to start integration.
In above message, R1 =
[1] 5.053899e-259 4.920734e-240
DLSODA-  ISTATE (=I1) illegal.
In above message, I = 
[1] -3
DLSODA-  Run aborted.. apparent infinite loop.    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant