Added duplicate check and removal for models that became duplicates due to constraints. print_best_model now always prints the best model first.