construct a membership function to optimize