Agent-based models (ABMs) are important tools for predicting infectious disease epidemics and for designing effective interventions. ABMs take into account individual differences, for instance in contact rate. The drawbacks of ABMs are high complexity and low performance. In this paper, we present a data structure - an augmented B-tree - to speed up the weighted random selection of individuals for the next transmission event in an ABM of infectious disease dynamics. An additional feature of the augmented B-tree is that it allows aggregating the force of infection for groups of simulated individuals. In short, our technique enhances the performance and simplifies the development of ABMs.