check_trajectory_consistency.jl 995 Bytes
Newer Older
1
2

using MarkovProcesses
3

4
5
6
7
8
9
load_model("SIR")
load_model("ER")

test_all = true
nb_sim = 1000

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
for i = 1:nb_sim
    σ = simulate(SIR)
    σ2 = simulate(ER)
    try
        global test_all = test_all && MarkovProcesses.check_consistency(σ) && MarkovProcesses.check_consistency(σ2)
    catch err
        @show err
        @show length(σ.values), length(σ.times), length(σ.transitions)
        println()
        @show σ.values
        @show σ.times
        @show σ.transitions 
        throw(err)
    end
end
SIR.time_bound = 100.0
ER.time_bound = 10.0
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
for i = 1:nb_sim
    σ = simulate(SIR)
    σ2 = simulate(ER)
    try
        global test_all = test_all && MarkovProcesses.check_consistency(σ) && MarkovProcesses.check_consistency(σ2)
    catch err
        @show err
        @show length(σ.values), length(σ.times), length(σ.transitions)
        println()
        @show σ.values
        @show σ.times
        @show σ.transitions 
        throw(err)
    end
end

return test_all