# 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
- PARALLEL
- DESCRIPTION
- FILE_PATHS
- DATA_FIELDS
- EFFECTS
- PREPROCESS
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- POSTPROCESS
- ODE_SOLVER
- OUTPUT_OPTIONS

## Full Structure of a MGen Script

- METHOD_OPTIONS
  - py_module
  - rand_seed
  - float_format
- PARALLEL
  - SINGLE
  - MPI_WORKERS
    - n_workers
- DESCRIPTION
  - name
  - title
  - author
  - abstract
  - keywords
- FILE_PATHS
  - output_folder
  - temp_folder
  - log_folder
  - output_file_ext
- DATA_FIELDS
  - type_field
  - id_field
  - time_field
- EFFECTS
- PREPROCESS
- MODEL_PARAMS
- STATES
- DERIVATIVES
- PREDICTIONS
- POSTPROCESS
- ODE_SOLVER
  - NO_SOLVER
  - ANALYTIC
    - use_supersections
    - use_sens
  - SCIPY_ODEINT
    - atol
    - rtol
    - max_nsteps
    - use_supersections
    - use_jacobian
    - use_sens
    - use_tcrit
  - CPPODE
    - atol
    - rtol
    - max_nsteps
    - use_supersections
    - use_sens
- OUTPUT_OPTIONS
  - n_pop_samples