The code provided here allows for the stochastic simulation of a nested model of spread of an infectious disease. Two strains of the pathogen can spread: a wild-type sensitive to treatment strain and a mutated resistant one. This code was used to produce results shown in the article Aggressive or moderate drug therapy for infectious diseases? Trade-offs between different treatment goals at the individual and population levels by Jérémie Scire, Nathanaël Hozé, Hildegard Uecker (https://www.biorxiv.org/content/early/2018/04/24/307223).
The class NestedSimulator can be used to simulate an epidemic and record the number of transmissions of each type, as well as the disease burden.
The class WithinHostParameterSensitivityAnalysis can be used to perform simulations of the within-host model and record the recovery rate or the probability of emergence of the resistance using custom parameters.