## 2 Methods, Model, and Analysis Tools
### Implementing Heterogeneity in Malaria Spreading  
Our model extends a previous agent-based malaria model introduced in [24], now incorporating heterogeneous affinity. We consider a system of \(N_{m}=4000\) mosquitoes and \(N_{h}=2000\) human individuals, both including healthy and infected individuals, henceforth represented as \(M_{0}\) and \(H_{0}\) and as \(M_{i}\) and \(H_{i}\), respectively (\(N_{m}=M_{0}+M_{i}\) and \(N_{h}=H_{0}+H_{i}\)). Although the density of mosquitoes in the field may be higher than the one considered here, we model the number of mosquitoes as a smaller effective fraction of the overall mosquito mass that randomly bites a human individual, on average, twice a day, with a uniform distribution, and ranging from no bites to four daily bites. The algorithm keeps track of all attributes for each agent, human or mosquito, for a particular age, time since infection, and immunity status. All simulations take place during a time period of 30 years. More details and a flowchart describing the computer implementation of the agent-based model are given in [24]. Heterogeneous affinity is here defined by the PW-rule parameter:  
\[\theta=\frac{P_{h}}{P_{b}}, \tag{1}\]  
giving the quotient between the percentage \(P_{h}\) of the group with the most bitten humans and the percentage \(P_{b}\) of the bites that the group will receive. Next, we describe the relation between the basic reproduction number of the Ross-Macdonald model [25; 26] and the heterogeneity affinity rule  
Figure 1: Human and mosquito infection prevalence (**a**) in a scenario of homogeneous affinity, namely 20% of the human individuals receive 20% of mosquitoes bites, and (**b**) in a heterogeneous scenario when 20% of the human individuals receive 80% of mosquitoes bites. In both cases, intermediate human-to-mosquito transmission efficiency is considered, \(w_{h}=0.500\). introduced above. The basic reproductive number \(R_{0}\) represents the number of secondarily infected humans that result from a single infectious human, and it is defined as:  
\[R_{0}=\frac{ma^{2}bc}{q_{h}q_{m}}(1+\alpha)=\bar{R}_{0}(1+\alpha), \tag{2}\]  
where \(m\) is the mosquito density, \(a\) is the human feeding rate, \(b\) and \(c\) represent respectively the mosquito-to-human (M-to-H) and human-to-mosquito (H-to-M) transmission efficiencies, and \(q_{h}\) and \(q_{m}\) are, respectively, the human daily recovery rate and the mosquito daily mortality rate. Parameter \(\alpha\geq 0\) was used in previous studies accounting for the effects of heterogeneous affinity [3; 5; 8; 16; 20; 27; 28; 29] and corresponds to the so-called index of biting disparity, which has been included by assuming that the previous basic reproductive number corresponds to the homogeneous basic reproductive number \(\bar{R}_{0}\). From empirical studies [8; 16; 19; 20], parameter \(\alpha\) is known to assume values in the range \(0<\alpha<\alpha_{max}\lesssim 4\). Next, we introduce an explicit definition for \(\alpha\), to map it from parameter \(\theta\):  
\[\alpha=\alpha_{max}\left(1-\exp\left(-\frac{(\log\theta)^{2}}{2\sigma^{2}} \right)\right)\;, \tag{3}\]  
where \(\sigma=|\log\left(20/80\right)|\) to settle the PW-rule of \(20/80\) as the heterogeneous affinity deviating from the homogeneous state by one standard deviation, and \(\alpha_{\max}=4\). A sketch of \(\alpha\) as defined in Equation (3) as a function of \(\theta\), while Equation (1), is shown in the inset of Figure 2.  
In the present paper, the authors intend to define a specific metric for heterogeneity quantification in the form of its possible impact on local disease transmission, equivalent to the effect of a small migrating gametocyte-carrier population in the increase of disease resurgence risk. The utility of preventive treatment with ivermectin in the context of high heterogeneity in disease transmission while in the presence of different levels of background gametocytemia in the human population is also analyzed in terms of effective disease prevention.