QuOVPro
Model was written in NetLogo 5.0.4
•
Viewed 278 times
•
Downloaded 32 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Info tab cannot be displayed because of an encoding error
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals[ initial-susceptible initial-fear initial-vaccinator transmission fear_infect-chance vaccine-duration recovery-rate imitation_rate risk_vaccination risk_infection strategies payoff_NV payoff_V omega kappa sampling_rate x max_infected cur_infected time fear_counter vaccinator_counter population feared_%_population vaccinator_%_population precautions_%_population difference_vac_precautions ] breed[susceptibles susceptible] breed[infecteds infected] breed[recovereds recovered] breed[fears fear] breed[vaccinates vaccinate] turtles-own [ health-state mind-set own_strategy susceptible? infected? recovered? fear? vaccinate? infection-length vaccination-period number_of_infected previous_infected number_of_recovered ] patches-own[ turtle? ] ;;allocate initial Susceptible individual to allocateSusceptibles set color blue set size 1.2 set shape "person" set heading random 360 setxy int random-xcor int random-ycor set health-state random-float 1 set mind-set random-float 1 end ;;allocate initial Infected individual to allocateInfected set color red set size 1.2 set shape "person" set heading random 360 setxy int random-xcor int random-ycor end ;;allocate initial Feared individual to allocateFear ;set color yellow set size 1.2 set shape "person" set heading random 360 setxy int random-xcor int random-ycor end ;;allocate initial vaccinator to allocateVaccinator set color violet set size 1.2 set shape "person" set heading random 360 setxy int random-xcor int random-ycor end ;;let agents to move to move ask turtles [ right random 45 left random 45 forward 1 ] end ;;to assign health state and mindset to turtles to assign_status ask turtles [ set health-state random-float 1 set mind-set random-float 1 ] end ;;disease is spreading and human get infect to infect ask turtles with [infected?] [ let nearby-uninfected (turtles-on neighbors) with [not infected? and not recovered? and not fear? and not vaccinate?] if nearby-uninfected != nobody [ ask nearby-uninfected [ if health-state < transmission [ set infection-length 0 set number_of_infected (number_of_infected + 1) set infected? true set fear? false set vaccinate? false set susceptible? false set recovered? false set breed infecteds set shape "person" set color red set heading random 360 ] ] ] ] end ;;to create fear in the population to fear_influence ask turtles with [fear?] [ let nearby-not-fear (turtles-on neighbors) with [not infected? and not recovered? and not fear? and not vaccinate?] if nearby-not-fear != nobody [ ask nearby-not-fear [ if mind-set < fear-factor [ set susceptible? false set infected? false set fear? true set vaccinate? false set recovered? false set breed fears set shape "person" set size 1.2 set color yellow set heading random 360 set fear_counter fear_counter + 1 ] ] ] ] end ;;to make decision to vaccinate or not to decision_vaccinate ask turtles with [fear?] [ let nearby-vaccinated (turtles-on neighbors) with [not infected? and not recovered? and not susceptible? and not fear? and vaccinate?] if nearby-vaccinated != nobody [ if payoff_V > payoff_NV [ if mind-set < imitation_rate [ set vaccination-period 0 set susceptible? false set infected? false set fear? false set vaccinate? true set recovered? false set breed vaccinates set shape "person" set size 1.2 set color violet set own_strategy "Vaccinate" set heading random 360 set vaccinator_counter vaccinator_counter + 1 ] ] ;] ] ] end ;;disease spread among feared individual with lower probability to fear_infect ask turtles with [infected?] [ let nearby-fear-not-infected (turtles-on neighbors) with [not infected? and not recovered? and not susceptible? and fear? and not vaccinate?] if nearby-fear-not-infected != nobody [ ask nearby-fear-not-infected [ if health-state < fear_infect-chance [ set infection-length 0 set number_of_infected (number_of_infected + 1) set susceptible? false set infected? true set fear? false set vaccinate? false set recovered? false set breed infecteds set shape "person" set size 1.2 set color red set heading random 360 ] ] ] ] end ;;vaccination period over to vac-sus ask turtles with [vaccinate?] [ set vaccination-period (vaccination-period + 1) if vaccination-period > vaccine-duration [ set susceptible? true set infected? false set fear? false set vaccinate? false set recovered? false set breed susceptibles set shape "person" set size 1.2 set color blue ] ] end ;;to check whether individuals have recovered from infections to recover ask turtles with [infected?][ set infection-length infection-length + 1 if infection-length > 1 / recovery-rate [ set number_of_recovered (number_of_recovered + 1) set recovered? true set breed recovereds set heading random 360 set shape "person" set color green ] ] end ;;show the label of strategies that the turtles carry: violet=vaccinate; yellow= not vaccinate to show_label ask turtles [ if color = violet [ set label "V"] if color = yellow [ set label "NV"] ] end ;;assign the strategy for turtles to assign_strategy ask turtles [ if color = violet and vaccinate? = true [ set own_strategy "Vaccinate" set payoff_V (-1 * (risk_vaccination)) ] if color = yellow and fear? = true [ set own_strategy "Not_vaccinate" set payoff_NV (-1 * (risk_infection) * (1000) * count Infecteds) ] ] end to turtleown ask patches [ ifelse any? other turtles-here [ set turtle? 1 ] [ set turtle? 0 ] ] end ;;plot graph to doPlot set-current-plot "Population vs Time" set-current-plot-pen "Infected" plot (count infecteds * 500) end to find_% set population ((count susceptibles + count infecteds + count recovereds + count vaccinates + count fears) * 500) set feared_%_population (((fear_counter * 500)/ population) * 100) set vaccinator_%_population (((vaccinator_counter * 500) / (fear_counter * 500)) * 100) set precautions_%_population ((1 - ((vaccinator_counter * 500) / (fear_counter * 500))) * 100) set difference_vac_precautions (vaccinator_%_population - precautions_%_population) end to setup_parameters if (location = "Kuching" and disease = "Tuberculosis") [ set initial-susceptible 615665 / 500 set initial-fear 10 set initial-vaccinator 10 set transmission 0.023 set fear_infect-chance 0.023 * 0.7 set vaccine-duration 782 set recovery-rate 1 / 36 set imitation_rate 0.05 set risk_vaccination 0.05 set risk_infection 0.95 create-susceptibles initial-susceptible [ allocateSusceptibles set susceptible? true set infected? false set recovered? false set fear? false set vaccinate? false ] create-infecteds initial-infectious [ allocateInfected set susceptible? false set infected? true set recovered? false set fear? false set vaccinate? false ] create-fears initial-fear [ allocateFear set own_strategy "Not-vaccinate" set color yellow set susceptible? false set infected? false set recovered? false set fear? true set vaccinate? false ] create-vaccinates initial-vaccinator [ allocateVaccinator set own_strategy "Vaccinate" set susceptible? false set infected? false set recovered? false set fear? false set vaccinate? true ] ] if (location = "Limbang" and disease = "Tuberculosis") [ set initial-susceptible 48519 / 500 set initial-fear 10 set initial-vaccinator 10 set transmission 0.06 set fear_infect-chance 0.06 * 0.7 set vaccine-duration 782 set recovery-rate 1 / 36 set imitation_rate 0.01 set risk_vaccination 0.05 set risk_infection 0.95 create-susceptibles initial-susceptible [ allocateSusceptibles set susceptible? true set infected? false set recovered? false set fear? false set vaccinate? false ] create-infecteds initial-infectious [ allocateInfected set susceptible? false set infected? true set recovered? false set fear? false set vaccinate? false ] create-fears initial-fear [ allocateFear set own_strategy "Not-vaccinate" set color yellow set susceptible? false set infected? false set recovered? false set fear? true set vaccinate? false ] create-vaccinates initial-vaccinator [ allocateVaccinator set own_strategy "Vaccinate" set susceptible? false set infected? false set recovered? false set fear? false set vaccinate? true ] ] end to setup __clear-all-and-reset-ticks turtleown set max_infected initial-infectious setup_parameters show_label end to go turtleown show_label assign_strategy if ticks > 0[ move assign_status infect fear_influence fear_infect decision_vaccinate vac-sus recover set cur_infected (count infecteds * 500) if max_infected < cur_infected [ set max_infected cur_infected set time ticks ] ] doPlot tick end to stopping user-message (word "Simulation is terminated") stop end
There is only one version of this model, created about 10 years ago by Shian Li Teoh.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
QuOVPro.png | preview | Preview for 'QuOVPro' | about 10 years ago, by Shian Li Teoh | Download |
This model does not have any ancestors.
This model does not have any descendants.