Repository navigation
[FEATURE] Add HiGHS LP solver as alternative to COIN-OR and GLPK - #9246
Conversation
Integrate HiGHS as a third LP solver option via CMake's FetchContent. The LP_SOLVER CMake cache variable allows choosing: AUTO, COIN, GLPK, or HIGHS. AUTO tries COIN-OR first, then GLPK, then HiGHS (fetched if not found). Agent-Logs-Url: https://github.com/OpenMS/OpenMS/sessions/ebacca47-3574-40b7-8b84-bba9fe9bc5ac Co-authored-by: jpfeuffer <[email protected]>
|
I think moving to HiGHS as standard solver would be a good way forward. Do you know what the package situation on conda etc. and platforms is? |
|
Basically non-existent. That's why I used fetch content. |
|
We need to check how long it builds and which dependencies it has to see if this is a viable solution. |
|
takes 15 seconds here. looks like no dependencies. |
|
sounds great. if we get a student for vcpkg / build system we might be able to create ports or recipes for it. what do you think? |
It depends on how much time it takes to get everything else into vcpkgs. OpenMS now has a lot of dependencies where we clone Git repos and build them (three new such dependencies were added yesterday). All of those need to be turned into vcpkg ports. Going forward we are going to have to require that anyone adding a dependency first add that dependency to our vcpkg overlay. |
And conda recipes I guess. Let's see how this flies in practice e.g. if we can just generate those. That could really clean things up but at the same time mean that we need to maintain the ports. |
There was a problem hiding this comment.
I like the way this is implemented. I'm currently building this branch to see if there are any issues.
There was a problem hiding this comment.
Everything builds and looks good to me.
Add missing entries for: - HiGHS LP solver as third LP backend alternative (#9246) - Fix: FeatureFinderAlgorithmPicked mz_tolerance parameter swap (#9247, #9250) Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
…9260) The HiGHS LP solver was added in #9246 as a third supported backend (alongside GLPK and COIN-OR), selected via LP_SOLVER=AUTO/COIN/GLPK/HIGHS. AGENTS.md and the developer FAQ were updated in #9253, but the Doxygen class description and constructor docstring in LPWrapper.h still referred only to GLPK and COIN-OR. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
…ference (#9265) The LP_SOLVER option (AUTO/COIN/GLPK/HIGHS) was introduced with HiGHS support (#9246) and the WITH_WNETALIGN option was added with the WNet feature alignment feature (#8992). Both are user-configurable CMake cache variables but were missing from the common-cmake-parameters.doxygen reference table included in all platform install guides. Co-authored-by: GitHub Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Summary
Adds HiGHS (https://github.com/ERGO-Code/HiGHS) as a third LP/MIP solver option in OpenMS alongside COIN-OR and GLPK.
Changes
CMake Configuration (
cmake/cmake_findExternalLibs.cmake)LP_SOLVERcache variable (values:AUTO,COIN,GLPK,HIGHS)AUTO(default) tries COIN-OR first, then GLPK, then HiGHSfind_package, then fetched viaFetchContent(v1.10.0) if not foundConfig Header (
src/openms/include/OpenMS/config.h.in)OPENMS_HAS_HIGHScmake defineLPWrapper Header (
src/openms/include/OpenMS/DATASTRUCTURES/LPWrapper.h)HighsclassSOLVER_HIGHSadded toSOLVERenumstd::unique_ptr<Highs>, solution vector) in protected section#if !defined(OPENMS_HAS_COINOR) && !defined(OPENMS_HAS_HIGHS)LPWrapper Implementation (
src/openms/source/DATASTRUCTURES/LPWrapper.cpp)Full HiGHS implementation for all LPWrapper methods:
readModel, writeProblem viawriteModel)Tests (
src/tests/class_tests/openms/source/LPWrapper_test.cpp)Other
src/tests/class_tests/openms/CMakeLists.txt: Link LPWrapper_test against${LPTARGET}instead of hardcodedCoinOR::CoinORsrc/topp/OpenMSInfo.cpp: Report "HiGHS" as LP solver when selectedHow to Use
Testing
The LPWrapper_test covers the same functionality as the COIN-OR tests: