Skip to content

Add SMS++ as a Lagrangian relaxation solver - #12

Merged
fontanf merged 1 commit into
masterfrom
add-smspp-solver
Sep 3, 2026
Merged

fontanf merged 1 commit into
masterfrom
add-smspp-solver

Conversation

@fontanf

@fontanf fontanf commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a GENERALIZEDASSIGNMENTSOLVER_USE_SMSPP build option
  • Wires SMS++ into both Lagrangian relaxation algorithms (assignment and knapsack relaxations) as an alternative solver for the multiplier update subproblem, alongside dlib and ConicBundle
  • Bumps mathoptsolverscmake and enables SMS++ in CI

Test plan

  • CI build passes with -DGENERALIZEDASSIGNMENTSOLVER_USE_SMSPP=ON
  • lagrangian-relaxation-assignment --solver smspp and lagrangian-relaxation-knapsack --solver smspp produce correct bounds on sample instances

@fontanf
fontanf force-pushed the add-smspp-solver branch 2 times, most recently from 6ee5bf5 to 9b77d5b Compare September 2, 2026 17:28
Adds a GENERALIZEDASSIGNMENTSOLVER_USE_SMSPP build option and wires SMS++
into both Lagrangian relaxation algorithms (assignment and knapsack
relaxations) as an alternative solver for the multiplier update
subproblem, alongside dlib and ConicBundle. Bumps mathoptsolverscmake
and enables SMS++ in CI.

Getting this working on all three CI platforms required several
supporting fixes, most of them for issues that only surfaced on
Windows:

- macOS: SMS++'s vendored CMakeLists.txt calls a plain find_package(Boost)
  and links against Boost::boost. Our FetchContent'd Boost only defines
  per-component targets, and Boost::headers is just an (essentially
  empty) meta package rather than an aggregate of every component's
  headers, so Boost::boost is now defined linked against every fetched
  library instead, letting SMS++ find whichever Boost headers it needs
  (including several header-only libraries -- algorithm, any, bimap,
  function, functional, multi_array, preprocessor -- added to
  BOOST_INCLUDE_LIBRARIES since SMS++ #includes them directly).
- Ubuntu/macOS: install Eigen3 and netCDF-cxx (libeigen3-dev/
  libnetcdf-c++4-dev on Ubuntu, eigen/netcdf-cxx via brew on macOS),
  which SMS++'s CMakeLists.txt requires unconditionally but which
  aren't present by default on CI runners.
- Ubuntu: run `apt-get update` before `apt-get install`, since the
  runner image's cached package list pointed at a bzip2/libbz2-dev
  version that had since been pruned from the security mirror.
- Windows: install netCDF-cxx4 and BZip2 via vcpkg (using the
  x64-windows-static triplet, to match this project's static CRT),
  wired in via CMAKE_PREFIX_PATH rather than the full vcpkg toolchain
  file, which globally wraps add_library()/find_package() and breaks
  unrelated FetchContent'd dependencies.
- Bumps mathoptsolverscmake to fontanf/mathoptsolverscmake#11, which
  fixes several Windows-only issues in the SMS++/BundleSolver
  integration: a vendored FindCoinUtils.cmake's unconditional BZip2
  requirement, Eigen3 not being installed by default, a broken
  GETOPT_LIBRARY-NOTFOUND link, vendored netCDF(Cxx) find modules that
  only work with the full vcpkg toolchain file, and CMake's own
  FindZLIB.cmake not recognizing vcpkg's static-triplet library name
  ("zs.lib").

Verified with full local builds and passing CI on all three platforms
(Ubuntu, macOS, Windows).
@fontanf
fontanf merged commit f62d88c into master Sep 3, 2026
3 checks passed
@fontanf
fontanf deleted the add-smspp-solver branch September 3, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant