Species counts are stored as doubles, not ints, allowing some nasty bugs. #116
Labels
Bioscrape Core
Issues pertaining to core bioscrape functionality
documentation
Software and example documentation
invalid
This doesn't seem right
Lineages
Issues pertaining to bioscrape lineages
In multiple SSA algorithms, we have species counts stored as doubles. This allows an unwary user (such as myself) to start a simulation with non-integer species counts. If you do that, it's not too difficult to get a negative species count --> negative reaction propensity --> negative time of next reaction --> infinite loop that can't be interrupted in an ipython kernel.
I assume this is done to avoid conversions between ints and doubles, for speed reasons? We might want to put a check in place at the beginning of these simulate functions to make sure all species counts are reasonably close to an integer (maybe just round them all to ints and cast them back to doubles?).
The text was updated successfully, but these errors were encountered: