diff --git a/core/MarkovProcesses.jl b/core/MarkovProcesses.jl index f34499975a778fbf38636c71f6455039d82037b1..623d1fd2b91945b1b7e6abe96672574ffea09b68 100644 --- a/core/MarkovProcesses.jl +++ b/core/MarkovProcesses.jl @@ -41,14 +41,14 @@ export load_model, load_automaton, load_plots export automaton_abc, abc_smc # About biochemical networks -export @biochemical_network +export @network_model include("common.jl") include("trajectory.jl") include("lha.jl") include("model.jl") include("utils.jl") -include("biochemical_network.jl") +include("network_model.jl") include("../algorithms/abc_smc.jl") end diff --git a/core/model.jl b/core/model.jl index be93b4d51f91555d1d5509d8fbad5b34dc223494..edae92b912e4d6636decfdbb8878b17c5c7f90ee 100644 --- a/core/model.jl +++ b/core/model.jl @@ -378,6 +378,10 @@ function Base.show(io::IO, m::ContinuousTimeModel) for i in eachindex(m.g) print(io, "* $(m.g[i]) (idx = $i in observed state space)\n") end + print(io, "p = $(m.p)\n") + print(io, "x0 = $(m.x0) (in full state space)\n") + print(io, "t0 = $(m.t0)\n") + print(io, "time bound = $(m.time_bound)") end isbounded(m::Model) = get_proba_model(m).time_bound < Inf diff --git a/core/biochemical_network.jl b/core/network_model.jl similarity index 99% rename from core/biochemical_network.jl rename to core/network_model.jl index 3ae5b5f32cbef35f877b7d1f0c017abe71e04d87..2c578efdc5b23f0e886fa008ae6b58a5cefda8aa 100644 --- a/core/biochemical_network.jl +++ b/core/network_model.jl @@ -35,7 +35,7 @@ function get_str_propensity(propensity::Symbol, dict_species::Dict, dict_params: return str_propensity end -macro biochemical_network(expr_network,expr_name...) +macro network_model(expr_network,expr_name...) model_name = isempty(expr_name) ? "Unnamed macro generated" : expr_name[1] transitions = String[] dict_species = Dict{String,Int}() diff --git a/tests/run_unit.jl b/tests/run_unit.jl index f12a93078d9ad28bbcdf356c9d4bff4a55ae69b0..c37422ce48f2819854945d866eec1cb516410d5f 100644 --- a/tests/run_unit.jl +++ b/tests/run_unit.jl @@ -26,7 +26,7 @@ using Test @test include("unit/load_module.jl") @test include("unit/long_sim_er.jl") - @test include("unit/macro_biochemical_network.jl") + @test include("unit/macro_network_model.jl") @test include("unit/model_prior.jl") @test include("unit/models_exps_er_1d.jl") @test include("unit/observe_all.jl") diff --git a/tests/unit/macro_biochemical_network.jl b/tests/unit/macro_network_model.jl similarity index 73% rename from tests/unit/macro_biochemical_network.jl rename to tests/unit/macro_network_model.jl index 13295975103277cbb929fe7322bd0167ccaf6d55..9644a0e70a36702c724990f030bfbfcefde3b33c 100644 --- a/tests/unit/macro_biochemical_network.jl +++ b/tests/unit/macro_network_model.jl @@ -1,21 +1,21 @@ using MarkovProcesses -model_SIR = @biochemical_network begin +model_SIR = @network_model begin R1: (S+I => 2I, ki*S*I) R2: (I => R, kr*I) end "SIR" set_x0!(model_SIR, [95,5,0]) set_param!(model_SIR, [0.012, 0.05]) -model_unnamed_SIR = @biochemical_network begin +model_unnamed_SIR = @network_model begin R1: (S+I => 2I, ki*S*I) R2: (I => R, kr*I) end set_x0!(model_unnamed_SIR, [95,5,0]) set_param!(model_unnamed_SIR, [0.012, 0.05]) -model_ER = @biochemical_network begin +model_ER = @network_model begin R1: (E+S => ES, k1*E*S) R2: (ES => E+S, k2*ES) R3: (ES => E+P, k3*ES) @@ -26,17 +26,17 @@ set_param!(model_ER, [1.0,1.0,1.0]) return true #= -@biochemical_network "test1" begin +@network_model "test1" begin R1: (S+I => 2I+Z, ki*S*I) R2: (I => R, kr*I) end -@biochemical_network "test2" begin +@network_model "test2" begin R1: (S+I => 2I, ki*S*I) R2: (I => R, kr*I) end -@biochemical_network "test3" begin +@network_model "test3" begin R1: (S+I => I, ki) R2: (2I => R, kr*I*c) end