Figure 8:
Model algorithm.