modelGenerator module

Author:Dominic Hunt
class modelGenerator.ModelGen(model_name, parameters=None, other_options=None)[source]

Bases: object

Generates model class instances based on a model and a set of varying parameters

Parameters:
  • model_name (string) – The name of the file where a model.modelTemplate.Model class can be found
  • parameters (dictionary containing floats or lists of floats, optional) – Parameters are the options that you are or are likely to change across model instances. When a parameter contains a list, an instance of the model will be created for every combination of this parameter with all the others. Default None
  • other_options (dictionary of float, string or binary valued elements, optional) – These contain all the the model options that define the version of the model being studied. Default None
iter_details()[source]

Yields a list containing a model object and parameters to initialise them

Returns:
  • model (model.modelTemplate.Model) – The model to be initialised
  • parameters (ordered dictionary of floats or bools) – The model instance parameters
  • other_options (dictionary of floats, strings and binary values)