View source: R/model.analysis.R
model.analysis | R Documentation |
Solves the system given a specific parameters configuration simulating the behavior of the developed model. Furthermore, by changing the input parameters, it is possible to perform a what-if analysis or forecasting the evolution of the diffusion process.
model.analysis(
solver_fname,
i_time = 0,
f_time,
s_time,
atol = 1e-06,
rtol = 1e-06,
n_config = 1,
n_run = 1,
solver_type = "LSODA",
taueps = 0.01,
parameters_fname = NULL,
functions_fname = NULL,
ini_v = NULL,
ini_vector_mod = FALSE,
volume = getwd(),
timeout = "1d",
parallel_processors = 1,
event_times = NULL,
event_function = NULL,
extend = FALSE,
seed = NULL,
out_fname = NULL,
user_files = NULL,
debug = FALSE,
fba_fname = NULL,
FVA = FALSE
)
solver_fname |
.solver file (generated with the function *model_generation*). |
i_time |
Initial solution time. |
f_time |
Final solution time. |
s_time |
Time step defining the frequency at which explicit estimates for the system values are desired. |
atol |
Absolute error tolerance that determine the error control performed by the LSODA solver. |
rtol |
Relative error tolerance that determine the error control performed by the LSODA solver. |
n_config |
Integer for the number of configurations to generate, to use only if some parameters are generated from a stochastic distribution, which has to be encoded in the functions defined in *functions_fname* or in *parameters_fname*. |
n_run |
Integer for the number of stochastic simulations to run. If n_run is greater than 1 when the deterministic process is analyzed (solver_type is *Deterministic*), then n_run identical simulation are generated. |
solver_type |
Default is LSODA. |
taueps |
The error control parameter from the tau-leaping approach. |
parameters_fname |
a textual file in which the parameters to be studied are listed associated with their range of variability. This file is defined by three mandatory columns (*which must separeted using ;*): (1) a tag representing the parameter type: *i* for the complete initial marking (or condition), *m* for the initial marking of a specific place, *c* for a single constant rate, and *g* for a rate associated with general transitions (Pernice et al. 2019) (the user must define a file name coherently with the one used in the general transitions file); (2) the name of the transition which is varying (this must correspond to name used in the PN draw in GreatSPN editor), if the complete initial marking is considered (i.e., with tag *i*) then by default the name *init* is used; (3) the function used for sampling the value of the variable considered, it could be either a R function or an user-defined function (in this case it has to be implemented into the R script passed through the *functions_fname* input parameter). Let us note that the output of this function must have size equal to the length of the varying parameter, that is 1 when tags *m*, *c* or *g* are used, and the size of the marking (number of places) when *i* is used. The remaining columns represent the input parameters needed by the functions defined in the third column. |
functions_fname |
an R file storing: 1) the user defined functions to generate instances of the parameters summarized in the *parameters_fname* file, and the discrete events which may modify the marking of the net at specific time points (see *event_function*). |
volume |
The folder to mount within the Docker image providing all the necessary files. |
timeout |
Maximum execution time allowed to each configuration. |
parallel_processors |
Integer for the number of available processors to use for parallelizing the simulations. |
event_times |
Vector representing the time points at which the simulation has to stop in order to simulate a discrete event that modifies the marking of the net given a specific rule defined in *functions_fname*. |
event_function |
String reporting the function, implemented in *functions_fname*, to exploit for modifying the total marking at a specific time point. Such function takes in input: 1) a vector representing the marking of the net (called *marking*), and 2) the time point at which the simulation has stopped (called *time*). In particular, *time* takes values from *event_times*. |
extend |
If TRUE the actual configuration is extended including n_config new configurations. |
seed |
.RData file that can be used to initialize the internal random generator. |
out_fname |
Prefix to the output file name. |
user_files |
Vector of user files to copy inside the docker directory |
debug |
If TRUE enables logging activity. |
fba_fname |
vector of .txt files encoding different flux balance analysis problems, which as to be included in the general transitions (*transitions_fname*). |
FVA |
Flag to enable the flux variability analysis It must be the same files vector passed to the function *model_generation* for generating the *solver_fname*. (default is NULL) |
Beccuti Marco, Castagno Paolo, Pernice Simone, Baccega Daniele
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.