Figure 2: The flowchart of function model algorithm using MGA.