diff --git a/cpp/src/mip_heuristics/solve.cu b/cpp/src/mip_heuristics/solve.cu index 2c2c05a79..d61112812 100644 --- a/cpp/src/mip_heuristics/solve.cu +++ b/cpp/src/mip_heuristics/solve.cu @@ -401,8 +401,6 @@ mip_solution_t solve_mip_helper(optimization_problem_t& op_p // Start early FJ (CPU and GPU) during presolve to find incumbents ASAP // Only run if presolve is enabled (gives FJ time to find solutions) // and we're not in deterministic mode - std::unique_ptr> early_cpufj; - std::unique_ptr> early_gpufj; // Track best incumbent found during presolve (shared across CPU and GPU FJ). // early_best_objective is in the original problem's solver-space (always minimization), @@ -414,6 +412,9 @@ mip_solution_t solve_mip_helper(optimization_problem_t& op_p std::vector early_best_user_assignment; std::mutex early_callback_mutex; + std::unique_ptr> early_cpufj; + std::unique_ptr> early_gpufj; + bool run_early_fj = run_presolve && settings.determinism_mode != CUOPT_MODE_DETERMINISTIC && op_problem.get_n_integers() > 0 && op_problem.get_n_constraints() > 0; f_t no_bound = problem.presolve_data.objective_scaling_factor >= 0 ? (f_t)-1e20 : (f_t)1e20;