GranSim, the Agent-based model (ABM) describing tuberculosis (TB) granuloma formation and function in the lung, was developed based on four basic concepts: an environment (section of the lung parenchyma), agents (immune cells), ABM rules that govern the agents and their interactions, and the time-step (Δt) used to update events. The attached documentation illustrates the details of how each of these features have been implemented in the form of a pseudocode. The model was first published in 2004 but has been continually updated to include the latest biological information and technological advances.
10.1016/j.jtbi.2004.06.031