@@ -284,43 +284,9 @@ void compute_big_m_skip_rows(
284284}
285285
286286template <typename i_t , typename f_t >
287- void scale_objective (cuopt::linear_programming::optimization_problem_t <i_t , f_t >& op_problem)
287+ void scale_objective (cuopt::linear_programming::optimization_problem_t <i_t , f_t >& /* op_problem*/ )
288288{
289- auto & objective_coefficients = op_problem.get_objective_coefficients ();
290- const f_t min_abs_objective_coefficient =
291- thrust::transform_reduce (op_problem.get_handle_ptr ()->get_thrust_policy (),
292- objective_coefficients.begin (),
293- objective_coefficients.end (),
294- nonzero_abs_or_inf_transform_t <f_t >{},
295- std::numeric_limits<f_t >::infinity (),
296- min_op_t <f_t >{});
297-
298- if (!std::isfinite (min_abs_objective_coefficient) || min_abs_objective_coefficient <= f_t (0 ) ||
299- min_abs_objective_coefficient >= static_cast <f_t >(min_abs_objective_coefficient_threshold)) {
300- return ;
301- }
302-
303- f_t obj_scaling_coefficient =
304- static_cast <f_t >(min_abs_objective_coefficient_threshold) / min_abs_objective_coefficient;
305- if (!std::isfinite (obj_scaling_coefficient) || obj_scaling_coefficient <= f_t (1 )) { return ; }
306- if (obj_scaling_coefficient > static_cast <f_t >(max_obj_scaling_coefficient)) {
307- obj_scaling_coefficient = static_cast <f_t >(max_obj_scaling_coefficient);
308- }
309-
310- thrust::transform (op_problem.get_handle_ptr ()->get_thrust_policy (),
311- objective_coefficients.begin (),
312- objective_coefficients.end (),
313- objective_coefficients.begin (),
314- [obj_scaling_coefficient] __device__ (f_t objective_coefficient) -> f_t {
315- return objective_coefficient * obj_scaling_coefficient;
316- });
317- op_problem.set_objective_scaling_factor (op_problem.get_objective_scaling_factor () /
318- obj_scaling_coefficient);
319- op_problem.set_objective_offset (op_problem.get_objective_offset () * obj_scaling_coefficient);
320-
321- CUOPT_LOG_INFO (" MIP objective scaling applied: min_abs_coeff=%g scale=%g" ,
322- static_cast <double >(min_abs_objective_coefficient),
323- static_cast <double >(obj_scaling_coefficient));
289+ return ;
324290}
325291
326292template <typename i_t , typename f_t >
0 commit comments