This function runs a model based on information
provided in the modelsettings list passed into it.
a list with model settings. Required list elements are:
modelsettings$simfunction - name of simulation function(s) as string.
modelsettings$is_mbmodel - indicate of simulation function has mbmodel structure
modelsettings$modeltype - specify what kind of model should be run.
Currently one of: _ode_, _discrete_, _stochastic_, _usanalysis_, _modelexploration_, _fit_.
For more than one model type, place _and_ between them.
modelsettings$plottype - 'Boxplot' or 'Scatterplot' , required for US app
Optinal list elements are:
List elements with names and values for inputs expected by simulation function.
If not provided, defaults of simulator function are used.
modelsettings$plotscale - indicate which axis should be on a log scale (x, y or both).
If not provided or set to '', no log scales are used.
modelsettings$nplots - indicate number of plots that should be produced (number of top list elements in result).
If not provided, a single plot is assumed.
modelsettings$nreps - required for stochastic models to indicate numer of repeat simulations.
If not provided, a single run will be done.
A vectored list named "result" with each main list element containing the simulation results in a dataframe called dat and associated metadata required for generate_plot and generate_text functions. Most often there is only one main list entry (result[]) for a single plot/text.
This function runs a model for specific settings.