You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example file shows that the builtin time() function that can be invoked in the functions block (although gives an error if invoked in a rate law) give inaccurate results. The builtin time() function and the user-defined t() function give identical values at all of the points at which they are output, but the results of integrating a rate law that invokes them differ by an amount that greatly exceeds the expected integration error. The most likely cause of the problem is that the time() function is not correctly being used at intermediate points of the integration. test_time2.bngl.txt
The text was updated successfully, but these errors were encountered:
Yeah, the time() function wraps around the time variable t in run_network.cpp. For ODE simulations, CVODE has its own time variable, which can't be accessed (or at least I couldn't). So the time() function doesn't get updated while CVODE is running in between output steps. If you increase n_steps, I bet the results of the built-in time() and user-defined t() will converge.
Note that this isn't a problem for SSA simulations, so it should work fine for those.
The example file shows that the builtin time() function that can be invoked in the functions block (although gives an error if invoked in a rate law) give inaccurate results. The builtin time() function and the user-defined t() function give identical values at all of the points at which they are output, but the results of integrating a rate law that invokes them differ by an amount that greatly exceeds the expected integration error. The most likely cause of the problem is that the time() function is not correctly being used at intermediate points of the integration.
test_time2.bngl.txt
The text was updated successfully, but these errors were encountered: