Text this: Balancing optimality and efficiency in solving flexible process planning