Skip to content

Species counts are stored as doubles, not ints, allowing some nasty bugs. #116

@sclamons

Description

@sclamons

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?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bioscrape CoreIssues pertaining to core bioscrape functionalityLineagesIssues pertaining to bioscrape lineagesdocumentationSoftware and example documentationinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions