@@ -63,6 +63,10 @@ HighsStatus solveLpIpx(const HighsOptions& options, HighsTimer& timer,
6363 resetModelStatusAndHighsInfo (model_status, highs_info);
6464 // Create the LpSolver instance
6565 ipx::LpSolver lps;
66+ // Use the current HiGHS time as an offset for the lps.control_
67+ // elapsed time
68+ lps.setTimerOffset (timer.read ());
69+
6670 // Set IPX parameters
6771 //
6872 // Cannot set internal IPX parameters directly since they are
@@ -125,8 +129,9 @@ HighsStatus solveLpIpx(const HighsOptions& options, HighsTimer& timer,
125129
126130 parameters.analyse_basis_data =
127131 kHighsAnalysisLevelNlaData & options.highs_analysis_level ;
128- // Determine the run time allowed for IPX
129- parameters.time_limit = options.time_limit - timer.read ();
132+ // Now that the lps.control_ elapsed time includes the HiGHS time,
133+ // can use the HiGHS time limit
134+ parameters.time_limit = options.time_limit ;
130135 parameters.ipm_maxiter =
131136 options.ipm_iteration_limit - highs_info.ipm_iteration_count ;
132137 // Determine if crossover is to be run or not
@@ -458,6 +463,10 @@ HighsStatus solveLpHipo(const HighsOptions& options, HighsTimer& timer,
458463
459464 // Create solver instance
460465 hipo::Solver hipo{};
466+ // This creates ipx::LpSolver ipx_lps_, in case HiPO has to switch
467+ // to IPX, so use the current HiGHS time as an offset for the
468+ // ipx_lps.control_ elapsed time
469+ hipo.setIpxTimerOffset (timer.read ());
461470
462471 hipo::Options hipo_options{};
463472
@@ -504,7 +513,7 @@ HighsStatus solveLpHipo(const HighsOptions& options, HighsTimer& timer,
504513
505514 // Potentially control if ipx is used for refinement and if it is displayed
506515 // hipo_options.refine_with_ipx = true;
507- // hipo_options.display_ipx = true;
516+ hipo_options.display_ipx = true ;
508517
509518 // if option parallel is on, it can be refined by option hipo_parallel_type
510519 if (options.parallel == kHighsOnString ) {
@@ -1591,4 +1600,4 @@ HighsStatus reportHipoCrossoverStatus(const HighsOptions& options,
15911600 }
15921601 return HighsStatus::kError ;
15931602}
1594- #endif
1603+ #endif
0 commit comments