Fn defines the function that Nelder Mead is going to call to determine if it is moving closer to convergence. In all likelihood, the execution of this function is going to be the bottleneck. The second value returns a bool indicating if the calculated values are "good", that is, that no constraint has been hit.