|
74 | 74 | end |
75 | 75 |
|
76 | 76 | @testset "AgeBasedContactSampling" begin |
| 77 | + BASE_FOLDER = dirname(dirname(pathof(GEMS))) |
77 | 78 | m = hcat([[rand() for i = 1:10] for i = 1:10]...) |
78 | 79 | m = m .* hcat([vec(1 ./ sum(m, dims=2)) for _ =1:10]...) # normalization of each row |
79 | | - abcs_null = AgeBasedContactSampling(0.0, 10, ContactMatrix{Float64}(m, 10), Float64[]) |
80 | | - abcs1 = AgeBasedContactSampling(1.0, 10, ContactMatrix{Float64}(m, 10), Float64[]) |
81 | | - abcs2 = AgeBasedContactSampling(2.0, 10, ContactMatrix{Float64}(m, 10), Float64[]) |
82 | | - abcs3 = AgeBasedContactSampling(3.0, 10, ContactMatrix{Float64}(m, 10), Float64[]) |
83 | | - abcs100 = AgeBasedContactSampling(100.0, 10, ContactMatrix{Float64}(m, 10), Float64[]) |
| 80 | + abcs_null = AgeBasedContactSampling(0.0, 10, ContactMatrix{Float64}(m, 10, 100), Float64[]) |
| 81 | + abcs1 = AgeBasedContactSampling(1.0, 10, ContactMatrix{Float64}(m, 10, 100), Float64[]) |
| 82 | + abcs2 = AgeBasedContactSampling(2.0, 10, ContactMatrix{Float64}(m, 10, 100), Float64[]) |
| 83 | + abcs3 = AgeBasedContactSampling(3.0, 10, ContactMatrix{Float64}(m, 10, 100), Float64[]) |
| 84 | + abcs100 = AgeBasedContactSampling(contactparameter=100.0, interval=5, contact_matrix_file=BASE_FOLDER * "/test/testdata/contact_matrix.txt") |
84 | 85 |
|
85 | 86 | # initial infectant |
86 | 87 | i = Individual(id = 1, age = floor(Int, rand(Uniform(1, 100))), sex = floor(Int, rand(Uniform(0, 2))), household=1) |
|
0 commit comments