@@ -199,19 +199,23 @@ HighsHessian hessian(const double value) {
199199void testUserScale (Highs& h) {
200200 h.setOptionValue (" user_cost_scale" , 0 );
201201 h.setOptionValue (" user_bound_scale" , 0 );
202- if (dev_run) printf (" \n ---------------\n Without user scaling\n ---------------\n " );
202+ if (dev_run)
203+ printf (" \n ---------------\n Without user scaling\n ---------------\n " );
203204 h.writeModel (" " );
204205 h.run ();
205206 h.writeSolution (" " , 1 );
206207 double unscaled_objective_value = h.getInfo ().objective_function_value ;
207- if (dev_run) printf (" \n ---------------\n With user scaling\n ---------------\n " );
208+ if (dev_run)
209+ printf (" \n ---------------\n With user scaling\n ---------------\n " );
208210 HighsInt suggested_objective_scale;
209211 HighsInt suggested_bound_scale;
210212 h.getObjectiveBoundScaling (suggested_objective_scale, suggested_bound_scale);
211- if (dev_run) printf (
212- " Highs::getObjectiveBoundScaling suggested cost / bound scale values of "
213- " %d / %d\n " ,
214- int (suggested_objective_scale), int (suggested_bound_scale));
213+ if (dev_run)
214+ printf (
215+ " Highs::getObjectiveBoundScaling suggested cost / bound scale values "
216+ " of "
217+ " %d / %d\n " ,
218+ int (suggested_objective_scale), int (suggested_bound_scale));
215219 const bool has_suggested_scaling =
216220 suggested_objective_scale || suggested_bound_scale;
217221 if (!has_suggested_scaling) {
@@ -296,31 +300,38 @@ TEST_CASE("ill-scaled-model", "[highs_user_scale]") {
296300 const double small_hessian = 1e-4 ;
297301 const double small_col_lower = 1e-8 ;
298302 if (lp_test) {
299- if (dev_run) printf (" \n ================\n ill-scaled-model: LP test\n ================\n " );
303+ if (dev_run)
304+ printf (
305+ " \n ================\n ill-scaled-model: LP test\n ================\n " );
300306 testLp (h, ok_cost, ok_col_lower, ok_bound);
301307 if (small_cost_test) {
302- if (dev_run) printf (
303- " \n ================\n ill-scaled-model: LP test - small costs and "
304- " column LB\n ================\n " );
308+ if (dev_run)
309+ printf (
310+ " \n ================\n ill-scaled-model: LP test - small costs and "
311+ " column LB\n ================\n " );
305312 testLp (h, small_cost, small_col_lower, ok_bound);
306313 }
307314 }
308315
309316 if (mip_test) {
310- if (dev_run) printf (
311- " \n ================\n ill-scaled-model: MIP test\n ================\n " );
317+ if (dev_run)
318+ printf (
319+ " \n ================\n ill-scaled-model: MIP test\n ================\n " );
312320 testMip (h, ok_cost, ok_col_lower, ok_bound);
313-
321+
314322 if (small_cost_test) {
315- if (dev_run) printf (
316- " \n ================\n ill-scaled-model: MIP test - small costs and "
317- " column LB\n ================\n " );
323+ if (dev_run)
324+ printf (
325+ " \n ================\n ill-scaled-model: MIP test - small costs and "
326+ " column LB\n ================\n " );
318327 testMip (h, small_cost, small_col_lower, ok_bound);
319328 }
320329 }
321330
322331 if (qp_test) {
323- if (dev_run) printf (" \n ================\n ill-scaled-model: QP test\n ================\n " );
332+ if (dev_run)
333+ printf (
334+ " \n ================\n ill-scaled-model: QP test\n ================\n " );
324335 testQp (h, ok_cost, ok_hessian, ok_col_lower, ok_bound);
325336 // QP solver can't handle small costs and Hessian
326337 }
0 commit comments