Skip to content

IPM exec when locations have more than 1 billion individuals #185

@JavadocMD

Description

@JavadocMD

When locations contain more than 1 billion individuals, IPM calculation breaks down with an error like:

File ~/Workspaces/epymorph2/epymorph/simulator/basic/ipm_exec.py:385, in IpmExecutor._distribute(self, cohorts, events)
    [383] else:
    [384]     # event is coming from a modeled compartment
--> [385]     selected = self._rng.multivariate_hypergeometric(
    [386]         cohorts[:, cidx], occur
    [387]     ).astype(SimDType)
    [388]     occurrences[:, eidx] = selected

File numpy/random/_generator.pyx:4252, in numpy.random._generator.Generator.multivariate_hypergeometric()

ValueError: When method is "marginals", sum(colors) must be less than 1000000000.

Need to figure out a more graceful way to handle this. (One option might be a check to switch to method="count", but that's really slow.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions