|
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 | +``` |
0 commit comments