I’m getting an error while simulating a SimBiology model that I have NaN or Inf values on the right-hand-side, but I’m having trouble identifying the species/parameters responsible for this error. The issue occurs at the same time as an event, so I can’t just stop the simulation at a shorter timepoint to try to identify the cause of this error. Is there a simple way to identify what reaction is causing the NaN or Inf values?
When I turned on ‘dbstop if warning’, I was able to get into the ‘sbioodeflux’ right-hand side function. I can then see some Inf values, but I can’t figure out how to map those Inf values back to model elements. In particular, I see that reactionFlux(77) is Inf, but I don’t know which is the 77th reaction flux. Likewise, I don’t know what the elements of Y0 and P0 correspond to.
Is there an easy way for me to get more detailed information on the cause of NaN and Inf values in SimBiology? If not, is there a way I can figure out the mapping of the elements in the ‘sbioodeflux’ function to the model element names? This mapping must exist somewhere, but I can’t find it.