-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
346 additions
and
579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
cmake_minimum_required(VERSION 3.15.0) | ||
|
||
project(StableSolver LANGUAGES CXX) | ||
|
||
option(STABLESOLVER_USE_CBC "Use CPLEX" ON) | ||
option(STABLESOLVER_USE_CPLEX "Use CPLEX" OFF) | ||
|
||
# Require C++11. | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
# Enable output of compile commands during generation. | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
# Set MSVC_RUNTIME_LIBRARY. | ||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
|
||
# Add sub-directories. | ||
add_subdirectory(extern) | ||
add_subdirectory(src) | ||
add_subdirectory(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Enable FetchContent. | ||
include(FetchContent) | ||
|
||
# Fetch boost. | ||
set(BOOST_INCLUDE_LIBRARIES thread filesystem system program_options) | ||
set(BOOST_ENABLE_CMAKE ON) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
Boost | ||
GIT_REPOSITORY https://github.com/boostorg/boost.git | ||
GIT_TAG boost-1.84.0 | ||
GIT_SHALLOW TRUE | ||
) | ||
FetchContent_MakeAvailable(Boost) | ||
|
||
# Fetch fontanf/optimizationtools. | ||
FetchContent_Declare( | ||
optimizationtools | ||
GIT_REPOSITORY https://github.com/fontanf/optimizationtools.git | ||
GIT_TAG 33a3966ece149d390ec7ce08699669b5267e64aa) | ||
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../optimizationtools/") | ||
FetchContent_MakeAvailable(optimizationtools) | ||
|
||
# Fetch fontanf/localsearchsolver. | ||
FetchContent_Declare( | ||
localsearchsolver | ||
GIT_REPOSITORY https://github.com/fontanf/localsearchsolver.git | ||
GIT_TAG ecb15ef667d107f25ea51d056368f9c4e15545e2) | ||
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../localsearchsolver/") | ||
FetchContent_MakeAvailable(localsearchsolver) | ||
|
||
# Fetch fontanf/mathoptsolverscmake. | ||
if(STABLESOLVER_USE_CBC) | ||
set(MATHOPTSOLVERSCMAKE_USE_CBC ON) | ||
endif() | ||
if(STABLESOLVER_USE_CPLEX) | ||
set(MATHOPTSOLVERSCMAKE_USE_CPLEX ON) | ||
endif() | ||
FetchContent_Declare( | ||
mathoptsolverscmake | ||
GIT_REPOSITORY https://github.com/fontanf/mathoptsolverscmake.git | ||
GIT_TAG 56190725f424249a3acd8fce3ff50e08fe675cc6) | ||
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../mathoptsolverscmake/") | ||
FetchContent_MakeAvailable(mathoptsolverscmake) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_subdirectory(clique) | ||
add_subdirectory(stable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
add_library(StableSolver_clique) | ||
target_sources(StableSolver_clique PRIVATE | ||
instance.cpp | ||
solution.cpp | ||
algorithm_formatter.cpp) | ||
target_include_directories(StableSolver_clique PUBLIC | ||
${PROJECT_SOURCE_DIR}/include) | ||
target_link_libraries(StableSolver_clique PUBLIC | ||
OptimizationTools::utils | ||
OptimizationTools::containers | ||
OptimizationTools::graph) | ||
add_library(StableSolver::clique ALIAS StableSolver_clique) | ||
|
||
add_subdirectory(algorithms) | ||
|
||
add_executable(StableSolver_clique_main) | ||
target_sources(StableSolver_clique_main PRIVATE | ||
main.cpp) | ||
target_link_libraries(StableSolver_clique_main PUBLIC | ||
StableSolver_clique_greedy | ||
StableSolver_clique_local_search | ||
Boost::program_options) | ||
if(STABLESOLVER_USE_CPLEX) | ||
target_compile_definitions(StableSolver_clique_main PUBLIC | ||
CPLEX_FOUND=1) | ||
target_link_libraries(StableSolver_clique_main PUBLIC | ||
StableSolver_clique_milp_cplex) | ||
endif() | ||
set_target_properties(StableSolver_clique_main PROPERTIES OUTPUT_NAME "stablesolver_clique") | ||
install(TARGETS StableSolver_clique_main) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
add_library(StableSolver_clique_greedy) | ||
target_sources(StableSolver_clique_greedy PRIVATE | ||
greedy.cpp) | ||
target_include_directories(StableSolver_clique_greedy PUBLIC | ||
${PROJECT_SOURCE_DIR}/include) | ||
target_link_libraries(StableSolver_clique_greedy PUBLIC | ||
StableSolver_clique) | ||
add_library(StableSolver::clique::greedy ALIAS StableSolver_clique_greedy) | ||
|
||
if(STABLESOLVER_USE_CPLEX) | ||
add_library(StableSolver_clique_milp_cplex) | ||
target_sources(StableSolver_clique_milp_cplex PRIVATE | ||
milp_cplex.cpp) | ||
target_include_directories(StableSolver_clique_milp_cplex PUBLIC | ||
${PROJECT_SOURCE_DIR}/include) | ||
target_link_libraries(StableSolver_clique_milp_cplex PUBLIC | ||
StableSolver_clique | ||
MathOptSolversCMake::cplex) | ||
add_library(StableSolver::clique::milp_cplex ALIAS StableSolver_clique_milp_cplex) | ||
endif() | ||
|
||
add_library(StableSolver_clique_local_search) | ||
target_sources(StableSolver_clique_local_search PRIVATE | ||
local_search.cpp) | ||
target_include_directories(StableSolver_clique_local_search PUBLIC | ||
${PROJECT_SOURCE_DIR}/include) | ||
target_link_libraries(StableSolver_clique_local_search PUBLIC | ||
StableSolver_clique | ||
LocalSearchSolver::localsearchsolver) | ||
add_library(StableSolver::clique::local_search ALIAS StableSolver_clique_local_search) |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.