# MGen Script

Simulates multiple datasets from a PopPK/PD model. A multi population version of Gen Script.

Note that running PoPy on a MGen Script creates similar outputs to running it on a MSim Script. However, a MGen Script also generates new time points and dose data for each data set.

A MGen Script can be created by a MTut Script in a similar fashion to how a Gen Script can be created by a Tut Script.

## Main Sections of a MGen Script

- METHOD_OPTIONS
- DESCRIPTION
- FILE_PATHS
- DATA_FIELDS
- LEVEL_PARAMS
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- ODE_SOLVER
- OUTPUT_OPTIONS

## Full Structure of a MGen Script

- METHOD_OPTIONS
  - py_module
  - rand_seed
  - float_format
- DESCRIPTION
  - name
  - title
  - author
  - abstract
  - keywords
- FILE_PATHS
  - output_folder
  - temp_folder
  - output_file_ext
- DATA_FIELDS
  - type_field
  - id_field
  - time_field
- LEVEL_PARAMS
  - params
  - split_field
  - split_dict
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- ODE_SOLVER
  - NO_SOLVER
  - ANALYTIC
  - SCIPY_ODEINT
    - atol
    - rtol
    - max_nsteps
    - use_sens
- OUTPUT_OPTIONS
  - n_pop_samples