Chapter 7. Formulating Individual-based Models