Skip to content

Added timeout to forming initial basis and factorization in IPX - #3185

Merged
jajhall merged 17 commits into
latestfrom
fix-3120
Jul 29, 2026
Merged

Added timeout to forming initial basis and factorization in IPX#3185
jajhall merged 17 commits into
latestfrom
fix-3120

Conversation

@jajhall

@jajhall jajhall commented Jul 28, 2026

Copy link
Copy Markdown
Member

Timeout when forming the initial basis is achievable with control_.InterruptCheck(), and bool interrupt used to communicate interruption down to levels where IPX_ERROR_time_interrupt can be returned or assigned to info->errflag.

Spotted that Int Load(const int* basic_status); is redundant.

Timeout within basiclu_factorize needs an independent clock, time start and time limit.

When IPX takes "forever" there was no logging, so I've added that at the end of each pass through the loop in BasicLu::_Factorize, with an interval of at least 5s. It's interesting to see how BasicLu::_Factorize keeps returning to pick up more memory. There can still be long gaps, but it's not feasible to put HiGHS logging into BasicLu::_Factorize.

As with all time-out code, unit tests are troublesome, but I've developed it with the examples that made me realise that there's no time-out when forming the initial basis and factorization in IPX

@jajhall
jajhall requested a review from filikat July 28, 2026 13:51
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.71233% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.95%. Comparing base (6413d82) to head (2eb3245).
⚠️ Report is 78 commits behind head on latest.

Files with missing lines Patch % Lines
highs/ipm/ipx/basis.cc 63.82% 17 Missing ⚠️
highs/ipm/ipx/basiclu_wrapper.cc 83.05% 10 Missing ⚠️
highs/ipm/ipx/forrest_tomlin.cc 0.00% 6 Missing ⚠️
highs/ipm/basiclu/lu_factorize_bump.c 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3185      +/-   ##
==========================================
- Coverage   73.19%   72.95%   -0.24%     
==========================================
  Files         432      436       +4     
  Lines      105499   105985     +486     
  Branches    16991    17066      +75     
==========================================
+ Hits        77216    77323     +107     
- Misses      28007    28386     +379     
  Partials      276      276              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jajhall jajhall self-assigned this Jul 28, 2026
@jajhall jajhall added Enhancement New feature or request IPX labels Jul 28, 2026
@jajhall

jajhall commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Closes #3120

Comment thread highs/ipm/ipx/lp_solver.cc Outdated
if (info_.status_ipm != IPX_STATUS_not_run)
return;
}
printf("LpSolver::RunIPM before BuildStartingBasis(); timer.Elapsed() = %s\n", time(this->control_.Elapsed()).c_str());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 printf should be removed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks: done!

@filikat

filikat commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Apart from that, it looks good

@jajhall
jajhall merged commit b35c903 into latest Jul 29, 2026
520 of 521 checks passed
@jajhall
jajhall deleted the fix-3120 branch July 29, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request IPX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants