Using temporal constraints to restrict search in a planner