Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch model #249

Closed
ThomasASmith opened this issue Sep 5, 2019 · 2 comments
Closed

Patch model #249

ThomasASmith opened this issue Sep 5, 2019 · 2 comments

Comments

@ThomasASmith
Copy link
Collaborator

ThomasASmith commented Sep 5, 2019

Proposal for how to modify OpenMalaria to allow patch models

Required scope: a patch model implementation that does not lead to complications or changes in the specification of single site models.

Proposed model:
Multiple OpenMalaria instances are run in parallel.
At each time step, some number of randomly sampled simulated humans are exchanged between each pair of instances.
These numbers are specified by a symmetric K x K matrix, where K is the number of patches.

Interface
The interface would be a list of xml specifications, and the ‘contact’ matrix.
The ‘model’ element of the xml should be identical across all instances, as should the numbers of simulation steps.
Parallelisation (issue #204) should be implemented as part of this.
We would only need a Unix version of this for running on a cluster.

@dhardy
Copy link
Collaborator

dhardy commented Sep 5, 2019

Technically there are two paths to implementing this:

  1. Multiple executables communicating via shared memory or message passing. This is flexible (patch specifications are entirely independent), but requires establishment of multi-process communication, synchronisation between processes, and a serialisation format for all data shared between processes (already implemented for checkpointing, but requires adjustment).
  2. Single-process model. This is simpler to implement except that (a) the monitoring system needs adjustment to handle multiple patches and (b) many parts of the specification, e.g. demography, would have to be identical in each case or require additional code changes.

It is my opinion that we should keep this goal in mind while implementing #204 and refine the proposal afterwards.

@ThomasASmith
Copy link
Collaborator Author

My initial suggestion was based on the idea that we would use path (1), which I would imagine could require fewer (no?) changes to the xml interface for the user running a single site model, with most of the new functionality programmed as a wrapper for instances of the existing executables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants