invalid state and limits for numerical values

38 views
Skip to first unread message

hadrien delattre

unread,
Mar 12, 2021, 4:13:22 AM3/12/21
to COPASI User Forum
Hello everyone,
I am trying to run automatically generated ODE systems in COPASI (I am doing time course simulations). Depending on how I define my system, I encounter the following error; "CTrajectoryMethod (25): Invalid state at time '0.010000'." As far as I know, this specific error is not documented (http://copasi.org/Support/User_Manual/Error_Messages/Trajectory_Method/) so I have been looking for the source of it in my ODE system.
My guess is that it could be raised if the variables take values such as NaN. Could such error be raised by an overflow? Depending on how I create my ODE system, it may include extremely high (or extremely small) numerical constants (such as 1e286). Could someone tell me what are the limits for numerical values in Copasi?

best regards,
Hadrien

Frank Bergmann

unread,
Mar 12, 2021, 4:33:10 AM3/12/21
to COPASI User Forum
Indeed this error indicates that a NaN value was encountered. Most frequently this error is caused when dividing by zero, so I'd have a look at your equations for that aspect, and ensure that your generated systems wouldn't cause those. I think an overflow is less likely to generate it. 

If you have a very wide range of parameter values (really small ones, and really big ones), you'd be more likely to get errors about the maximal number of steps being insufficient. 

Feel free to send me a model, and i could have a look as to why this is the case there. 

best
Frank

hadrien delattre

unread,
Mar 12, 2021, 2:19:13 PM3/12/21
to COPASI User Forum
Thank you, indeed it could possibly be a division by zero somewhere, I will check that. 
Anyway, here is a link to a sbml version of my model so far which gives rise to a CTrajectoryMethod message; https://www.dropbox.com/s/cugxnzyg2l4tfjo/buggy_atp_hydrolysis.xml?dl=0
(it is a model of ATP hydrolysis which accounts for speciation and protons dynamics)

sven....@gmail.com

unread,
Mar 12, 2021, 2:50:24 PM3/12/21
to COPASI User Forum
Hello Hadrien,

it seems that already in the initial state (that means before the simulation even starts) the ODE for Hp_c is NaN. Since the expression is so big, I cannot see the cause, but you could check if the argument to the logarithm might be negative. That could be the reason for NaN.

Sven
Reply all
Reply to author
Forward
0 new messages