El miércoles, 9 de abril de 2014 03:40:40 UTC-5, Simon Frost escribió: > > Dear All, > > I'm implementing Gillespie's direct method for stochastic simulation: > > http://en.wikipedia.org/wiki/Gillespie_algorithm > > I'm loosely following the API for the now-orphaned R package GillespieSSA: > > http://www.jstatsoft.org/v25/i12 > > http://artax.karlin.mff.cuni.cz/r-help/library/GillespieSSA/html/ssa.html > > In Julia, the analogous function call is something like the following. > > function > ssa(x0::Vector{Int64},a::Vector{Expr},nu::Matrix{Float64,2},parms::Expr,tf::Float64,ignore_negative_state::Bool,console_interval::Int64,census_interval::Int64,verbose::Bool,max_wall_time::Float64) > > However, as I've never done metaprogramming in Julia before, I was > wondering whether anyone had any input to make the model definition as > clean as possible (i.e. without cluttering the syntax with symbols, while > not polluting the environment)? > > Best > Simon >
Hi Simon, This is a nice idea! I'm very interested. Unfortunately, I don't have the necessary experience either, but there are other packages which could be useful, such as ODE solvers, which have the same issue of how to best define the model. For example: https://github.com/JuliaLang/Sundials.jl Personally, the ssa() function you are proposing seems rather complicated. Perhaps it would be better to have some kind of new type that wraps all the needed parameters in one place? Best David.
