Simulate the model ensemble

simulateEnsemble(ensemble, finalTime, enzymesIC, metsIC, metsAbsOrRel, interruptTime, numModels, numCores)

Takes in a model ensemble and initial conditions for enzyme and metabolite concentrations and simulates all models in the ensemble.

For metabolites, the initial conditions can be given either in terms of relative or absolute concentrations (mol/L) by setting metsAbsOrRel to ‘rel’ or ‘abs’, respectively.

Metabolite concentrations are always returned as relative values while reaction fluxes are always returned as absolute values.

If the simulation of a given model takes longer than the specified interrupTime, then it is interrupted and no simulation results are saved for that model.

Note that for each model a different set of time points and respective concentrations/fluxes will be returned, since the solver’s step size is adaptive, i.e., not constant.

USAGE:

simulationRes = simulateEnsemble(ensemble, finalTime, enzymesIC, metsIC, interruptTime)

INPUT:

ensemble (struct): model ensemble, see buildEnsemble for fields description finalTime (double): simulation time enzymesIC (double vector): initial conditions for enzyme concentrations metsIC (double vector): initial conditions for metabolite concentrations metsAbsOrRel (char): specify whether metabolite initial conditions are relative or absolute concentrations. Accepted values for this variable are ‘abs’ and ‘rel’ interruptTime (double) maximum time for each simulation, given in seconds numModels (int): how many models should be simulated. This number should be lower than the number of models in the ensemble.

OPTIONAL INPUT:

numCores (int): number of cores to be used to run the code, default is 1.

OUTPUT:

simulationRes (struct): simulation results

  • t (cell) : time points in each model simulation

  • conc (cell) : relative concentrations for each time point and model simulation

  • flux (cell) : absolute fluxes for each time point and model simulation