Skip to content

fontanf/mathoptsolverscmake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MathOptSolversCMake

This library includes:

  • CMake wrappers for mathematical optimization solvers.
  • A mixed-integer linear programming modeler
  • A box-constrained nonlinear programming modeler (for Lagrangian relaxations)

The goal of the modelers are:

  • Minimize the modeler's overhead
  • Run multiple solvers while writing the model's code once and ensuring that the model passed to each solver is the same
  • Keep access to all the direct API features of the solvers
  • Minimize the quantity of code to integrate a new solver
  • Provide some features to help model debugging

They are not designed to be as user-friendly as possible. And switching solver requires a bit more lines of code than changing a string.

Milp modeler examples:

CMake integration example:

# Fetch fontanf/mathoptsolverscmake.
set(MATHOPTSOLVERSCMAKE_USE_CLP ON)
FetchContent_Declare(
    mathoptsolverscmake
    GIT_REPOSITORY https://github.com/fontanf/mathoptsolverscmake.git
    GIT_TAG ...)
    #SOURCE_DIR "${PROJECT_SOURCE_DIR}/../mathoptsolverscmake/")
FetchContent_MakeAvailable(mathoptsolverscmake)

...

target_link_libraries(MyProject_my_target PUBLIC
    MathOptSolversCMake::clp)

About

CMake wrappers for mathematical optimization solvers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •