add ObjectiveFunction template and NumericInstanceMap