SimpleModelGenerator
- class glotaran.testing.model_generators.SimpleModelGenerator(rates: list[float] = <factory>, k_matrix: Literal[('parallel', 'sequential')] | dict[tuple[str, str], str] = 'parallel', compartments: list[str] | None = None, irf: dict[str, float] = <factory>, initial_concentration: list[float] = <factory>, dispersion_coefficients: list[float] = <factory>, dispersion_center: float | None = None, default_megacomplex: str = 'decay')[source]
Bases:
object
A minimal boilerplate model and parameters generator.
Generates a model (together with the parameters specification) based on parameter input values assigned to the generator’s attributes
Attributes Summary
A list of compartment names
The default_megacomplex identifier
A value representing the dispersion center
"A dict with a k_matrix specification or Literal["parallel", "sequential"]
Return the generated model.
Return generated model and parameters.
Return a dict representation of the generated model.
Return the generated parameters of type
glotaran.parameter.ParameterGroup
.Return a dict representation of the generated parameters.
Check if the generator state is valid.
A list of values representing decay rates
A dict of items specifying an irf
A list values representing the initial concentration
A list of values representing the dispersion coefficients
Methods Summary
Return a markdown string representation of the generated model and parameters.
Call validate on the generated model and return its output.
Methods Documentation
- k_matrix: Literal['parallel', 'sequential'] | dict[tuple[str, str], str] = 'parallel'
“A dict with a k_matrix specification or Literal[“parallel”, “sequential”]
- markdown() MarkdownStr [source]
Return a markdown string representation of the generated model and parameters.
- Returns
A markdown string
- Return type
- property model: glotaran.model.model.Model
Return the generated model.
- Returns
The generated model of type
glotaran.model.Model
.- Return type
- property model_and_parameters: tuple[Model, ParameterGroup]
Return generated model and parameters.
- Returns
A model of type
glotaran.model.Model
and and parameters of typeglotaran.parameter.ParameterGroup
.- Return type
- property model_dict: dict
Return a dict representation of the generated model.
- Returns
A dict representation of the generated model.
- Return type
- property parameters: glotaran.parameter.parameter_group.ParameterGroup
Return the generated parameters of type
glotaran.parameter.ParameterGroup
.- Returns
The generated parameters of type of type
glotaran.parameter.ParameterGroup
.- Return type
- property parameters_dict: dict
Return a dict representation of the generated parameters.
- Returns
A dict representing the generated parameters.
- Return type