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

[Feature request]: configuration file specification of initial conditions #436

Open
pearsonca opened this issue Jan 3, 2025 · 0 comments

Comments

@pearsonca
Copy link
Contributor

Label

enhancement, gempyor

Priority Label

high priority

Is your feature request related to a problem? Please describe.

Need to refactor initial conditions such that configuration file specification for initial conditions works the same way as parameters.

Is your feature request related to a new application, scenario round, pathogen? Please describe.

No response

Describe the solution you'd like

This refactoring should:

  • internally: do nothing different with how initial conditions are used (obviously will need to change how they are parsed out). this is just update to how initial conditions are specified in config
  • prefer: deprecate the current approach to initial conditions. warn the user about deprecation, and emit the rewritten yaml they can substitute.
  • alt: break the current approach. provide a tool for translating initial conditions into the new format?
  • alt: provide no support & force user updates

Currently, the example initial conditions look like:

initial_conditions:
  method: SetInitialConditions
  initial_conditions_file: model_input/ic_2pop.csv
  allow_missing_subpops: TRUE
  allow_missing_compartments: TRUE

and

initial_conditions:
  method: plugin
  plugin_file_path: model_input/my_initial_conditions.py

This should become something like:

...
parameters:
  X0:
    type: file
    value: model_input/ic_2pop.csv
    allow_missing_subpops: TRUE
    allow_missing_compartments: TRUE
...

where for now we have a special variable name for initial conditions (X0), which would later lose its special status, but likely stick around as a naming convention. type will distinguish between e.g. a file, a plugin to run, as well as a prior, a fixed value, etc, etc.

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

No branches or pull requests

1 participant