Closed skycolt closed 4 years ago
Currently it is not possible to change parameters during a simulation. You can change parameters by "redefining" a reaction:
model <= Reaction("name_of_reaction", new_parameter, "formula")
Thank you for this! And is there a way to check the value of the parameters in the model?
Wenzhe
BTW. Is there a function that I can read the simulation result into variables for future analysis?
Thanks
The Network
type has this information. For example,
model.reaction_list[:birth].rate
This retrieves the parameter for a reaction channel called "birth".
You can extract the results in two ways:
result = simulate(...)
id2index = result.id2index simulation_data = result.simulation_data ntrials = length(simulation_data)
protein = [simulation_data[n][k][id2index[:protein]] for n in 1:ntrials, k in 1:length(simulation_data[n])]
using DataFrames
DataFrame(result)
Here `simulation_data` stores the trajectory for each realization of the process, so that `simulation_data[n]` is the `n`-th sample path. The index `k` steps through each *recorded* event. The [DataFrames](https://juliadata.github.io/DataFrames.jl/stable/) approach is more straightforward, and will let you save results if you read their documentation.
Thank you very much!
Hello,
I am trying to change parameters in the model but can't even find the place they are stored, neither can I find a function for that. Could you help me with this?
Thanks Wenzhe