Skip to content

Commit e48b957

Browse files
authored
Merge pull request #64 from isaacsas/DEBio-fixes
update reaction_network to remove custom types
2 parents 07559d6 + 5031c8f commit e48b957

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/jump_premade_problems.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct JumpProblemNetwork
2222
prob_data # additional problem data, stored as a Dict
2323
end
2424

25-
dna_rs = @reaction_network ptype begin
25+
dna_rs = @reaction_network begin
2626
k1, DNA --> mRNA + DNA
2727
k2, mRNA --> mRNA + P
2828
k3, mRNA --> 0
@@ -42,7 +42,7 @@ prob_data = Dict("num_sims_for_mean" => Nsims, "expected_mean" => expected_avg)
4242
"""
4343
prob_jump_dnarepressor = JumpProblemNetwork(dna_rs, rates, tf, u0, prob, prob_data)
4444

45-
bd_rs = @reaction_network pdtype begin
45+
bd_rs = @reaction_network begin
4646
k1, 0 --> A
4747
k2, A --> 0
4848
end k1 k2
@@ -58,7 +58,7 @@ prob_data = Dict("num_sims_for_mean" => Nsims, "expected_mean_at_t" => expected_
5858
"""
5959
prob_jump_constproduct = JumpProblemNetwork(bd_rs, rates, tf, u0, prob, prob_data)
6060

61-
nonlin_rs = @reaction_network dtype begin
61+
nonlin_rs = @reaction_network begin
6262
k1, 2A --> B
6363
k2, B --> 2A
6464
k3, A + B --> C
@@ -78,7 +78,7 @@ prob_data = Dict("num_sims_for_mean" => Nsims, "expected_mean" => expected_avg)
7878
prob_jump_nonlinrxs = JumpProblemNetwork(nonlin_rs, rates, tf, u0, prob, prob_data)
7979

8080

81-
oscil_rs = @reaction_network rnoscType begin
81+
oscil_rs = @reaction_network begin
8282
0.01, (X,Y,Z) --> 0
8383
hill(X,3.,100.,-4), 0 --> Y
8484
hill(Y,3.,100.,-4), 0 --> Z
@@ -113,7 +113,7 @@ rates_sym_to_idx = Dict(
113113
:R0 => 1, :L0 => 2, :A0 => 3, :kon => 4, :koff => 5,
114114
:kAon => 6, :kAoff => 7, :kAp => 8, :kAdp => 9)
115115
params = [5360, 1160, 5360, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1]
116-
rs = @reaction_network msType begin
116+
rs = @reaction_network begin
117117
kon, S1 + S2 --> S4
118118
kAon, S1 + S3 --> S5
119119
kon, S2 + S5 --> S6
@@ -154,7 +154,7 @@ prob_jump_multistate = JumpProblemNetwork(rs, rates, tf, u0, prob,
154154
# generate the network
155155
N = 10 # number of genes
156156
function construct_genenetwork(N)
157-
genenetwork = "@reaction_network twentgtype begin\n"
157+
genenetwork = "@reaction_network begin\n"
158158
for i in 1:N
159159
genenetwork *= "\t 10.0, G$(2*i-1) --> G$(2*i-1) + M$(2*i-1)\n"
160160
genenetwork *= "\t 10.0, M$(2*i-1) --> M$(2*i-1) + P$(2*i-1)\n"
@@ -187,7 +187,7 @@ prob = DiscreteProblem(u0, (0.0, tf))
187187
prob_jump_twentygenes = JumpProblemNetwork(rs, nothing, tf, u0, prob, nothing)
188188

189189

190-
rn = @reaction_network gnrdtype begin
190+
rn = @reaction_network begin
191191
c1, G --> G + M
192192
c2, M --> M + P
193193
c3, M --> 0
@@ -214,7 +214,7 @@ prob_jump_dnadimer_repressor = JumpProblemNetwork(rn, rnpar, tf, u0, prob,
214214

215215
# diffusion model
216216
function getDiffNetwork(N)
217-
diffnetwork = "@reaction_network dpldifftype begin\n"
217+
diffnetwork = "@reaction_network begin\n"
218218
for i in 1:(N-1)
219219
diffnetwork *= "\t K, X$(i) --> X$(i+1)\n"
220220
diffnetwork *= "\t K, X$(i+1) --> X$(i)\n"

src/sde_premade_problems.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ Stochastic Brusselator
436436
prob_sde_bruss = SDEProblem(bruss_f,bruss_g,[3.,2.],(0.,100.),p,
437437
noise_rate_prototype=zeros(2,4))
438438

439-
network = @reaction_network rnType begin
439+
network = @reaction_network begin
440440
p1, (X,Y,Z) --> 0
441441
hill(X,p2,100.,-4), 0 --> Y
442442
hill(Y,p3,100.,-4), 0 --> Z

0 commit comments

Comments
 (0)