Skip to content

Commit 43faaef

Browse files
format
1 parent 7891eea commit 43faaef

File tree

2 files changed

+42
-43
lines changed

2 files changed

+42
-43
lines changed

docs/src/examples/Carcione2020.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
# Sensitivity Analysis of the Carcione2020 Epidemic Model
2-
3-
```@example carcione
4-
cd(@__DIR__)
5-
using SBMLToolkit, ModelingToolkit, EasyModelAnalysis, UnPack
6-
7-
xmlfile = "../assets/Carcione2020.xml"
8-
9-
SBMLToolkit.checksupport_file(xmlfile)
10-
mdl = readSBML(xmlfile, doc -> begin
11-
set_level_and_version(3, 2)(doc)
12-
convert_simplify_math(doc)
13-
end)
14-
15-
rs = ReactionSystem(mdl) # If you want to create a reaction system
16-
odesys = convert(ODESystem, rs) # Alternatively: ODESystem(mdl)
17-
```
18-
19-
```@example carcione
20-
sys = structural_simplify(odesys)
21-
```
22-
23-
```@example carcione
24-
@unpack Infected, Exposed, Deceased, Recovered, Total_population, Susceptible = sys
25-
@unpack alpha, epsilon, gamma, mu, beta, City = sys
26-
tspan = (0., 1.)
27-
prob = ODEProblem(odesys, [], tspan, [])
28-
sol = solve(prob, Rodas5())
29-
plot(sol, idxs = Deceased)
30-
```
31-
32-
```@example carcione
33-
pbounds = [
34-
alpha => [0.003, 0.006],
35-
epsilon => [1/6, 1/2],
36-
gamma => [0.1, 0.2],
37-
mu => [0.01, 0.02],
38-
beta => [0.7, 0.9]
39-
]
40-
create_sensitivity_plot(prob, 100.0, Deceased, pbounds; samples = 2000)
41-
```
1+
# Sensitivity Analysis of the Carcione2020 Epidemic Model
2+
3+
```@example carcione
4+
cd(@__DIR__)
5+
using SBMLToolkit, ModelingToolkit, EasyModelAnalysis, UnPack
6+
7+
xmlfile = "../assets/Carcione2020.xml"
8+
9+
SBMLToolkit.checksupport_file(xmlfile)
10+
mdl = readSBML(xmlfile, doc -> begin
11+
set_level_and_version(3, 2)(doc)
12+
convert_simplify_math(doc)
13+
end)
14+
15+
rs = ReactionSystem(mdl) # If you want to create a reaction system
16+
odesys = convert(ODESystem, rs) # Alternatively: ODESystem(mdl)
17+
```
18+
19+
```@example carcione
20+
sys = structural_simplify(odesys)
21+
```
22+
23+
```@example carcione
24+
@unpack Infected, Exposed, Deceased, Recovered, Total_population, Susceptible = sys
25+
@unpack alpha, epsilon, gamma, mu, beta, City = sys
26+
tspan = (0.0, 1.0)
27+
prob = ODEProblem(odesys, [], tspan, [])
28+
sol = solve(prob, Rodas5())
29+
plot(sol, idxs = Deceased)
30+
```
31+
32+
```@example carcione
33+
pbounds = [
34+
alpha => [0.003, 0.006],
35+
epsilon => [1 / 6, 1 / 2],
36+
gamma => [0.1, 0.2],
37+
mu => [0.01, 0.02],
38+
beta => [0.7, 0.9],
39+
]
40+
create_sensitivity_plot(prob, 100.0, Deceased, pbounds; samples = 2000)
41+
```

docs/src/scenarios/scenario1.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ kappa # fraction vaccinated
150150

151151
system = ODESystem(seirdnat_v)
152152
prob = ODEProblem(system, [10000000-99500, 99500, 1, 0, 0.0], [0, 100],
153-
[0.75, 1/5.7, 1/3.31, 0.012048, 1e-3, 1e-3, 1e-3, 1e-3])
154-
153+
[0.75, 1/5.7, 1/3.31, 0.012048, 1e-3, 1e-3, 1e-3, 1e-3])
155154

156155
### Question 4
157156

0 commit comments

Comments
 (0)