Skip to content
Snippets Groups Projects
Commit 5145aad6 authored by Peter Jentsch's avatar Peter Jentsch
Browse files

remove rho functionality

parent 0ec91ef8
No related branches found
No related tags found
No related merge requests found
......@@ -138,21 +138,16 @@ end
Base.@propagate_inbounds @views function update_vaccination_opinion_state!(t,modelsol,total_infections)
@unpack π_base, η,γ, κ, ω, ρ_y,ρ_m,ρ_o, ω_en,ρ_en,γ,β = modelsol.params
@unpack π_base_y,π_base_m,π_base_o, η,γ, κ, ω, ρ_y,ρ_m,ρ_o, ω_en,ρ_en,γ,β = modelsol.params
@unpack demographics,time_of_last_alert, nodes, soc_network,u_vac,u_next_vac,app_user,app_user_list = modelsol
app_user_pointer = 0
for i in 1:nodes
π_base = @SVector [π_base_y,π_base_m,π_base_o]
ρ = @SVector [ρ_y,ρ_m,ρ_o]
vac_payoff = 0
soc_nbrs_count = @MArray [0,0,0]
num_soc_nbrs = 0
for sc_g in soc_network.graph_list[t]
soc_nbrs = neighbors(sc_g.g,i)
num_soc_nbrs += length(soc_nbrs)
for nbr in soc_nbrs
soc_nbrs_count[Int(demographics[nbr])] += 1
end
end
ρ = @SVector [ρ_y,ρ_m,ρ_o]
random_soc_network = sample(Random.default_rng(Threads.threadid()), soc_network.graph_list[t])
# display(random_soc_network)
......@@ -160,9 +155,9 @@ Base.@propagate_inbounds @views function update_vaccination_opinion_state!(t,mod
random_neighbour = sample(Random.default_rng(Threads.threadid()), neighbors(random_soc_network.g,i))
if u_vac[random_neighbour] == u_vac[i]
vac_payoff += π_base + dot(ρ,soc_nbrs_count) + total_infections*ω
vac_payoff += π_base[Int(demographics[i])] total_infections*ω
if app_user[i] && time_of_last_alert[app_user_list[i]]>=0
vac_payoff += γ^(-1*(t - time_of_last_alert[app_user_list[i]]))* (η + dot(ρ_en,soc_nbrs_count) + total_infections*ω_en)
vac_payoff += γ^(-1*(t - time_of_last_alert[app_user_list[i]]))* (η + total_infections*ω_en)
end
if u_vac[i]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment