From 1904e3d60bcc0a86d326767a536b59aa378fcbd0 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 12:01:53 +0300 Subject: [PATCH 01/22] executable --- CMakeLists.txt | 3 +++ app/CMakeLists.txt | 38 +++++++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8417d2b1b..15a36d84f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,9 @@ message(STATUS "Git hash: " ${GITHASH}) option(BUILD_CXX "Build C++ library" ON) message(STATUS "Build C++ library: ${BUILD_CXX}") +option(BUILD_CXX_EXE "Build C++ executable" ON) +message(STATUS "Build C++ library: ${BUILD_CXX_EXE}") + option(BUILD_TESTING "Build Tests" ON) option(FORTRAN "Build Fortran interface" OFF) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index e26139c4bd..15cf68eda5 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,8 +1,5 @@ if(FAST_BUILD) - if (BUILD_CXX) - # create highs binary using library without pic - add_executable(highs-bin) - + if (BUILD_CXX_EXE) # Configure the config windows version file if(MSVC) string(REPLACE "." "," PROJECT_RC_VERSION "${PROJECT_VERSION}") @@ -13,33 +10,52 @@ if(FAST_BUILD) set(win_version_file) endif() + add_executable(highs-bin) target_sources(highs-bin PRIVATE RunHighs.cpp HighsRuntimeOptions.h ${win_version_file}) target_include_directories(highs-bin PRIVATE $ ) + set_target_properties(highs-bin PROPERTIES POSITION_INDEPENDENT_CODE ON) + if(UNIX) target_compile_options(highs-bin PUBLIC "-Wno-unused-variable") target_compile_options(highs-bin PUBLIC "-Wno-unused-const-variable") endif() - set_target_properties(highs-bin - PROPERTIES OUTPUT_NAME highs) + set_target_properties(highs-bin PROPERTIES OUTPUT_NAME highs) + + target_compile_features(highs-bin PRIVATE cxx_std_11) + target_link_libraries(highs-bin PRIVATE ${PROJECT_NAMESPACE}::highs) - target_link_libraries(highs-bin highs) + include(GNUInstallDirs) if(APPLE) set_target_properties(highs-bin PROPERTIES INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") elseif (UNIX) - set_target_properties(highs-bin PROPERTIES INSTALL_RPATH - "$ORIGIN:$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") + cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR + BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} + OUTPUT_VARIABLE libdir_relative_path) + set_target_properties(highs-bin PROPERTIES INSTALL_RPATH + "$ORIGIN/${libdir_relative_path}") endif() # install the binary - install(TARGETS highs-bin EXPORT highs-targets - RUNTIME) + install(TARGETS highs-bin + EXPORT highs-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(BUILD_TESTING) + if (APPLE) + set(CMAKE_INSTALL_RPATH + "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + elseif (UNIX) + set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN:$ORIGIN/../lib:$ORIGIN") + endif () + endif() + endif() else() # create highs binary using library without pic From fd791c57267a2370580ddcaa00744408a359463d Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 12:35:19 +0300 Subject: [PATCH 02/22] use PROJECT_SOURCE_DIR consistently --- CMakeLists.txt | 40 ++++++++++++------------ app/CMakeLists.txt | 7 ++--- check/CMakeLists.txt | 40 ++++++++++++------------ cmake/cpp-highs.cmake | 62 ++++++++++++++++++++++++++------------ cmake/python-highs.cmake | 2 +- cmake/sources-python.cmake | 42 +++++++++++++------------- cmake/sources.cmake | 42 +++++++++++++------------- src/CMakeLists.txt | 26 ++++++++-------- src/HConfig.h.in | 2 +- 9 files changed, 142 insertions(+), 121 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15a36d84f4..7d4b36d18d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,14 +40,14 @@ option(FAST_BUILD "Fast build: " ON) find_program(GIT git) -if((GIT) AND(EXISTS ${HIGHS_SOURCE_DIR}/.git)) +if((GIT) AND(EXISTS ${PROJECT_SOURCE_DIR}/.git)) execute_process( COMMAND ${GIT} status - WORKING_DIRECTORY ${HIGHS_SOURCE_DIR} OUTPUT_QUIET) + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_QUIET) execute_process( COMMAND ${GIT} describe --always - WORKING_DIRECTORY ${HIGHS_SOURCE_DIR} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE) # string(REGEX REPLACE "^.*-g" "" GITHASH ${GITHASH}) else() @@ -521,7 +521,7 @@ set(CPACK_PACKAGE_VENDOR "University of Edinburgh") # string(TIMESTAMP TODAY "%Y-%m-%d") # message(STATUS "Compilation date: " ${TODAY}) -configure_file(${HIGHS_SOURCE_DIR}/src/HConfig.h.in ${HIGHS_BINARY_DIR}/HConfig.h) +configure_file(${PROJECT_SOURCE_DIR}/src/HConfig.h.in ${HIGHS_BINARY_DIR}/HConfig.h) if (DEBUG_MEMORY STREQUAL "Address") set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} \ @@ -702,22 +702,22 @@ if(NOT FAST_BUILD) include_directories( ${HIGHS_BINARY_DIR} - ${HIGHS_SOURCE_DIR}/app - ${HIGHS_SOURCE_DIR}/extern - ${HIGHS_SOURCE_DIR}/extern/zstr - ${HIGHS_SOURCE_DIR}/src - ${HIGHS_SOURCE_DIR}/src/io - ${HIGHS_SOURCE_DIR}/src/pdlp/cupdlp - ${HIGHS_SOURCE_DIR}/src/ipm/ipx - ${HIGHS_SOURCE_DIR}/src/ipm/basiclu - ${HIGHS_SOURCE_DIR}/src/lp_data - ${HIGHS_SOURCE_DIR}/src/mip - ${HIGHS_SOURCE_DIR}/src/model - ${HIGHS_SOURCE_DIR}/src/presolve - ${HIGHS_SOURCE_DIR}/src/qpsolver - ${HIGHS_SOURCE_DIR}/src/simplex - ${HIGHS_SOURCE_DIR}/src/test - ${HIGHS_SOURCE_DIR}/src/util) + ${PROJECT_SOURCE_DIR}/app + ${PROJECT_SOURCE_DIR}/extern + ${PROJECT_SOURCE_DIR}/extern/zstr + ${PROJECT_SOURCE_DIR}/src + ${PROJECT_SOURCE_DIR}/src/io + ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp + ${PROJECT_SOURCE_DIR}/src/ipm/ipx + ${PROJECT_SOURCE_DIR}/src/ipm/basiclu + ${PROJECT_SOURCE_DIR}/src/lp_data + ${PROJECT_SOURCE_DIR}/src/mip + ${PROJECT_SOURCE_DIR}/src/model + ${PROJECT_SOURCE_DIR}/src/presolve + ${PROJECT_SOURCE_DIR}/src/qpsolver + ${PROJECT_SOURCE_DIR}/src/simplex + ${PROJECT_SOURCE_DIR}/src/test + ${PROJECT_SOURCE_DIR}/src/util) # explicitly switch on colored output for ninja if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 15cf68eda5..5dd16dbc4e 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -3,7 +3,7 @@ if(FAST_BUILD) # Configure the config windows version file if(MSVC) string(REPLACE "." "," PROJECT_RC_VERSION "${PROJECT_VERSION}") - configure_file(${HIGHS_SOURCE_DIR}/version.rc.in + configure_file(${PROJECT_SOURCE_DIR}/version.rc.in "${HIGHS_BINARY_DIR}/version.rc" @ONLY) set(win_version_file ${HIGHS_BINARY_DIR}/version.rc) else() @@ -14,7 +14,7 @@ if(FAST_BUILD) target_sources(highs-bin PRIVATE RunHighs.cpp HighsRuntimeOptions.h ${win_version_file}) target_include_directories(highs-bin PRIVATE - $ + $ ) set_target_properties(highs-bin PROPERTIES POSITION_INDEPENDENT_CODE ON) @@ -70,9 +70,8 @@ else() target_link_libraries(highs libhighs) - target_include_directories(highs PRIVATE - $ + $ ) # install the binary diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 07b59777e2..3f7793c438 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -9,14 +9,14 @@ if (FORTRAN AND NOT BUILD_EXTRA_UNIT_ONLY) target_link_libraries(fortrantest highs FortranHighs) endif() target_include_directories(fortrantest PUBLIC - ${HIGHS_SOURCE_DIR}/src/interfaces - ${HIGHS_SOURCE_DIR}/check) + ${PROJECT_SOURCE_DIR}/src/interfaces + ${PROJECT_SOURCE_DIR}/check) endif() # if (CUPLDP_GPU AND BUILD_CXX) # # add a test -# add_executable(testcudalin ${HIGHS_SOURCE_DIR}/src/pdlp/cupdlp/cuda/test_cuda_linalg.c) -# add_executable(testcublas ${HIGHS_SOURCE_DIR}/src/pdlp/cupdlp/cuda/test_cublas.c) +# add_executable(testcudalin ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/cuda/test_cuda_linalg.c) +# add_executable(testcublas ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/cuda/test_cublas.c) # set_target_properties(testcudalin PROPERTIES CUDA_SEPARABLE_COMPILATION ON) # #target_include_directories(cudalinalg PRIVATE ${CUPDLP_INCLUDE_DIR}/cuda) @@ -28,11 +28,11 @@ endif() if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) # prepare Catch library - set(CATCH_INCLUDE_DIR ${HIGHS_SOURCE_DIR}/extern) + set(CATCH_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/extern) add_library(Catch INTERFACE) target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR}) - configure_file(${HIGHS_SOURCE_DIR}/check/HCheckConfig.h.in ${HIGHS_BINARY_DIR}/HCheckConfig.h) + configure_file(${PROJECT_SOURCE_DIR}/check/HCheckConfig.h.in ${HIGHS_BINARY_DIR}/HCheckConfig.h) FILE(WRITE ${CMAKE_BINARY_DIR}/testoptions.txt "mip_rel_gap=0.0 @@ -108,8 +108,8 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) endif() if (BUILD_EXTRA_UNIT_TESTS) - list(APPEND CMAKE_MODULE_PATH "${HIGHS_SOURCE_DIR}/check/highs-unit-tests") - message(STATUS "${HIGHS_SOURCE_DIR}/check/highs-unit-tests") + list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/check/highs-unit-tests") + message(STATUS "${PROJECT_SOURCE_DIR}/check/highs-unit-tests") include(highs-unit-tests) set(TEST_SOURCES ${TEST_SOURCES} ${HIGHS_EXTRA_UNIT_TESTS}) @@ -132,7 +132,7 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) else() target_link_libraries(unit_tests cudalin ${CUDA_LIBRARY} m) endif() - target_include_directories(unit_tests PRIVATE ${HIGHS_SOURCE_DIR}/src/pdlp/cupdlp/cuda) + target_include_directories(unit_tests PRIVATE ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/cuda) set_target_properties(unit_tests PROPERTIES CUDA_SEPARABLE_COMPILATION ON) endif() else() @@ -416,10 +416,10 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) endif() # specify the instance and the settings load command - if(ZLIB AND ZLIB_FOUND AND EXISTS "${HIGHS_SOURCE_DIR}/check/instances/${name}.mps.gz") - set(inst "${HIGHS_SOURCE_DIR}/check/instances/${name}.mps.gz") + if(ZLIB AND ZLIB_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/check/instances/${name}.mps.gz") + set(inst "${PROJECT_SOURCE_DIR}/check/instances/${name}.mps.gz") else() - set(inst "${HIGHS_SOURCE_DIR}/check/instances/${name}.mps") + set(inst "${PROJECT_SOURCE_DIR}/check/instances/${name}.mps") endif() # loop over all settings @@ -476,7 +476,7 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) list(GET instance 0 name) list(GET instance 1 optval) # specify the instance and the settings load command - set(inst "${HIGHS_SOURCE_DIR}/check/instances/${name}.mps") + set(inst "${PROJECT_SOURCE_DIR}/check/instances/${name}.mps") foreach(setting ${settings}) if (FAST_BUILD) @@ -506,7 +506,7 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) list(GET instance_pdlp 0 name_pdlp) list(GET instance_pdlp 1 optval) - set(inst_pdlp "${HIGHS_SOURCE_DIR}/check/instances/${name_pdlp}.mps") + set(inst_pdlp "${PROJECT_SOURCE_DIR}/check/instances/${name_pdlp}.mps") add_test(NAME ${name_pdlp}-pdlp-no-presolve COMMAND $ "--solver=pdlp" "--presolve=off" ${inst_pdlp}) @@ -524,20 +524,20 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) endif() if (BUILD_EXTRA_PROBLEM_SET) - list(APPEND CMAKE_MODULE_PATH "${HIGHS_SOURCE_DIR}/check/highs-problem-set") - message(STATUS "${HIGHS_SOURCE_DIR}/check/highs-problem-set") + list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/check/highs-problem-set") + message(STATUS "${PROJECT_SOURCE_DIR}/check/highs-problem-set") include(highs-problem-set) endif() if (BUILD_EXTRA_UNIT_TESTS AND BUILD_EXTRA_UNIT_ONLY) # prepare Catch library - set(CATCH_INCLUDE_DIR ${HIGHS_SOURCE_DIR}/extern) + set(CATCH_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/extern) add_library(Catch INTERFACE) target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR}) - list(APPEND CMAKE_MODULE_PATH "${HIGHS_SOURCE_DIR}/check/highs-unit-tests") - message(STATUS "${HIGHS_SOURCE_DIR}/check/highs-unit-tests") + list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/check/highs-unit-tests") + message(STATUS "${PROJECT_SOURCE_DIR}/check/highs-unit-tests") include(highs-unit-tests) set(TEST_SOURCES TestMain.cpp ${HIGHS_EXTRA_UNIT_TESTS}) @@ -547,7 +547,7 @@ if (BUILD_EXTRA_UNIT_TESTS AND BUILD_EXTRA_UNIT_ONLY) target_link_libraries(unit_tests_extra Catch) if (BUILD_CXX) - configure_file(${HIGHS_SOURCE_DIR}/check/HCheckConfig.h.in ${HIGHS_BINARY_DIR}/HCheckConfig.h) + configure_file(${PROJECT_SOURCE_DIR}/check/HCheckConfig.h.in ${HIGHS_BINARY_DIR}/HCheckConfig.h) target_link_libraries(unit_tests_extra highs) endif() diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index 7e211742c5..dab638c678 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -114,27 +114,38 @@ function(highs_cxx_test FILE_NAME) get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY) get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME) - if(APPLE) - set(CMAKE_INSTALL_RPATH - "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") - elseif(UNIX) - set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") - endif() + # added libdir_relative_path below instead + # if(APPLE) + # set(CMAKE_INSTALL_RPATH + # "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + # elseif(UNIX) + # set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") + # endif() add_executable(${TEST_NAME} ${FILE_NAME}) target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - # target_compile_features(${TEST_NAME} PRIVATE cxx_std_17) + + target_compile_features(${TEST_NAME} PRIVATE cxx_std_11) target_link_libraries(${TEST_NAME} PRIVATE ${PROJECT_NAMESPACE}::highs) + include(GNUInstallDirs) + if(APPLE) + set_target_properties(${TEST_NAME} PROPERTIES + INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + elseif(UNIX) + cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR + BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} + OUTPUT_VARIABLE libdir_relative_path) + set_target_properties(${TEST_NAME} PROPERTIES + INSTALL_RPATH "$ORIGIN/${libdir_relative_path}:$ORIGIN") + endif() + if(BUILD_TESTING) add_test(NAME cxx_${COMPONENT_NAME}_${TEST_NAME} COMMAND ${TEST_NAME}) endif() message(STATUS "Configuring test ${FILE_NAME}: ...DONE") endfunction() -# set_target_properties(highs PROPERTIES INTERFACE_${PROJECT_NAME}_MAJOR_VERSION ${PROJECT_VERSION_MAJOR}) -# set_target_properties(highs PROPERTIES COMPATIBLE_INTERFACE_STRING ${PROJECT_NAME}_MAJOR_VERSION) - # highs_c_test() # CMake function to generate and build C++ test. # Parameters: @@ -147,23 +158,34 @@ function(highs_c_test FILE_NAME) get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY) get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME) - if(APPLE) - set(CMAKE_INSTALL_RPATH - "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") - elseif(UNIX) - set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") - endif() + # added libdir_relative_path below instead + # if(APPLE) + # set(CMAKE_INSTALL_RPATH + # "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + # elseif(UNIX) + # set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") + # endif() add_executable(${TEST_NAME} ${FILE_NAME}) target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - # target_compile_features(${TEST_NAME} PRIVATE cxx_std_17) + + target_compile_features(${TEST_NAME} PRIVATE cxx_std_11) target_link_libraries(${TEST_NAME} PRIVATE ${PROJECT_NAMESPACE}::highs) + include(GNUInstallDirs) + if(APPLE) + set_target_properties(${TEST_NAME} PROPERTIES + INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + elseif(UNIX) + cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR + BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} + OUTPUT_VARIABLE libdir_relative_path) + set_target_properties(${TEST_NAME} PROPERTIES + INSTALL_RPATH "$ORIGIN/${libdir_relative_path}:$ORIGIN") + endif() + if(BUILD_TESTING) add_test(NAME c_${COMPONENT_NAME}_${TEST_NAME} COMMAND ${TEST_NAME}) endif() message(STATUS "Configuring test ${FILE_NAME}: ...DONE") endfunction() - -# set_target_properties(highs PROPERTIES INTERFACE_${PROJECT_NAME}_MAJOR_VERSION ${PROJECT_VERSION_MAJOR}) -# set_target_properties(highs PROPERTIES COMPATIBLE_INTERFACE_STRING ${PROJECT_NAME}_MAJOR_VERSION) diff --git a/cmake/python-highs.cmake b/cmake/python-highs.cmake index 4a429cb110..62f3780c48 100644 --- a/cmake/python-highs.cmake +++ b/cmake/python-highs.cmake @@ -46,7 +46,7 @@ target_link_libraries(_core PRIVATE pybind11::headers) target_sources(_core PUBLIC ${sources_python} ${headers_python}) # include directories for python -target_include_directories(_core PUBLIC ${include_dirs_python}) +target_include_directories(_core PRIVATE ${include_dirs_python}) # This is passing in the version as a define just as an example target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION}) diff --git a/cmake/sources-python.cmake b/cmake/sources-python.cmake index 89561d26e2..f7830d4572 100644 --- a/cmake/sources-python.cmake +++ b/cmake/sources-python.cmake @@ -1,25 +1,25 @@ set(include_dirs_python - ${CMAKE_SOURCE_DIR}/extern - ${CMAKE_SOURCE_DIR}/extern/filereader - ${CMAKE_SOURCE_DIR}/extern/pdqsort - ${CMAKE_SOURCE_DIR}/extern/zstr - ${CMAKE_SOURCE_DIR}/src - ${CMAKE_SOURCE_DIR}/src/interfaces - ${CMAKE_SOURCE_DIR}/src/io - ${CMAKE_SOURCE_DIR}/src/ipm - ${CMAKE_SOURCE_DIR}/src/ipm/ipx - ${CMAKE_SOURCE_DIR}/src/ipm/basiclu - ${CMAKE_SOURCE_DIR}/src/lp_data - ${CMAKE_SOURCE_DIR}/src/mip - ${CMAKE_SOURCE_DIR}/src/model - ${CMAKE_SOURCE_DIR}/src/parallel - ${CMAKE_SOURCE_DIR}/src/pdlp - ${CMAKE_SOURCE_DIR}/src/pdlp/cupdlp - ${CMAKE_SOURCE_DIR}/src/presolve - ${CMAKE_SOURCE_DIR}/src/qpsolver - ${CMAKE_SOURCE_DIR}/src/simplex - ${CMAKE_SOURCE_DIR}/src/test - ${CMAKE_SOURCE_DIR}/src/util + ${PROJECT_SOURCE_DIR}/extern + ${PROJECT_SOURCE_DIR}/extern/filereader + ${PROJECT_SOURCE_DIR}/extern/pdqsort + ${PROJECT_SOURCE_DIR}/extern/zstr + ${PROJECT_SOURCE_DIR}/src + ${PROJECT_SOURCE_DIR}/src/interfaces + ${PROJECT_SOURCE_DIR}/src/io + ${PROJECT_SOURCE_DIR}/src/ipm + ${PROJECT_SOURCE_DIR}/src/ipm/ipx + ${PROJECT_SOURCE_DIR}/src/ipm/basiclu + ${PROJECT_SOURCE_DIR}/src/lp_data + ${PROJECT_SOURCE_DIR}/src/mip + ${PROJECT_SOURCE_DIR}/src/model + ${PROJECT_SOURCE_DIR}/src/parallel + ${PROJECT_SOURCE_DIR}/src/pdlp + ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp + ${PROJECT_SOURCE_DIR}/src/presolve + ${PROJECT_SOURCE_DIR}/src/qpsolver + ${PROJECT_SOURCE_DIR}/src/simplex + ${PROJECT_SOURCE_DIR}/src/test + ${PROJECT_SOURCE_DIR}/src/util $) set(cupdlp_sources_python diff --git a/cmake/sources.cmake b/cmake/sources.cmake index 653aad884f..570a30195b 100644 --- a/cmake/sources.cmake +++ b/cmake/sources.cmake @@ -1,25 +1,25 @@ set(include_dirs - ${CMAKE_SOURCE_DIR}/extern - ${CMAKE_SOURCE_DIR}/extern/filereader - ${CMAKE_SOURCE_DIR}/extern/pdqsort - ${CMAKE_SOURCE_DIR}/extern/zstr - ${CMAKE_SOURCE_DIR}/src - ${CMAKE_SOURCE_DIR}/src/interfaces - ${CMAKE_SOURCE_DIR}/src/io - ${CMAKE_SOURCE_DIR}/src/ipm - ${CMAKE_SOURCE_DIR}/src/ipm/ipx - ${CMAKE_SOURCE_DIR}/src/ipm/basiclu - ${CMAKE_SOURCE_DIR}/src/lp_data - ${CMAKE_SOURCE_DIR}/src/mip - ${CMAKE_SOURCE_DIR}/src/model - ${CMAKE_SOURCE_DIR}/src/parallel - ${CMAKE_SOURCE_DIR}/src/pdlp - ${CMAKE_SOURCE_DIR}/src/pdlp/cupdlp - ${CMAKE_SOURCE_DIR}/src/presolve - ${CMAKE_SOURCE_DIR}/src/qpsolver - ${CMAKE_SOURCE_DIR}/src/simplex - ${CMAKE_SOURCE_DIR}/src/test - ${CMAKE_SOURCE_DIR}/src/util + ${PROJECT_SOURCE_DIR}/extern + ${PROJECT_SOURCE_DIR}/extern/filereader + ${PROJECT_SOURCE_DIR}/extern/pdqsort + ${PROJECT_SOURCE_DIR}/extern/zstr + ${PROJECT_SOURCE_DIR}/src + ${PROJECT_SOURCE_DIR}/src/interfaces + ${PROJECT_SOURCE_DIR}/src/io + ${PROJECT_SOURCE_DIR}/src/ipm + ${PROJECT_SOURCE_DIR}/src/ipm/ipx + ${PROJECT_SOURCE_DIR}/src/ipm/basiclu + ${PROJECT_SOURCE_DIR}/src/lp_data + ${PROJECT_SOURCE_DIR}/src/mip + ${PROJECT_SOURCE_DIR}/src/model + ${PROJECT_SOURCE_DIR}/src/parallel + ${PROJECT_SOURCE_DIR}/src/pdlp + ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp + ${PROJECT_SOURCE_DIR}/src/presolve + ${PROJECT_SOURCE_DIR}/src/qpsolver + ${PROJECT_SOURCE_DIR}/src/simplex + ${PROJECT_SOURCE_DIR}/src/test + ${PROJECT_SOURCE_DIR}/src/util $) set(cupdlp_sources diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f546c9858d..3580aa296e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,7 +10,7 @@ set(headers ${highs_headers} ${cupdlp_headers} ${ipx_headers} ${basiclu_headers} # Configure the config windows version file if(MSVC) string(REPLACE "." "," PROJECT_RC_VERSION "${PROJECT_VERSION}") - configure_file(${HIGHS_SOURCE_DIR}/version.rc.in + configure_file(${PROJECT_SOURCE_DIR}/version.rc.in "${HIGHS_BINARY_DIR}/version.rc" @ONLY) set(win_version_file ${HIGHS_BINARY_DIR}/version.rc) else() @@ -99,17 +99,17 @@ if(NOT FAST_BUILD) # Either list all the src/* directories here, or put explicit paths in all the # include statements. # M reckons that the latter is more transparent, and I'm inclined to agree. - set(CONF_INCLUDE_DIRS "${HIGHS_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") - configure_file(${HIGHS_SOURCE_DIR}/highs-config.cmake.in + set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") + configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in "${HIGHS_BINARY_DIR}/highs-config.cmake" @ONLY) # Configure the config file for the install set(CONF_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../../../${CMAKE_INSTALL_INCLUDEDIR}/highs") - configure_file(${HIGHS_SOURCE_DIR}/highs-config.cmake.in + configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" @ONLY) # Configure the pkg-config file for the install - configure_file(${HIGHS_SOURCE_DIR}/highs.pc.in + configure_file(${PROJECT_SOURCE_DIR}/highs.pc.in "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" @ONLY) # Install the targets of the highs export group, the config file so that other @@ -174,9 +174,9 @@ else() # $) # target_include_directories(highs PRIVATE - # $ - # $ - # $) + # $ + # $ + # $) target_sources(highs PRIVATE ${sources} ${headers} ${win_version_file}) @@ -254,7 +254,7 @@ else() if(ZLIB AND ZLIB_FOUND) target_include_directories(highs PRIVATE - $ + $ ) target_link_libraries(highs ZLIB::ZLIB) set(CONF_DEPS @@ -304,17 +304,17 @@ else() # Either list all the src/* directories here, or put explicit paths in all the # include statements. # M reckons that the latter is more transparent, and I'm inclined to agree. - set(CONF_INCLUDE_DIRS "${HIGHS_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") - configure_file(${HIGHS_SOURCE_DIR}/highs-config.cmake.in + set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") + configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in "${HIGHS_BINARY_DIR}/highs-config.cmake" @ONLY) # Configure the config file for the install set(CONF_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../../../${CMAKE_INSTALL_INCLUDEDIR}") - configure_file(${HIGHS_SOURCE_DIR}/highs-config.cmake.in + configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" @ONLY) # Configure the pkg-config file for the install - configure_file(${HIGHS_SOURCE_DIR}/highs.pc.in + configure_file(${PROJECT_SOURCE_DIR}/highs.pc.in "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" @ONLY) # Install the targets of the highs export group, the config file so that other diff --git a/src/HConfig.h.in b/src/HConfig.h.in index 13470d465f..7edbce5e2d 100644 --- a/src/HConfig.h.in +++ b/src/HConfig.h.in @@ -18,6 +18,6 @@ #define HIGHS_VERSION_MAJOR @HIGHS_VERSION_MAJOR@ #define HIGHS_VERSION_MINOR @HIGHS_VERSION_MINOR@ #define HIGHS_VERSION_PATCH @HIGHS_VERSION_PATCH@ -#define HIGHS_DIR "@CMAKE_SOURCE_DIR@" +#define HIGHS_DIR "@PROJECT_SOURCE_DIR@" #endif /* HCONFIG_H_ */ From 9c63993e07e019df47782d44c4b4b183f422eadc Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 12:43:15 +0300 Subject: [PATCH 03/22] BUILD_INTERFACE public --- cmake/cpp-highs.cmake | 6 ++++-- src/CMakeLists.txt | 2 +- src/pdlp/cupdlp/cuda/CMakeLists.txt | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index dab638c678..41a7cd4efc 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -122,7 +122,8 @@ function(highs_cxx_test FILE_NAME) # set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") # endif() - add_executable(${TEST_NAME} ${FILE_NAME}) + add_executable(${TEST_NAME} "") + target_sources(${TEST_NAME} PRIVATE ${FILE_NAME}) target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_features(${TEST_NAME} PRIVATE cxx_std_11) @@ -166,7 +167,8 @@ function(highs_c_test FILE_NAME) # set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") # endif() - add_executable(${TEST_NAME} ${FILE_NAME}) + add_executable(${TEST_NAME} "") + target_sources(${TEST_NAME} PRIVATE ${FILE_NAME}) target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_features(${TEST_NAME} PRIVATE cxx_std_11) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3580aa296e..ecd3874f25 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -191,7 +191,7 @@ else() # target_include_directories(highs PUBLIC "/usr/local/include") - target_include_directories(highs PUBLIC "${CMAKE_CUDA_PATH}/include") + target_include_directories(highs PUBLIC "$") set(CUPDLP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/") add_subdirectory(pdlp/cupdlp/cuda) diff --git a/src/pdlp/cupdlp/cuda/CMakeLists.txt b/src/pdlp/cupdlp/cuda/CMakeLists.txt index d2431a2974..bbf5f688be 100644 --- a/src/pdlp/cupdlp/cuda/CMakeLists.txt +++ b/src/pdlp/cupdlp/cuda/CMakeLists.txt @@ -10,8 +10,7 @@ set_target_properties(cudalin PROPERTIES CUDA_SEPARABLE_COMPILATION ON) # set_target_properties(cudalin PROPERTIES CUDA_ARCHITECTURES native) -target_include_directories(cudalin PUBLIC "${CMAKE_CUDA_PATH}/include") - +target_include_directories(cudalin PUBLIC "$") if (WIN32) target_link_libraries(cudalin ${CUDA_LIBRARY}) From ebd268a95f30b5086e3536578d15040b7f45ca9c Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 12:49:06 +0300 Subject: [PATCH 04/22] add compiler warning --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ecd3874f25..1e29061ed0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -300,6 +300,11 @@ else() target_compile_options(highs PUBLIC "-Wno-invalid-offsetof") endif() + check_cxx_compiler_flag("-Wno-invalid-offsetof" COMPILER_SUPPORTS_INVALID_OFFSET) + if(COMPILER_SUPPORTS_INVALID_OFFSET) + target_compile_options(highs PUBLIC "$<$:-Wno-invalid-offsetof>") + endif() + # Configure the config file for the build tree: # Either list all the src/* directories here, or put explicit paths in all the # include statements. From 0a33e8b065bd7837a0f99ec457fa010c2c348219 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 13:38:40 +0300 Subject: [PATCH 05/22] include dirs --- cmake/cpp-highs.cmake | 2 ++ src/CMakeLists.txt | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index 41a7cd4efc..2a12c57382 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -16,8 +16,10 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Includes target_include_directories(highs INTERFACE $ + $ $ $ + $ ) # Properties diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1e29061ed0..c804f26587 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -148,11 +148,12 @@ else() set_target_properties(highs PROPERTIES INSTALL_RPATH "$ORIGIN") endif() - target_include_directories(highs PUBLIC - $ - $ - # $ - ) + # also afterwards in cpp-highs.cmake + # target_include_directories(highs PUBLIC + # $ + # $ + # # $ + # ) # target_include_directories(highs PRIVATE From db9461e4812897fb5c1b8a6b39db6e7769e3b167 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 15:42:30 +0300 Subject: [PATCH 06/22] clean up of cmake config --- cmake/cpp-highs.cmake | 42 +++++++++++++++++++++++++++++++++---- cmake/highs-config.cmake.in | 12 +++++++++++ highs-config.cmake.in | 15 ------------- src/CMakeLists.txt | 24 ++++++++++----------- 4 files changed, 61 insertions(+), 32 deletions(-) create mode 100644 cmake/highs-config.cmake.in delete mode 100644 highs-config.cmake.in diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index 2a12c57382..ec0444977d 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -94,16 +94,50 @@ if (NOT HIGHS_COVERAGE) endif() +if(ZLIB AND ZLIB_FOUND) + set(CONF_Z "find_dependency(ZLIB)") + set(CONF_ZLIB ${CONF_Z}) +else() + set(CONF_ZLIB "") +endif() + include(CMakePackageConfigHelpers) -string (TOLOWER "${PROJECT_NAME}" PACKAGE_PREFIX) -# configure_package_config_file(src/HConfig.cmake.in -# "${PROJECT_BINARY_DIR}/${PACKAGE_PREFIX}-config.cmake" + +# configure_package_config_file(cmake/${PROJECT_NAME}Config.cmake.in +# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" # INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" # NO_CHECK_REQUIRED_COMPONENTS_MACRO) +# write_basic_package_version_file( +# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" +# COMPATIBILITY SameMajorVersion) +# install( # FILES +# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" +# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" +# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" +# COMPONENT Devel) + + +include(CMakePackageConfigHelpers) +string (TOUPPER "${PROJECT_NAME}" PACKAGE_PREFIX) +string (TOLOWER "${PROJECT_NAME}" PACKAGE_PREFIX_L) + +configure_package_config_file(cmake/highs-config.cmake.in + "${PROJECT_BINARY_DIR}/${PACKAGE_PREFIX_L}-config.cmake" + INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/highs" + NO_CHECK_REQUIRED_COMPONENTS_MACRO) + write_basic_package_version_file( - "${PROJECT_BINARY_DIR}/${PACKAGE_PREFIX}-config-version.cmake" + "${PROJECT_BINARY_DIR}/${PACKAGE_PREFIX_L}-config-version.cmake" COMPATIBILITY SameMajorVersion) +install( + FILES + "${PROJECT_BINARY_DIR}/${PACKAGE_PREFIX_L}-config.cmake" + "${PROJECT_BINARY_DIR}/${PACKAGE_PREFIX_L}-config-version.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/highs" + COMPONENT Devel) + + # highs_cxx_test() # CMake function to generate and build C++ test. # Parameters: diff --git a/cmake/highs-config.cmake.in b/cmake/highs-config.cmake.in new file mode 100644 index 0000000000..b0e82806c7 --- /dev/null +++ b/cmake/highs-config.cmake.in @@ -0,0 +1,12 @@ +## HiGHS CMake configuration file + +set(@PACKAGE_PREFIX@_VERSION @PROJECT_VERSION@) + +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +find_dependency(Threads) + +@CONF_ZLIB@ + +include("${CMAKE_CURRENT_LIST_DIR}/highs-targets.cmake") diff --git a/highs-config.cmake.in b/highs-config.cmake.in deleted file mode 100644 index 85709dea10..0000000000 --- a/highs-config.cmake.in +++ /dev/null @@ -1,15 +0,0 @@ -@PACKAGE_INIT@ - -set(HIGHS_DIR "@HIGHS_INSTALL_DIR@") - -if(NOT TARGET highs) - include("${CMAKE_CURRENT_LIST_DIR}/highs-targets.cmake") -endif() - -set(HIGHS_LIBRARIES highs) - -set(HIGHS_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") - -set(HIGHS_FOUND TRUE) - -@CONF_DEPENDENCIES@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c804f26587..021a6618ed 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -258,11 +258,6 @@ else() $ ) target_link_libraries(highs ZLIB::ZLIB) - set(CONF_DEPS - "include(CMakeFindDependencyMacro)\nfind_dependency(Threads)\nfind_dependency(ZLIB)") - set(CONF_DEPENDENCIES ${CONF_DEPS}) - else() - set(CONF_DEPENDENCIES "include(CMakeFindDependencyMacro)\nfind_dependency(Threads)") endif() @@ -310,14 +305,15 @@ else() # Either list all the src/* directories here, or put explicit paths in all the # include statements. # M reckons that the latter is more transparent, and I'm inclined to agree. - set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") - configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in - "${HIGHS_BINARY_DIR}/highs-config.cmake" @ONLY) + + # set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") + # configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in + # "${HIGHS_BINARY_DIR}/highs-config.cmake" @ONLY) # Configure the config file for the install - set(CONF_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../../../${CMAKE_INSTALL_INCLUDEDIR}") - configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in - "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" @ONLY) + # set(CONF_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../../../${CMAKE_INSTALL_INCLUDEDIR}") + # configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in + # "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" @ONLY) # Configure the pkg-config file for the install configure_file(${PROJECT_SOURCE_DIR}/highs.pc.in @@ -326,8 +322,10 @@ else() # Install the targets of the highs export group, the config file so that other # cmake-projects can link easily against highs, and the pkg-config flie so that # other projects can easily build against highs - install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/highs) + + # install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" + # DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/highs) + install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) From 625176c7ce06ae0314ca1ea726acd192c180a908 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 15:48:58 +0300 Subject: [PATCH 07/22] python for later --- cmake/python-highs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/python-highs.cmake b/cmake/python-highs.cmake index 62f3780c48..4a429cb110 100644 --- a/cmake/python-highs.cmake +++ b/cmake/python-highs.cmake @@ -46,7 +46,7 @@ target_link_libraries(_core PRIVATE pybind11::headers) target_sources(_core PUBLIC ${sources_python} ${headers_python}) # include directories for python -target_include_directories(_core PRIVATE ${include_dirs_python}) +target_include_directories(_core PUBLIC ${include_dirs_python}) # This is passing in the version as a define just as an example target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION}) From 30851a1a25e164fad8ad8a70ff86d00a0153a62e Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 15:53:30 +0300 Subject: [PATCH 08/22] python include dirs --- cmake/sources-python.cmake | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/cmake/sources-python.cmake b/cmake/sources-python.cmake index f7830d4572..5cb0869206 100644 --- a/cmake/sources-python.cmake +++ b/cmake/sources-python.cmake @@ -1,25 +1,25 @@ set(include_dirs_python - ${PROJECT_SOURCE_DIR}/extern - ${PROJECT_SOURCE_DIR}/extern/filereader - ${PROJECT_SOURCE_DIR}/extern/pdqsort - ${PROJECT_SOURCE_DIR}/extern/zstr - ${PROJECT_SOURCE_DIR}/src - ${PROJECT_SOURCE_DIR}/src/interfaces - ${PROJECT_SOURCE_DIR}/src/io - ${PROJECT_SOURCE_DIR}/src/ipm - ${PROJECT_SOURCE_DIR}/src/ipm/ipx - ${PROJECT_SOURCE_DIR}/src/ipm/basiclu - ${PROJECT_SOURCE_DIR}/src/lp_data - ${PROJECT_SOURCE_DIR}/src/mip - ${PROJECT_SOURCE_DIR}/src/model - ${PROJECT_SOURCE_DIR}/src/parallel - ${PROJECT_SOURCE_DIR}/src/pdlp - ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp - ${PROJECT_SOURCE_DIR}/src/presolve - ${PROJECT_SOURCE_DIR}/src/qpsolver - ${PROJECT_SOURCE_DIR}/src/simplex - ${PROJECT_SOURCE_DIR}/src/test - ${PROJECT_SOURCE_DIR}/src/util + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ $) set(cupdlp_sources_python From 2e3c6b07f41679bf7252419a9cf1997f8ca0b706 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 16:00:31 +0300 Subject: [PATCH 09/22] more cmake clean up --- check/CMakeLists.txt | 12 ------- cmake/cpp-highs.cmake | 38 ++++---------------- cmake/sources.cmake | 42 +++++++++++------------ src/CMakeLists.txt | 80 ------------------------------------------- 4 files changed, 28 insertions(+), 144 deletions(-) diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 3f7793c438..7d2b5f4d83 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -13,18 +13,6 @@ if (FORTRAN AND NOT BUILD_EXTRA_UNIT_ONLY) ${PROJECT_SOURCE_DIR}/check) endif() -# if (CUPLDP_GPU AND BUILD_CXX) -# # add a test -# add_executable(testcudalin ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/cuda/test_cuda_linalg.c) -# add_executable(testcublas ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/cuda/test_cublas.c) - -# set_target_properties(testcudalin PROPERTIES CUDA_SEPARABLE_COMPILATION ON) -# #target_include_directories(cudalinalg PRIVATE ${CUPDLP_INCLUDE_DIR}/cuda) -# target_link_libraries(testcudalin PRIVATE highs ${CUDA_LIBRARY}) - -# set_target_properties(testcublas PROPERTIES CUDA_SEPARABLE_COMPILATION ON) -# target_link_libraries(testcublas PRIVATE highs ${CUDA_LIBRARY}) -# endif() if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) # prepare Catch library diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index ec0444977d..bd9b60ff9b 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -101,21 +101,6 @@ else() set(CONF_ZLIB "") endif() -include(CMakePackageConfigHelpers) - -# configure_package_config_file(cmake/${PROJECT_NAME}Config.cmake.in -# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" -# INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -# NO_CHECK_REQUIRED_COMPONENTS_MACRO) -# write_basic_package_version_file( -# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" -# COMPATIBILITY SameMajorVersion) -# install( # FILES -# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" -# "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" -# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" -# COMPONENT Devel) - include(CMakePackageConfigHelpers) string (TOUPPER "${PROJECT_NAME}" PACKAGE_PREFIX) @@ -137,6 +122,13 @@ install( DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/highs" COMPONENT Devel) +# Configure the pkg-config file for the install +configure_file(${PROJECT_SOURCE_DIR}/highs.pc.in + "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" @ONLY) + +install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + # highs_cxx_test() # CMake function to generate and build C++ test. @@ -150,14 +142,6 @@ function(highs_cxx_test FILE_NAME) get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY) get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME) - # added libdir_relative_path below instead - # if(APPLE) - # set(CMAKE_INSTALL_RPATH - # "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") - # elseif(UNIX) - # set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") - # endif() - add_executable(${TEST_NAME} "") target_sources(${TEST_NAME} PRIVATE ${FILE_NAME}) target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) @@ -195,14 +179,6 @@ function(highs_c_test FILE_NAME) get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY) get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME) - # added libdir_relative_path below instead - # if(APPLE) - # set(CMAKE_INSTALL_RPATH - # "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") - # elseif(UNIX) - # set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") - # endif() - add_executable(${TEST_NAME} "") target_sources(${TEST_NAME} PRIVATE ${FILE_NAME}) target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/cmake/sources.cmake b/cmake/sources.cmake index 570a30195b..a3988e42f4 100644 --- a/cmake/sources.cmake +++ b/cmake/sources.cmake @@ -1,25 +1,25 @@ set(include_dirs - ${PROJECT_SOURCE_DIR}/extern - ${PROJECT_SOURCE_DIR}/extern/filereader - ${PROJECT_SOURCE_DIR}/extern/pdqsort - ${PROJECT_SOURCE_DIR}/extern/zstr - ${PROJECT_SOURCE_DIR}/src - ${PROJECT_SOURCE_DIR}/src/interfaces - ${PROJECT_SOURCE_DIR}/src/io - ${PROJECT_SOURCE_DIR}/src/ipm - ${PROJECT_SOURCE_DIR}/src/ipm/ipx - ${PROJECT_SOURCE_DIR}/src/ipm/basiclu - ${PROJECT_SOURCE_DIR}/src/lp_data - ${PROJECT_SOURCE_DIR}/src/mip - ${PROJECT_SOURCE_DIR}/src/model - ${PROJECT_SOURCE_DIR}/src/parallel - ${PROJECT_SOURCE_DIR}/src/pdlp - ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp - ${PROJECT_SOURCE_DIR}/src/presolve - ${PROJECT_SOURCE_DIR}/src/qpsolver - ${PROJECT_SOURCE_DIR}/src/simplex - ${PROJECT_SOURCE_DIR}/src/test - ${PROJECT_SOURCE_DIR}/src/util + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ $) set(cupdlp_sources diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 021a6618ed..280064def1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -148,49 +148,11 @@ else() set_target_properties(highs PROPERTIES INSTALL_RPATH "$ORIGIN") endif() - # also afterwards in cpp-highs.cmake - # target_include_directories(highs PUBLIC - # $ - # $ - # # $ - # ) - - - # target_include_directories(highs PRIVATE - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $ - # $) - - # target_include_directories(highs PRIVATE - # $ - # $ - # $) target_sources(highs PRIVATE ${sources} ${headers} ${win_version_file}) # Optional Cuda if (CUPDLP_GPU) - # enable_language(CXX CUDA) - # target_sources(highs PRIVATE ${cuda_sources}) - - # set_target_properties(highs PROPERTIES CUDA_SEPARABLE_COMPILATION ON) - - # target_link_libraries(highs ${CUDA_LIBRARY} m) - - # target_include_directories(highs PUBLIC "/usr/local/include") target_include_directories(highs PUBLIC "$") set(CUPDLP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/") @@ -260,19 +222,6 @@ else() target_link_libraries(highs ZLIB::ZLIB) endif() - - # # on UNIX system the 'lib' prefix is automatically added - # set_target_properties(highs PROPERTIES - # OUTPUT_NAME "highs" - # MACOSX_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") - - # if (UNIX) - # set_target_properties(highs PROPERTIES - # LIBRARY_OUTPUT_DIRECTORY "${HIGHS_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") - # endif() - - # set_target_properties(highs PROPERTIES PUBLIC_HEADER "src/Highs.h;src/lp_data/HighsLp.h;src/lp_data/HighsLpSolverObject.h") - # install the header files of highs foreach(file ${headers}) get_filename_component(dir ${file} DIRECTORY) @@ -301,35 +250,6 @@ else() target_compile_options(highs PUBLIC "$<$:-Wno-invalid-offsetof>") endif() - # Configure the config file for the build tree: - # Either list all the src/* directories here, or put explicit paths in all the - # include statements. - # M reckons that the latter is more transparent, and I'm inclined to agree. - - # set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") - # configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in - # "${HIGHS_BINARY_DIR}/highs-config.cmake" @ONLY) - - # Configure the config file for the install - # set(CONF_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../../../${CMAKE_INSTALL_INCLUDEDIR}") - # configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in - # "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" @ONLY) - - # Configure the pkg-config file for the install - configure_file(${PROJECT_SOURCE_DIR}/highs.pc.in - "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" @ONLY) - - # Install the targets of the highs export group, the config file so that other - # cmake-projects can link easily against highs, and the pkg-config flie so that - # other projects can easily build against highs - - # install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" - # DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/highs) - - install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - - if (BUILD_DOTNET) # see: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog From 5312b0df561f4c2f758fcb0c4bb69f37811ab449 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 16:04:22 +0300 Subject: [PATCH 10/22] fix path to highs-config.cmake.in for legacy FAST_BUILD off --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 280064def1..0239b5984d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,7 +100,7 @@ if(NOT FAST_BUILD) # include statements. # M reckons that the latter is more transparent, and I'm inclined to agree. set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") - configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in + configure_file(${PROJECT_SOURCE_DIR}/cmake/highs-config.cmake.in "${HIGHS_BINARY_DIR}/highs-config.cmake" @ONLY) # Configure the config file for the install From 4f7335289bf9f67c5d777c71faf2f96e0596199a Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 16:08:03 +0300 Subject: [PATCH 11/22] fix path to highs-config.cmake.in for legacy FAST_BUILD off for strange second config run --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0239b5984d..970aa43494 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -105,7 +105,7 @@ if(NOT FAST_BUILD) # Configure the config file for the install set(CONF_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../../../${CMAKE_INSTALL_INCLUDEDIR}/highs") - configure_file(${PROJECT_SOURCE_DIR}/highs-config.cmake.in + configure_file(${PROJECT_SOURCE_DIR}/cmake/highs-config.cmake.in "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" @ONLY) # Configure the pkg-config file for the install From 01d6b013e5b0ae5b80f64c965bc9df21b5d5f7b1 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Fri, 4 Apr 2025 16:28:13 +0300 Subject: [PATCH 12/22] cmake_path 3.20 --- app/CMakeLists.txt | 14 ++++++---- cmake/cpp-highs.cmake | 62 ++++++++++++++++++++++++++++--------------- 2 files changed, 49 insertions(+), 27 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 5dd16dbc4e..f1fbd02d63 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -35,11 +35,15 @@ if(FAST_BUILD) set_target_properties(highs-bin PROPERTIES INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") elseif (UNIX) - cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR - BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} - OUTPUT_VARIABLE libdir_relative_path) - set_target_properties(highs-bin PROPERTIES INSTALL_RPATH - "$ORIGIN/${libdir_relative_path}") + set_target_properties(highs-bin PROPERTIES INSTALL_RPATH + "$ORIGIN:$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") + + # cmake_path is 3.20, leave for later. + # cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR + # BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} + # OUTPUT_VARIABLE libdir_relative_path) + # set_target_properties(highs-bin PROPERTIES INSTALL_RPATH + # "$ORIGIN/${libdir_relative_path}") endif() # install the binary diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index bd9b60ff9b..cc74a45121 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -142,6 +142,15 @@ function(highs_cxx_test FILE_NAME) get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY) get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME) + # cmake_path 3.20 + include(GNUInstallDirs) + if(APPLE) + set(CMAKE_INSTALL_RPATH + "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + elseif(UNIX) + set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") + endif() + add_executable(${TEST_NAME} "") target_sources(${TEST_NAME} PRIVATE ${FILE_NAME}) target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) @@ -149,17 +158,17 @@ function(highs_cxx_test FILE_NAME) target_compile_features(${TEST_NAME} PRIVATE cxx_std_11) target_link_libraries(${TEST_NAME} PRIVATE ${PROJECT_NAMESPACE}::highs) - include(GNUInstallDirs) - if(APPLE) - set_target_properties(${TEST_NAME} PROPERTIES - INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") - elseif(UNIX) - cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR - BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} - OUTPUT_VARIABLE libdir_relative_path) - set_target_properties(${TEST_NAME} PROPERTIES - INSTALL_RPATH "$ORIGIN/${libdir_relative_path}:$ORIGIN") - endif() + # include(GNUInstallDirs) + # if(APPLE) + # set_target_properties(${TEST_NAME} PROPERTIES + # INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + # elseif(UNIX) + # cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR + # BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} + # OUTPUT_VARIABLE libdir_relative_path) + # set_target_properties(${TEST_NAME} PROPERTIES + # INSTALL_RPATH "$ORIGIN/${libdir_relative_path}:$ORIGIN") + # endif() if(BUILD_TESTING) add_test(NAME cxx_${COMPONENT_NAME}_${TEST_NAME} COMMAND ${TEST_NAME}) @@ -178,6 +187,15 @@ function(highs_c_test FILE_NAME) get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE) get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY) get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME) + + # cmake_path 3.20 + include(GNUInstallDirs) + if(APPLE) + set(CMAKE_INSTALL_RPATH + "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + elseif(UNIX) + set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN") + endif() add_executable(${TEST_NAME} "") target_sources(${TEST_NAME} PRIVATE ${FILE_NAME}) @@ -186,17 +204,17 @@ function(highs_c_test FILE_NAME) target_compile_features(${TEST_NAME} PRIVATE cxx_std_11) target_link_libraries(${TEST_NAME} PRIVATE ${PROJECT_NAMESPACE}::highs) - include(GNUInstallDirs) - if(APPLE) - set_target_properties(${TEST_NAME} PROPERTIES - INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") - elseif(UNIX) - cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR - BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} - OUTPUT_VARIABLE libdir_relative_path) - set_target_properties(${TEST_NAME} PROPERTIES - INSTALL_RPATH "$ORIGIN/${libdir_relative_path}:$ORIGIN") - endif() + # include(GNUInstallDirs) + # if(APPLE) + # set_target_properties(${TEST_NAME} PROPERTIES + # INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path") + # elseif(UNIX) + # cmake_path(RELATIVE_PATH CMAKE_INSTALL_FULL_LIBDIR + # BASE_DIRECTORY ${CMAKE_INSTALL_FULL_BINDIR} + # OUTPUT_VARIABLE libdir_relative_path) + # set_target_properties(${TEST_NAME} PROPERTIES + # INSTALL_RPATH "$ORIGIN/${libdir_relative_path}:$ORIGIN") + # endif() if(BUILD_TESTING) add_test(NAME c_${COMPONENT_NAME}_${TEST_NAME} COMMAND ${TEST_NAME}) From eb255e1bc73f4a40f4df0f06c7d80096967d5726 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 09:42:32 +0300 Subject: [PATCH 13/22] rename source dir to highs --- .github/workflows/build-meson.yml | 2 +- .github/workflows/clang-format.yml | 4 +- .github/workflows/code-coverage.yml | 2 +- .gitignore | 2 +- BUILD.bazel | 64 +- CMakeLists.txt | 34 +- README.md | 6 +- build_webdemo.sh | 2 +- check/CMakeLists.txt | 4 +- check/pythontest.py | 2 +- cmake/cpp-highs.cmake | 46 +- cmake/dotnet.cmake | 2 +- cmake/python-highs.cmake | 2 +- cmake/sources-python.cmake | 820 +++++++++--------- cmake/sources.cmake | 34 +- docs/HiGHS_CopyrightHeaderUpdateAll | 44 +- docs/c_api_gen/build.jl | 2 +- docs/src/index.md | 2 +- docs/src/interfaces/cpp/library.md | 2 +- docs/src/interfaces/csharp.md | 2 +- docs/src/interfaces/fortran.md | 2 +- {src => highs}/CMakeLists.txt | 6 +- {src => highs}/HConfig.h.bazel.in | 0 {src => highs}/HConfig.h.in | 0 {src => highs}/HConfig.h.meson.in | 0 {src => highs}/Highs.h | 0 {src => highs}/highs_bindings.cpp | 0 {src => highs}/highspy/__init__.py | 0 {src => highs}/highspy/__init__.pyi | 0 {src => highs}/highspy/_core/__init__.pyi | 0 {src => highs}/highspy/_core/cb.pyi | 0 .../highspy/_core/simplex_constants.pyi | 0 {src => highs}/highspy/highs.py | 0 {src => highs}/interfaces/highs_c_api.cpp | 0 {src => highs}/interfaces/highs_c_api.h | 0 {src => highs}/interfaces/highs_csharp_api.cs | 0 .../interfaces/highs_fortran_api.f90 | 0 {src => highs}/io/Filereader.cpp | 0 {src => highs}/io/Filereader.h | 0 {src => highs}/io/FilereaderEms.cpp | 0 {src => highs}/io/FilereaderEms.h | 0 {src => highs}/io/FilereaderLp.cpp | 0 {src => highs}/io/FilereaderLp.h | 0 {src => highs}/io/FilereaderMps.cpp | 0 {src => highs}/io/FilereaderMps.h | 0 {src => highs}/io/HMPSIO.cpp | 0 {src => highs}/io/HMPSIO.h | 0 {src => highs}/io/HMpsFF.cpp | 0 {src => highs}/io/HMpsFF.h | 0 {src => highs}/io/HighsIO.cpp | 0 {src => highs}/io/HighsIO.h | 0 {src => highs}/io/LoadOptions.cpp | 0 {src => highs}/io/LoadOptions.h | 0 {src => highs}/ipm/IpxSolution.h | 0 {src => highs}/ipm/IpxWrapper.cpp | 0 {src => highs}/ipm/IpxWrapper.h | 0 {src => highs}/ipm/basiclu/basiclu.h | 0 .../ipm/basiclu/basiclu_factorize.c | 0 .../ipm/basiclu/basiclu_factorize.h | 0 .../ipm/basiclu/basiclu_get_factors.c | 0 .../ipm/basiclu/basiclu_get_factors.h | 0 .../ipm/basiclu/basiclu_initialize.c | 0 .../ipm/basiclu/basiclu_initialize.h | 0 .../ipm/basiclu/basiclu_obj_factorize.h | 0 {src => highs}/ipm/basiclu/basiclu_obj_free.h | 0 .../ipm/basiclu/basiclu_obj_get_factors.h | 0 .../ipm/basiclu/basiclu_obj_initialize.h | 0 .../ipm/basiclu/basiclu_obj_solve_dense.h | 0 .../basiclu/basiclu_obj_solve_for_update.h | 0 .../ipm/basiclu/basiclu_obj_solve_sparse.h | 0 .../ipm/basiclu/basiclu_obj_update.h | 0 {src => highs}/ipm/basiclu/basiclu_object.c | 0 {src => highs}/ipm/basiclu/basiclu_object.h | 0 .../ipm/basiclu/basiclu_solve_dense.c | 0 .../ipm/basiclu/basiclu_solve_dense.h | 0 .../ipm/basiclu/basiclu_solve_for_update.c | 0 .../ipm/basiclu/basiclu_solve_for_update.h | 0 .../ipm/basiclu/basiclu_solve_sparse.c | 0 .../ipm/basiclu/basiclu_solve_sparse.h | 0 {src => highs}/ipm/basiclu/basiclu_update.c | 0 {src => highs}/ipm/basiclu/basiclu_update.h | 0 {src => highs}/ipm/basiclu/lu_build_factors.c | 0 {src => highs}/ipm/basiclu/lu_condest.c | 0 {src => highs}/ipm/basiclu/lu_def.h | 0 {src => highs}/ipm/basiclu/lu_dfs.c | 0 .../ipm/basiclu/lu_factorize_bump.c | 0 {src => highs}/ipm/basiclu/lu_file.c | 0 {src => highs}/ipm/basiclu/lu_file.h | 0 {src => highs}/ipm/basiclu/lu_garbage_perm.c | 0 {src => highs}/ipm/basiclu/lu_initialize.c | 0 {src => highs}/ipm/basiclu/lu_internal.c | 0 {src => highs}/ipm/basiclu/lu_internal.h | 0 {src => highs}/ipm/basiclu/lu_list.h | 0 {src => highs}/ipm/basiclu/lu_markowitz.c | 0 {src => highs}/ipm/basiclu/lu_matrix_norm.c | 0 {src => highs}/ipm/basiclu/lu_pivot.c | 0 {src => highs}/ipm/basiclu/lu_residual_test.c | 0 {src => highs}/ipm/basiclu/lu_setup_bump.c | 0 {src => highs}/ipm/basiclu/lu_singletons.c | 0 {src => highs}/ipm/basiclu/lu_solve_dense.c | 0 .../ipm/basiclu/lu_solve_for_update.c | 0 {src => highs}/ipm/basiclu/lu_solve_sparse.c | 0 .../ipm/basiclu/lu_solve_symbolic.c | 0 .../ipm/basiclu/lu_solve_triangular.c | 0 {src => highs}/ipm/basiclu/lu_update.c | 0 {src => highs}/ipm/ipx/basiclu_kernel.cc | 0 {src => highs}/ipm/ipx/basiclu_kernel.h | 0 {src => highs}/ipm/ipx/basiclu_wrapper.cc | 0 {src => highs}/ipm/ipx/basiclu_wrapper.h | 0 {src => highs}/ipm/ipx/basis.cc | 0 {src => highs}/ipm/ipx/basis.h | 0 {src => highs}/ipm/ipx/conjugate_residuals.cc | 0 {src => highs}/ipm/ipx/conjugate_residuals.h | 0 {src => highs}/ipm/ipx/control.cc | 0 {src => highs}/ipm/ipx/control.h | 0 {src => highs}/ipm/ipx/crossover.cc | 0 {src => highs}/ipm/ipx/crossover.h | 0 {src => highs}/ipm/ipx/diagonal_precond.cc | 0 {src => highs}/ipm/ipx/diagonal_precond.h | 0 {src => highs}/ipm/ipx/forrest_tomlin.cc | 0 {src => highs}/ipm/ipx/forrest_tomlin.h | 0 {src => highs}/ipm/ipx/guess_basis.cc | 0 {src => highs}/ipm/ipx/guess_basis.h | 0 {src => highs}/ipm/ipx/indexed_vector.cc | 0 {src => highs}/ipm/ipx/indexed_vector.h | 0 {src => highs}/ipm/ipx/info.cc | 0 {src => highs}/ipm/ipx/info.h | 0 {src => highs}/ipm/ipx/ipm.cc | 0 {src => highs}/ipm/ipx/ipm.h | 0 {src => highs}/ipm/ipx/ipx_c.cc | 0 {src => highs}/ipm/ipx/ipx_c.h | 2 +- {src => highs}/ipm/ipx/ipx_config.h | 0 {src => highs}/ipm/ipx/ipx_info.h | 0 {src => highs}/ipm/ipx/ipx_internal.h | 0 {src => highs}/ipm/ipx/ipx_parameters.h | 0 {src => highs}/ipm/ipx/ipx_status.h | 0 {src => highs}/ipm/ipx/iterate.cc | 0 {src => highs}/ipm/ipx/iterate.h | 0 {src => highs}/ipm/ipx/kkt_solver.cc | 0 {src => highs}/ipm/ipx/kkt_solver.h | 0 {src => highs}/ipm/ipx/kkt_solver_basis.cc | 0 {src => highs}/ipm/ipx/kkt_solver_basis.h | 0 {src => highs}/ipm/ipx/kkt_solver_diag.cc | 0 {src => highs}/ipm/ipx/kkt_solver_diag.h | 0 {src => highs}/ipm/ipx/linear_operator.cc | 0 {src => highs}/ipm/ipx/linear_operator.h | 0 {src => highs}/ipm/ipx/lp_solver.cc | 0 {src => highs}/ipm/ipx/lp_solver.h | 0 {src => highs}/ipm/ipx/lu_factorization.cc | 0 {src => highs}/ipm/ipx/lu_factorization.h | 0 {src => highs}/ipm/ipx/lu_update.cc | 0 {src => highs}/ipm/ipx/lu_update.h | 0 {src => highs}/ipm/ipx/maxvolume.cc | 0 {src => highs}/ipm/ipx/maxvolume.h | 0 {src => highs}/ipm/ipx/model.cc | 0 {src => highs}/ipm/ipx/model.h | 0 {src => highs}/ipm/ipx/multistream.h | 0 {src => highs}/ipm/ipx/normal_matrix.cc | 0 {src => highs}/ipm/ipx/normal_matrix.h | 0 {src => highs}/ipm/ipx/power_method.h | 0 {src => highs}/ipm/ipx/sparse_matrix.cc | 0 {src => highs}/ipm/ipx/sparse_matrix.h | 0 {src => highs}/ipm/ipx/sparse_utils.cc | 0 {src => highs}/ipm/ipx/sparse_utils.h | 0 .../ipm/ipx/splitted_normal_matrix.cc | 0 .../ipm/ipx/splitted_normal_matrix.h | 0 {src => highs}/ipm/ipx/starting_basis.cc | 0 {src => highs}/ipm/ipx/starting_basis.h | 0 {src => highs}/ipm/ipx/symbolic_invert.cc | 0 {src => highs}/ipm/ipx/symbolic_invert.h | 0 {src => highs}/ipm/ipx/timer.cc | 0 {src => highs}/ipm/ipx/timer.h | 0 {src => highs}/ipm/ipx/utils.cc | 0 {src => highs}/ipm/ipx/utils.h | 0 {src => highs}/lp_data/HConst.h | 0 {src => highs}/lp_data/HStruct.h | 0 {src => highs}/lp_data/Highs.cpp | 0 {src => highs}/lp_data/HighsAnalysis.h | 0 {src => highs}/lp_data/HighsCallback.cpp | 0 {src => highs}/lp_data/HighsCallback.h | 0 {src => highs}/lp_data/HighsCallbackStruct.h | 0 {src => highs}/lp_data/HighsDebug.cpp | 0 {src => highs}/lp_data/HighsDebug.h | 0 {src => highs}/lp_data/HighsDeprecated.cpp | 0 {src => highs}/lp_data/HighsIis.cpp | 0 {src => highs}/lp_data/HighsIis.h | 0 {src => highs}/lp_data/HighsInfo.cpp | 0 {src => highs}/lp_data/HighsInfo.h | 0 {src => highs}/lp_data/HighsInfoDebug.cpp | 0 {src => highs}/lp_data/HighsInfoDebug.h | 0 {src => highs}/lp_data/HighsInterface.cpp | 0 {src => highs}/lp_data/HighsLp.cpp | 0 {src => highs}/lp_data/HighsLp.h | 0 {src => highs}/lp_data/HighsLpSolverObject.h | 0 {src => highs}/lp_data/HighsLpUtils.cpp | 0 {src => highs}/lp_data/HighsLpUtils.h | 0 {src => highs}/lp_data/HighsModelUtils.cpp | 0 {src => highs}/lp_data/HighsModelUtils.h | 0 {src => highs}/lp_data/HighsOptions.cpp | 0 {src => highs}/lp_data/HighsOptions.h | 0 {src => highs}/lp_data/HighsRanging.cpp | 0 {src => highs}/lp_data/HighsRanging.h | 0 {src => highs}/lp_data/HighsSolution.cpp | 0 {src => highs}/lp_data/HighsSolution.h | 0 {src => highs}/lp_data/HighsSolutionDebug.cpp | 0 {src => highs}/lp_data/HighsSolutionDebug.h | 0 {src => highs}/lp_data/HighsSolve.cpp | 0 {src => highs}/lp_data/HighsSolve.h | 0 {src => highs}/lp_data/HighsStatus.cpp | 0 {src => highs}/lp_data/HighsStatus.h | 0 {src => highs}/meson.build | 0 {src => highs}/mip/HighsCliqueTable.cpp | 0 {src => highs}/mip/HighsCliqueTable.h | 0 {src => highs}/mip/HighsConflictPool.cpp | 0 {src => highs}/mip/HighsConflictPool.h | 0 {src => highs}/mip/HighsCutGeneration.cpp | 0 {src => highs}/mip/HighsCutGeneration.h | 0 {src => highs}/mip/HighsCutPool.cpp | 0 {src => highs}/mip/HighsCutPool.h | 0 {src => highs}/mip/HighsDebugSol.cpp | 0 {src => highs}/mip/HighsDebugSol.h | 0 {src => highs}/mip/HighsDomain.cpp | 0 {src => highs}/mip/HighsDomain.h | 0 {src => highs}/mip/HighsDomainChange.h | 0 {src => highs}/mip/HighsDynamicRowMatrix.cpp | 0 {src => highs}/mip/HighsDynamicRowMatrix.h | 0 {src => highs}/mip/HighsGFkSolve.cpp | 0 {src => highs}/mip/HighsGFkSolve.h | 0 {src => highs}/mip/HighsImplications.cpp | 0 {src => highs}/mip/HighsImplications.h | 0 {src => highs}/mip/HighsLpAggregator.cpp | 0 {src => highs}/mip/HighsLpAggregator.h | 0 {src => highs}/mip/HighsLpRelaxation.cpp | 0 {src => highs}/mip/HighsLpRelaxation.h | 0 {src => highs}/mip/HighsMipAnalysis.cpp | 0 {src => highs}/mip/HighsMipAnalysis.h | 0 {src => highs}/mip/HighsMipSolver.cpp | 0 {src => highs}/mip/HighsMipSolver.h | 0 {src => highs}/mip/HighsMipSolverData.cpp | 0 {src => highs}/mip/HighsMipSolverData.h | 0 {src => highs}/mip/HighsModkSeparator.cpp | 0 {src => highs}/mip/HighsModkSeparator.h | 0 {src => highs}/mip/HighsNodeQueue.cpp | 0 {src => highs}/mip/HighsNodeQueue.h | 0 {src => highs}/mip/HighsObjectiveFunction.cpp | 0 {src => highs}/mip/HighsObjectiveFunction.h | 0 {src => highs}/mip/HighsPathSeparator.cpp | 0 {src => highs}/mip/HighsPathSeparator.h | 0 {src => highs}/mip/HighsPrimalHeuristics.cpp | 0 {src => highs}/mip/HighsPrimalHeuristics.h | 0 {src => highs}/mip/HighsPseudocost.cpp | 0 {src => highs}/mip/HighsPseudocost.h | 0 {src => highs}/mip/HighsRedcostFixing.cpp | 0 {src => highs}/mip/HighsRedcostFixing.h | 0 {src => highs}/mip/HighsSearch.cpp | 0 {src => highs}/mip/HighsSearch.h | 0 {src => highs}/mip/HighsSeparation.cpp | 0 {src => highs}/mip/HighsSeparation.h | 0 {src => highs}/mip/HighsSeparator.cpp | 0 {src => highs}/mip/HighsSeparator.h | 0 {src => highs}/mip/HighsTableauSeparator.cpp | 0 {src => highs}/mip/HighsTableauSeparator.h | 0 {src => highs}/mip/HighsTransformedLp.cpp | 0 {src => highs}/mip/HighsTransformedLp.h | 0 {src => highs}/mip/MipTimer.h | 0 {src => highs}/model/HighsHessian.cpp | 0 {src => highs}/model/HighsHessian.h | 0 {src => highs}/model/HighsHessianUtils.cpp | 0 {src => highs}/model/HighsHessianUtils.h | 0 {src => highs}/model/HighsModel.cpp | 0 {src => highs}/model/HighsModel.h | 0 .../parallel/HighsBinarySemaphore.h | 0 {src => highs}/parallel/HighsCacheAlign.h | 0 {src => highs}/parallel/HighsCombinable.h | 0 {src => highs}/parallel/HighsMutex.h | 0 {src => highs}/parallel/HighsParallel.h | 0 {src => highs}/parallel/HighsRaceTimer.h | 0 .../parallel/HighsSchedulerConstants.h | 0 {src => highs}/parallel/HighsSpinMutex.h | 0 {src => highs}/parallel/HighsSplitDeque.h | 0 {src => highs}/parallel/HighsTask.h | 0 {src => highs}/parallel/HighsTaskExecutor.cpp | 0 {src => highs}/parallel/HighsTaskExecutor.h | 0 {src => highs}/pdlp/CupdlpWrapper.cpp | 0 {src => highs}/pdlp/CupdlpWrapper.h | 0 {src => highs}/pdlp/README.md | 0 {src => highs}/pdlp/cupdlp/Diff | 0 {src => highs}/pdlp/cupdlp/Meld | 0 {src => highs}/pdlp/cupdlp/Merge | 0 {src => highs}/pdlp/cupdlp/README.md | 6 +- .../pdlp/cupdlp/cuda/CMakeLists.txt | 0 .../pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu | 0 .../pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh | 0 .../pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu | 0 .../pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh | 0 {src => highs}/pdlp/cupdlp/cuda/test_cublas.c | 0 .../pdlp/cupdlp/cuda/test_cuda_linalg.c | 0 {src => highs}/pdlp/cupdlp/cupdlp.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_cs.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_cs.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_defs.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_linalg.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_linalg.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_proj.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_proj.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_restart.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_restart.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_scaling.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_scaling.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_solver.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_solver.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_step.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_step.h | 0 {src => highs}/pdlp/cupdlp/cupdlp_utils.c | 0 {src => highs}/pdlp/cupdlp/cupdlp_utils.h | 0 {src => highs}/pdlp/cupdlp/glbopts.h | 0 {src => highs}/presolve/HPresolve.cpp | 0 {src => highs}/presolve/HPresolve.h | 0 {src => highs}/presolve/HPresolveAnalysis.cpp | 0 {src => highs}/presolve/HPresolveAnalysis.h | 0 .../presolve/HighsPostsolveStack.cpp | 0 {src => highs}/presolve/HighsPostsolveStack.h | 0 {src => highs}/presolve/HighsSymmetry.cpp | 0 {src => highs}/presolve/HighsSymmetry.h | 0 {src => highs}/presolve/ICrash.cpp | 0 {src => highs}/presolve/ICrash.h | 0 {src => highs}/presolve/ICrashUtil.cpp | 0 {src => highs}/presolve/ICrashUtil.h | 0 {src => highs}/presolve/ICrashX.cpp | 0 {src => highs}/presolve/ICrashX.h | 0 {src => highs}/presolve/PresolveComponent.cpp | 0 {src => highs}/presolve/PresolveComponent.h | 0 {src => highs}/qpsolver/a_asm.cpp | 0 {src => highs}/qpsolver/a_asm.hpp | 0 {src => highs}/qpsolver/a_quass.cpp | 0 {src => highs}/qpsolver/a_quass.hpp | 0 {src => highs}/qpsolver/basis.cpp | 0 {src => highs}/qpsolver/basis.hpp | 0 {src => highs}/qpsolver/crashsolution.hpp | 0 {src => highs}/qpsolver/dantzigpricing.hpp | 0 .../qpsolver/devexharrispricing.hpp | 0 {src => highs}/qpsolver/devexpricing.hpp | 0 {src => highs}/qpsolver/eventhandler.hpp | 0 {src => highs}/qpsolver/factor.hpp | 0 .../qpsolver/feasibility_bounded.hpp | 0 {src => highs}/qpsolver/feasibility_highs.hpp | 0 {src => highs}/qpsolver/gradient.hpp | 0 {src => highs}/qpsolver/instance.hpp | 0 {src => highs}/qpsolver/matrix.hpp | 0 {src => highs}/qpsolver/perturbation.cpp | 0 {src => highs}/qpsolver/perturbation.hpp | 0 {src => highs}/qpsolver/pricing.hpp | 0 {src => highs}/qpsolver/qpconst.hpp | 0 {src => highs}/qpsolver/qpvector.hpp | 0 {src => highs}/qpsolver/quass.cpp | 0 {src => highs}/qpsolver/quass.hpp | 0 {src => highs}/qpsolver/ratiotest.cpp | 0 {src => highs}/qpsolver/ratiotest.hpp | 0 {src => highs}/qpsolver/reducedcosts.hpp | 0 {src => highs}/qpsolver/reducedgradient.hpp | 0 {src => highs}/qpsolver/runtime.hpp | 0 {src => highs}/qpsolver/scaling.cpp | 0 {src => highs}/qpsolver/scaling.hpp | 0 {src => highs}/qpsolver/settings.hpp | 0 {src => highs}/qpsolver/snippets.hpp | 0 {src => highs}/qpsolver/statistics.hpp | 0 .../qpsolver/steepestedgepricing.hpp | 0 {src => highs}/simplex/HApp.h | 0 {src => highs}/simplex/HEkk.cpp | 0 {src => highs}/simplex/HEkk.h | 0 {src => highs}/simplex/HEkkControl.cpp | 0 {src => highs}/simplex/HEkkDebug.cpp | 0 {src => highs}/simplex/HEkkDual.cpp | 0 {src => highs}/simplex/HEkkDual.h | 0 {src => highs}/simplex/HEkkDualMulti.cpp | 0 {src => highs}/simplex/HEkkDualRHS.cpp | 0 {src => highs}/simplex/HEkkDualRHS.h | 0 {src => highs}/simplex/HEkkDualRow.cpp | 0 {src => highs}/simplex/HEkkDualRow.h | 0 {src => highs}/simplex/HEkkInterface.cpp | 0 {src => highs}/simplex/HEkkPrimal.cpp | 0 {src => highs}/simplex/HEkkPrimal.h | 0 {src => highs}/simplex/HSimplex.cpp | 0 {src => highs}/simplex/HSimplex.h | 0 {src => highs}/simplex/HSimplexDebug.cpp | 0 {src => highs}/simplex/HSimplexDebug.h | 0 {src => highs}/simplex/HSimplexNla.cpp | 0 {src => highs}/simplex/HSimplexNla.h | 0 {src => highs}/simplex/HSimplexNlaDebug.cpp | 0 {src => highs}/simplex/HSimplexNlaFreeze.cpp | 0 .../simplex/HSimplexNlaProductForm.cpp | 0 {src => highs}/simplex/HSimplexReport.cpp | 0 {src => highs}/simplex/HSimplexReport.h | 0 .../simplex/HighsSimplexAnalysis.cpp | 0 {src => highs}/simplex/HighsSimplexAnalysis.h | 0 {src => highs}/simplex/SimplexConst.h | 0 {src => highs}/simplex/SimplexStruct.h | 0 {src => highs}/simplex/SimplexTimer.h | 0 {src => highs}/util/FactorTimer.h | 0 {src => highs}/util/HFactor.cpp | 0 {src => highs}/util/HFactor.h | 0 {src => highs}/util/HFactorConst.h | 0 {src => highs}/util/HFactorDebug.cpp | 0 {src => highs}/util/HFactorDebug.h | 0 {src => highs}/util/HFactorExtend.cpp | 0 {src => highs}/util/HFactorRefactor.cpp | 0 {src => highs}/util/HFactorUtils.cpp | 0 {src => highs}/util/HSet.cpp | 0 {src => highs}/util/HSet.h | 0 {src => highs}/util/HVector.h | 0 {src => highs}/util/HVectorBase.cpp | 0 {src => highs}/util/HVectorBase.h | 0 {src => highs}/util/HighsCDouble.h | 0 {src => highs}/util/HighsComponent.h | 0 {src => highs}/util/HighsDataStack.h | 0 {src => highs}/util/HighsDisjointSets.h | 0 {src => highs}/util/HighsHash.cpp | 0 {src => highs}/util/HighsHash.h | 0 {src => highs}/util/HighsHashTree.h | 0 {src => highs}/util/HighsInt.h | 0 {src => highs}/util/HighsIntegers.h | 0 {src => highs}/util/HighsLinearSumBounds.cpp | 0 {src => highs}/util/HighsLinearSumBounds.h | 0 {src => highs}/util/HighsMatrixPic.cpp | 0 {src => highs}/util/HighsMatrixPic.h | 0 {src => highs}/util/HighsMatrixSlice.h | 0 {src => highs}/util/HighsMatrixUtils.cpp | 0 {src => highs}/util/HighsMatrixUtils.h | 0 {src => highs}/util/HighsMemoryAllocation.h | 0 {src => highs}/util/HighsRandom.h | 0 {src => highs}/util/HighsRbTree.h | 0 {src => highs}/util/HighsSort.cpp | 0 {src => highs}/util/HighsSort.h | 0 {src => highs}/util/HighsSparseMatrix.cpp | 0 {src => highs}/util/HighsSparseMatrix.h | 0 {src => highs}/util/HighsSparseVectorSum.h | 0 {src => highs}/util/HighsSplay.h | 0 {src => highs}/util/HighsTimer.h | 0 {src => highs}/util/HighsUtils.cpp | 0 {src => highs}/util/HighsUtils.h | 0 {src => highs}/util/stringutil.cpp | 0 {src => highs}/util/stringutil.h | 0 meson.build | 4 +- nuget/Highs.csproj | 2 +- pyproject.toml | 18 +- src/test/DevKkt.cpp | 469 ---------- src/test/DevKkt.h | 143 --- src/test/KktCh2.cpp | 305 ------- src/test/KktCh2.h | 79 -- 449 files changed, 549 insertions(+), 1565 deletions(-) rename {src => highs}/CMakeLists.txt (98%) rename {src => highs}/HConfig.h.bazel.in (100%) rename {src => highs}/HConfig.h.in (100%) rename {src => highs}/HConfig.h.meson.in (100%) rename {src => highs}/Highs.h (100%) rename {src => highs}/highs_bindings.cpp (100%) rename {src => highs}/highspy/__init__.py (100%) rename {src => highs}/highspy/__init__.pyi (100%) rename {src => highs}/highspy/_core/__init__.pyi (100%) rename {src => highs}/highspy/_core/cb.pyi (100%) rename {src => highs}/highspy/_core/simplex_constants.pyi (100%) rename {src => highs}/highspy/highs.py (100%) rename {src => highs}/interfaces/highs_c_api.cpp (100%) rename {src => highs}/interfaces/highs_c_api.h (100%) rename {src => highs}/interfaces/highs_csharp_api.cs (100%) rename {src => highs}/interfaces/highs_fortran_api.f90 (100%) rename {src => highs}/io/Filereader.cpp (100%) rename {src => highs}/io/Filereader.h (100%) rename {src => highs}/io/FilereaderEms.cpp (100%) rename {src => highs}/io/FilereaderEms.h (100%) rename {src => highs}/io/FilereaderLp.cpp (100%) rename {src => highs}/io/FilereaderLp.h (100%) rename {src => highs}/io/FilereaderMps.cpp (100%) rename {src => highs}/io/FilereaderMps.h (100%) rename {src => highs}/io/HMPSIO.cpp (100%) rename {src => highs}/io/HMPSIO.h (100%) rename {src => highs}/io/HMpsFF.cpp (100%) rename {src => highs}/io/HMpsFF.h (100%) rename {src => highs}/io/HighsIO.cpp (100%) rename {src => highs}/io/HighsIO.h (100%) rename {src => highs}/io/LoadOptions.cpp (100%) rename {src => highs}/io/LoadOptions.h (100%) rename {src => highs}/ipm/IpxSolution.h (100%) rename {src => highs}/ipm/IpxWrapper.cpp (100%) rename {src => highs}/ipm/IpxWrapper.h (100%) rename {src => highs}/ipm/basiclu/basiclu.h (100%) rename {src => highs}/ipm/basiclu/basiclu_factorize.c (100%) rename {src => highs}/ipm/basiclu/basiclu_factorize.h (100%) rename {src => highs}/ipm/basiclu/basiclu_get_factors.c (100%) rename {src => highs}/ipm/basiclu/basiclu_get_factors.h (100%) rename {src => highs}/ipm/basiclu/basiclu_initialize.c (100%) rename {src => highs}/ipm/basiclu/basiclu_initialize.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_factorize.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_free.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_get_factors.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_initialize.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_solve_dense.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_solve_for_update.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_solve_sparse.h (100%) rename {src => highs}/ipm/basiclu/basiclu_obj_update.h (100%) rename {src => highs}/ipm/basiclu/basiclu_object.c (100%) rename {src => highs}/ipm/basiclu/basiclu_object.h (100%) rename {src => highs}/ipm/basiclu/basiclu_solve_dense.c (100%) rename {src => highs}/ipm/basiclu/basiclu_solve_dense.h (100%) rename {src => highs}/ipm/basiclu/basiclu_solve_for_update.c (100%) rename {src => highs}/ipm/basiclu/basiclu_solve_for_update.h (100%) rename {src => highs}/ipm/basiclu/basiclu_solve_sparse.c (100%) rename {src => highs}/ipm/basiclu/basiclu_solve_sparse.h (100%) rename {src => highs}/ipm/basiclu/basiclu_update.c (100%) rename {src => highs}/ipm/basiclu/basiclu_update.h (100%) rename {src => highs}/ipm/basiclu/lu_build_factors.c (100%) rename {src => highs}/ipm/basiclu/lu_condest.c (100%) rename {src => highs}/ipm/basiclu/lu_def.h (100%) rename {src => highs}/ipm/basiclu/lu_dfs.c (100%) rename {src => highs}/ipm/basiclu/lu_factorize_bump.c (100%) rename {src => highs}/ipm/basiclu/lu_file.c (100%) rename {src => highs}/ipm/basiclu/lu_file.h (100%) rename {src => highs}/ipm/basiclu/lu_garbage_perm.c (100%) rename {src => highs}/ipm/basiclu/lu_initialize.c (100%) rename {src => highs}/ipm/basiclu/lu_internal.c (100%) rename {src => highs}/ipm/basiclu/lu_internal.h (100%) rename {src => highs}/ipm/basiclu/lu_list.h (100%) rename {src => highs}/ipm/basiclu/lu_markowitz.c (100%) rename {src => highs}/ipm/basiclu/lu_matrix_norm.c (100%) rename {src => highs}/ipm/basiclu/lu_pivot.c (100%) rename {src => highs}/ipm/basiclu/lu_residual_test.c (100%) rename {src => highs}/ipm/basiclu/lu_setup_bump.c (100%) rename {src => highs}/ipm/basiclu/lu_singletons.c (100%) rename {src => highs}/ipm/basiclu/lu_solve_dense.c (100%) rename {src => highs}/ipm/basiclu/lu_solve_for_update.c (100%) rename {src => highs}/ipm/basiclu/lu_solve_sparse.c (100%) rename {src => highs}/ipm/basiclu/lu_solve_symbolic.c (100%) rename {src => highs}/ipm/basiclu/lu_solve_triangular.c (100%) rename {src => highs}/ipm/basiclu/lu_update.c (100%) rename {src => highs}/ipm/ipx/basiclu_kernel.cc (100%) rename {src => highs}/ipm/ipx/basiclu_kernel.h (100%) rename {src => highs}/ipm/ipx/basiclu_wrapper.cc (100%) rename {src => highs}/ipm/ipx/basiclu_wrapper.h (100%) rename {src => highs}/ipm/ipx/basis.cc (100%) rename {src => highs}/ipm/ipx/basis.h (100%) rename {src => highs}/ipm/ipx/conjugate_residuals.cc (100%) rename {src => highs}/ipm/ipx/conjugate_residuals.h (100%) rename {src => highs}/ipm/ipx/control.cc (100%) rename {src => highs}/ipm/ipx/control.h (100%) rename {src => highs}/ipm/ipx/crossover.cc (100%) rename {src => highs}/ipm/ipx/crossover.h (100%) rename {src => highs}/ipm/ipx/diagonal_precond.cc (100%) rename {src => highs}/ipm/ipx/diagonal_precond.h (100%) rename {src => highs}/ipm/ipx/forrest_tomlin.cc (100%) rename {src => highs}/ipm/ipx/forrest_tomlin.h (100%) rename {src => highs}/ipm/ipx/guess_basis.cc (100%) rename {src => highs}/ipm/ipx/guess_basis.h (100%) rename {src => highs}/ipm/ipx/indexed_vector.cc (100%) rename {src => highs}/ipm/ipx/indexed_vector.h (100%) rename {src => highs}/ipm/ipx/info.cc (100%) rename {src => highs}/ipm/ipx/info.h (100%) rename {src => highs}/ipm/ipx/ipm.cc (100%) rename {src => highs}/ipm/ipx/ipm.h (100%) rename {src => highs}/ipm/ipx/ipx_c.cc (100%) rename {src => highs}/ipm/ipx/ipx_c.h (96%) rename {src => highs}/ipm/ipx/ipx_config.h (100%) rename {src => highs}/ipm/ipx/ipx_info.h (100%) rename {src => highs}/ipm/ipx/ipx_internal.h (100%) rename {src => highs}/ipm/ipx/ipx_parameters.h (100%) rename {src => highs}/ipm/ipx/ipx_status.h (100%) rename {src => highs}/ipm/ipx/iterate.cc (100%) rename {src => highs}/ipm/ipx/iterate.h (100%) rename {src => highs}/ipm/ipx/kkt_solver.cc (100%) rename {src => highs}/ipm/ipx/kkt_solver.h (100%) rename {src => highs}/ipm/ipx/kkt_solver_basis.cc (100%) rename {src => highs}/ipm/ipx/kkt_solver_basis.h (100%) rename {src => highs}/ipm/ipx/kkt_solver_diag.cc (100%) rename {src => highs}/ipm/ipx/kkt_solver_diag.h (100%) rename {src => highs}/ipm/ipx/linear_operator.cc (100%) rename {src => highs}/ipm/ipx/linear_operator.h (100%) rename {src => highs}/ipm/ipx/lp_solver.cc (100%) rename {src => highs}/ipm/ipx/lp_solver.h (100%) rename {src => highs}/ipm/ipx/lu_factorization.cc (100%) rename {src => highs}/ipm/ipx/lu_factorization.h (100%) rename {src => highs}/ipm/ipx/lu_update.cc (100%) rename {src => highs}/ipm/ipx/lu_update.h (100%) rename {src => highs}/ipm/ipx/maxvolume.cc (100%) rename {src => highs}/ipm/ipx/maxvolume.h (100%) rename {src => highs}/ipm/ipx/model.cc (100%) rename {src => highs}/ipm/ipx/model.h (100%) rename {src => highs}/ipm/ipx/multistream.h (100%) rename {src => highs}/ipm/ipx/normal_matrix.cc (100%) rename {src => highs}/ipm/ipx/normal_matrix.h (100%) rename {src => highs}/ipm/ipx/power_method.h (100%) rename {src => highs}/ipm/ipx/sparse_matrix.cc (100%) rename {src => highs}/ipm/ipx/sparse_matrix.h (100%) rename {src => highs}/ipm/ipx/sparse_utils.cc (100%) rename {src => highs}/ipm/ipx/sparse_utils.h (100%) rename {src => highs}/ipm/ipx/splitted_normal_matrix.cc (100%) rename {src => highs}/ipm/ipx/splitted_normal_matrix.h (100%) rename {src => highs}/ipm/ipx/starting_basis.cc (100%) rename {src => highs}/ipm/ipx/starting_basis.h (100%) rename {src => highs}/ipm/ipx/symbolic_invert.cc (100%) rename {src => highs}/ipm/ipx/symbolic_invert.h (100%) rename {src => highs}/ipm/ipx/timer.cc (100%) rename {src => highs}/ipm/ipx/timer.h (100%) rename {src => highs}/ipm/ipx/utils.cc (100%) rename {src => highs}/ipm/ipx/utils.h (100%) rename {src => highs}/lp_data/HConst.h (100%) rename {src => highs}/lp_data/HStruct.h (100%) rename {src => highs}/lp_data/Highs.cpp (100%) rename {src => highs}/lp_data/HighsAnalysis.h (100%) rename {src => highs}/lp_data/HighsCallback.cpp (100%) rename {src => highs}/lp_data/HighsCallback.h (100%) rename {src => highs}/lp_data/HighsCallbackStruct.h (100%) rename {src => highs}/lp_data/HighsDebug.cpp (100%) rename {src => highs}/lp_data/HighsDebug.h (100%) rename {src => highs}/lp_data/HighsDeprecated.cpp (100%) rename {src => highs}/lp_data/HighsIis.cpp (100%) rename {src => highs}/lp_data/HighsIis.h (100%) rename {src => highs}/lp_data/HighsInfo.cpp (100%) rename {src => highs}/lp_data/HighsInfo.h (100%) rename {src => highs}/lp_data/HighsInfoDebug.cpp (100%) rename {src => highs}/lp_data/HighsInfoDebug.h (100%) rename {src => highs}/lp_data/HighsInterface.cpp (100%) rename {src => highs}/lp_data/HighsLp.cpp (100%) rename {src => highs}/lp_data/HighsLp.h (100%) rename {src => highs}/lp_data/HighsLpSolverObject.h (100%) rename {src => highs}/lp_data/HighsLpUtils.cpp (100%) rename {src => highs}/lp_data/HighsLpUtils.h (100%) rename {src => highs}/lp_data/HighsModelUtils.cpp (100%) rename {src => highs}/lp_data/HighsModelUtils.h (100%) rename {src => highs}/lp_data/HighsOptions.cpp (100%) rename {src => highs}/lp_data/HighsOptions.h (100%) rename {src => highs}/lp_data/HighsRanging.cpp (100%) rename {src => highs}/lp_data/HighsRanging.h (100%) rename {src => highs}/lp_data/HighsSolution.cpp (100%) rename {src => highs}/lp_data/HighsSolution.h (100%) rename {src => highs}/lp_data/HighsSolutionDebug.cpp (100%) rename {src => highs}/lp_data/HighsSolutionDebug.h (100%) rename {src => highs}/lp_data/HighsSolve.cpp (100%) rename {src => highs}/lp_data/HighsSolve.h (100%) rename {src => highs}/lp_data/HighsStatus.cpp (100%) rename {src => highs}/lp_data/HighsStatus.h (100%) rename {src => highs}/meson.build (100%) rename {src => highs}/mip/HighsCliqueTable.cpp (100%) rename {src => highs}/mip/HighsCliqueTable.h (100%) rename {src => highs}/mip/HighsConflictPool.cpp (100%) rename {src => highs}/mip/HighsConflictPool.h (100%) rename {src => highs}/mip/HighsCutGeneration.cpp (100%) rename {src => highs}/mip/HighsCutGeneration.h (100%) rename {src => highs}/mip/HighsCutPool.cpp (100%) rename {src => highs}/mip/HighsCutPool.h (100%) rename {src => highs}/mip/HighsDebugSol.cpp (100%) rename {src => highs}/mip/HighsDebugSol.h (100%) rename {src => highs}/mip/HighsDomain.cpp (100%) rename {src => highs}/mip/HighsDomain.h (100%) rename {src => highs}/mip/HighsDomainChange.h (100%) rename {src => highs}/mip/HighsDynamicRowMatrix.cpp (100%) rename {src => highs}/mip/HighsDynamicRowMatrix.h (100%) rename {src => highs}/mip/HighsGFkSolve.cpp (100%) rename {src => highs}/mip/HighsGFkSolve.h (100%) rename {src => highs}/mip/HighsImplications.cpp (100%) rename {src => highs}/mip/HighsImplications.h (100%) rename {src => highs}/mip/HighsLpAggregator.cpp (100%) rename {src => highs}/mip/HighsLpAggregator.h (100%) rename {src => highs}/mip/HighsLpRelaxation.cpp (100%) rename {src => highs}/mip/HighsLpRelaxation.h (100%) rename {src => highs}/mip/HighsMipAnalysis.cpp (100%) rename {src => highs}/mip/HighsMipAnalysis.h (100%) rename {src => highs}/mip/HighsMipSolver.cpp (100%) rename {src => highs}/mip/HighsMipSolver.h (100%) rename {src => highs}/mip/HighsMipSolverData.cpp (100%) rename {src => highs}/mip/HighsMipSolverData.h (100%) rename {src => highs}/mip/HighsModkSeparator.cpp (100%) rename {src => highs}/mip/HighsModkSeparator.h (100%) rename {src => highs}/mip/HighsNodeQueue.cpp (100%) rename {src => highs}/mip/HighsNodeQueue.h (100%) rename {src => highs}/mip/HighsObjectiveFunction.cpp (100%) rename {src => highs}/mip/HighsObjectiveFunction.h (100%) rename {src => highs}/mip/HighsPathSeparator.cpp (100%) rename {src => highs}/mip/HighsPathSeparator.h (100%) rename {src => highs}/mip/HighsPrimalHeuristics.cpp (100%) rename {src => highs}/mip/HighsPrimalHeuristics.h (100%) rename {src => highs}/mip/HighsPseudocost.cpp (100%) rename {src => highs}/mip/HighsPseudocost.h (100%) rename {src => highs}/mip/HighsRedcostFixing.cpp (100%) rename {src => highs}/mip/HighsRedcostFixing.h (100%) rename {src => highs}/mip/HighsSearch.cpp (100%) rename {src => highs}/mip/HighsSearch.h (100%) rename {src => highs}/mip/HighsSeparation.cpp (100%) rename {src => highs}/mip/HighsSeparation.h (100%) rename {src => highs}/mip/HighsSeparator.cpp (100%) rename {src => highs}/mip/HighsSeparator.h (100%) rename {src => highs}/mip/HighsTableauSeparator.cpp (100%) rename {src => highs}/mip/HighsTableauSeparator.h (100%) rename {src => highs}/mip/HighsTransformedLp.cpp (100%) rename {src => highs}/mip/HighsTransformedLp.h (100%) rename {src => highs}/mip/MipTimer.h (100%) rename {src => highs}/model/HighsHessian.cpp (100%) rename {src => highs}/model/HighsHessian.h (100%) rename {src => highs}/model/HighsHessianUtils.cpp (100%) rename {src => highs}/model/HighsHessianUtils.h (100%) rename {src => highs}/model/HighsModel.cpp (100%) rename {src => highs}/model/HighsModel.h (100%) rename {src => highs}/parallel/HighsBinarySemaphore.h (100%) rename {src => highs}/parallel/HighsCacheAlign.h (100%) rename {src => highs}/parallel/HighsCombinable.h (100%) rename {src => highs}/parallel/HighsMutex.h (100%) rename {src => highs}/parallel/HighsParallel.h (100%) rename {src => highs}/parallel/HighsRaceTimer.h (100%) rename {src => highs}/parallel/HighsSchedulerConstants.h (100%) rename {src => highs}/parallel/HighsSpinMutex.h (100%) rename {src => highs}/parallel/HighsSplitDeque.h (100%) rename {src => highs}/parallel/HighsTask.h (100%) rename {src => highs}/parallel/HighsTaskExecutor.cpp (100%) rename {src => highs}/parallel/HighsTaskExecutor.h (100%) rename {src => highs}/pdlp/CupdlpWrapper.cpp (100%) rename {src => highs}/pdlp/CupdlpWrapper.h (100%) rename {src => highs}/pdlp/README.md (100%) rename {src => highs}/pdlp/cupdlp/Diff (100%) rename {src => highs}/pdlp/cupdlp/Meld (100%) rename {src => highs}/pdlp/cupdlp/Merge (100%) rename {src => highs}/pdlp/cupdlp/README.md (82%) rename {src => highs}/pdlp/cupdlp/cuda/CMakeLists.txt (100%) rename {src => highs}/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu (100%) rename {src => highs}/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh (100%) rename {src => highs}/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu (100%) rename {src => highs}/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh (100%) rename {src => highs}/pdlp/cupdlp/cuda/test_cublas.c (100%) rename {src => highs}/pdlp/cupdlp/cuda/test_cuda_linalg.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_cs.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_cs.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_defs.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_linalg.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_linalg.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_proj.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_proj.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_restart.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_restart.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_scaling.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_scaling.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_solver.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_solver.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_step.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_step.h (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_utils.c (100%) rename {src => highs}/pdlp/cupdlp/cupdlp_utils.h (100%) rename {src => highs}/pdlp/cupdlp/glbopts.h (100%) rename {src => highs}/presolve/HPresolve.cpp (100%) rename {src => highs}/presolve/HPresolve.h (100%) rename {src => highs}/presolve/HPresolveAnalysis.cpp (100%) rename {src => highs}/presolve/HPresolveAnalysis.h (100%) rename {src => highs}/presolve/HighsPostsolveStack.cpp (100%) rename {src => highs}/presolve/HighsPostsolveStack.h (100%) rename {src => highs}/presolve/HighsSymmetry.cpp (100%) rename {src => highs}/presolve/HighsSymmetry.h (100%) rename {src => highs}/presolve/ICrash.cpp (100%) rename {src => highs}/presolve/ICrash.h (100%) rename {src => highs}/presolve/ICrashUtil.cpp (100%) rename {src => highs}/presolve/ICrashUtil.h (100%) rename {src => highs}/presolve/ICrashX.cpp (100%) rename {src => highs}/presolve/ICrashX.h (100%) rename {src => highs}/presolve/PresolveComponent.cpp (100%) rename {src => highs}/presolve/PresolveComponent.h (100%) rename {src => highs}/qpsolver/a_asm.cpp (100%) rename {src => highs}/qpsolver/a_asm.hpp (100%) rename {src => highs}/qpsolver/a_quass.cpp (100%) rename {src => highs}/qpsolver/a_quass.hpp (100%) rename {src => highs}/qpsolver/basis.cpp (100%) rename {src => highs}/qpsolver/basis.hpp (100%) rename {src => highs}/qpsolver/crashsolution.hpp (100%) rename {src => highs}/qpsolver/dantzigpricing.hpp (100%) rename {src => highs}/qpsolver/devexharrispricing.hpp (100%) rename {src => highs}/qpsolver/devexpricing.hpp (100%) rename {src => highs}/qpsolver/eventhandler.hpp (100%) rename {src => highs}/qpsolver/factor.hpp (100%) rename {src => highs}/qpsolver/feasibility_bounded.hpp (100%) rename {src => highs}/qpsolver/feasibility_highs.hpp (100%) rename {src => highs}/qpsolver/gradient.hpp (100%) rename {src => highs}/qpsolver/instance.hpp (100%) rename {src => highs}/qpsolver/matrix.hpp (100%) rename {src => highs}/qpsolver/perturbation.cpp (100%) rename {src => highs}/qpsolver/perturbation.hpp (100%) rename {src => highs}/qpsolver/pricing.hpp (100%) rename {src => highs}/qpsolver/qpconst.hpp (100%) rename {src => highs}/qpsolver/qpvector.hpp (100%) rename {src => highs}/qpsolver/quass.cpp (100%) rename {src => highs}/qpsolver/quass.hpp (100%) rename {src => highs}/qpsolver/ratiotest.cpp (100%) rename {src => highs}/qpsolver/ratiotest.hpp (100%) rename {src => highs}/qpsolver/reducedcosts.hpp (100%) rename {src => highs}/qpsolver/reducedgradient.hpp (100%) rename {src => highs}/qpsolver/runtime.hpp (100%) rename {src => highs}/qpsolver/scaling.cpp (100%) rename {src => highs}/qpsolver/scaling.hpp (100%) rename {src => highs}/qpsolver/settings.hpp (100%) rename {src => highs}/qpsolver/snippets.hpp (100%) rename {src => highs}/qpsolver/statistics.hpp (100%) rename {src => highs}/qpsolver/steepestedgepricing.hpp (100%) rename {src => highs}/simplex/HApp.h (100%) rename {src => highs}/simplex/HEkk.cpp (100%) rename {src => highs}/simplex/HEkk.h (100%) rename {src => highs}/simplex/HEkkControl.cpp (100%) rename {src => highs}/simplex/HEkkDebug.cpp (100%) rename {src => highs}/simplex/HEkkDual.cpp (100%) rename {src => highs}/simplex/HEkkDual.h (100%) rename {src => highs}/simplex/HEkkDualMulti.cpp (100%) rename {src => highs}/simplex/HEkkDualRHS.cpp (100%) rename {src => highs}/simplex/HEkkDualRHS.h (100%) rename {src => highs}/simplex/HEkkDualRow.cpp (100%) rename {src => highs}/simplex/HEkkDualRow.h (100%) rename {src => highs}/simplex/HEkkInterface.cpp (100%) rename {src => highs}/simplex/HEkkPrimal.cpp (100%) rename {src => highs}/simplex/HEkkPrimal.h (100%) rename {src => highs}/simplex/HSimplex.cpp (100%) rename {src => highs}/simplex/HSimplex.h (100%) rename {src => highs}/simplex/HSimplexDebug.cpp (100%) rename {src => highs}/simplex/HSimplexDebug.h (100%) rename {src => highs}/simplex/HSimplexNla.cpp (100%) rename {src => highs}/simplex/HSimplexNla.h (100%) rename {src => highs}/simplex/HSimplexNlaDebug.cpp (100%) rename {src => highs}/simplex/HSimplexNlaFreeze.cpp (100%) rename {src => highs}/simplex/HSimplexNlaProductForm.cpp (100%) rename {src => highs}/simplex/HSimplexReport.cpp (100%) rename {src => highs}/simplex/HSimplexReport.h (100%) rename {src => highs}/simplex/HighsSimplexAnalysis.cpp (100%) rename {src => highs}/simplex/HighsSimplexAnalysis.h (100%) rename {src => highs}/simplex/SimplexConst.h (100%) rename {src => highs}/simplex/SimplexStruct.h (100%) rename {src => highs}/simplex/SimplexTimer.h (100%) rename {src => highs}/util/FactorTimer.h (100%) rename {src => highs}/util/HFactor.cpp (100%) rename {src => highs}/util/HFactor.h (100%) rename {src => highs}/util/HFactorConst.h (100%) rename {src => highs}/util/HFactorDebug.cpp (100%) rename {src => highs}/util/HFactorDebug.h (100%) rename {src => highs}/util/HFactorExtend.cpp (100%) rename {src => highs}/util/HFactorRefactor.cpp (100%) rename {src => highs}/util/HFactorUtils.cpp (100%) rename {src => highs}/util/HSet.cpp (100%) rename {src => highs}/util/HSet.h (100%) rename {src => highs}/util/HVector.h (100%) rename {src => highs}/util/HVectorBase.cpp (100%) rename {src => highs}/util/HVectorBase.h (100%) rename {src => highs}/util/HighsCDouble.h (100%) rename {src => highs}/util/HighsComponent.h (100%) rename {src => highs}/util/HighsDataStack.h (100%) rename {src => highs}/util/HighsDisjointSets.h (100%) rename {src => highs}/util/HighsHash.cpp (100%) rename {src => highs}/util/HighsHash.h (100%) rename {src => highs}/util/HighsHashTree.h (100%) rename {src => highs}/util/HighsInt.h (100%) rename {src => highs}/util/HighsIntegers.h (100%) rename {src => highs}/util/HighsLinearSumBounds.cpp (100%) rename {src => highs}/util/HighsLinearSumBounds.h (100%) rename {src => highs}/util/HighsMatrixPic.cpp (100%) rename {src => highs}/util/HighsMatrixPic.h (100%) rename {src => highs}/util/HighsMatrixSlice.h (100%) rename {src => highs}/util/HighsMatrixUtils.cpp (100%) rename {src => highs}/util/HighsMatrixUtils.h (100%) rename {src => highs}/util/HighsMemoryAllocation.h (100%) rename {src => highs}/util/HighsRandom.h (100%) rename {src => highs}/util/HighsRbTree.h (100%) rename {src => highs}/util/HighsSort.cpp (100%) rename {src => highs}/util/HighsSort.h (100%) rename {src => highs}/util/HighsSparseMatrix.cpp (100%) rename {src => highs}/util/HighsSparseMatrix.h (100%) rename {src => highs}/util/HighsSparseVectorSum.h (100%) rename {src => highs}/util/HighsSplay.h (100%) rename {src => highs}/util/HighsTimer.h (100%) rename {src => highs}/util/HighsUtils.cpp (100%) rename {src => highs}/util/HighsUtils.h (100%) rename {src => highs}/util/stringutil.cpp (100%) rename {src => highs}/util/stringutil.h (100%) delete mode 100644 src/test/DevKkt.cpp delete mode 100644 src/test/DevKkt.h delete mode 100644 src/test/KktCh2.cpp delete mode 100644 src/test/KktCh2.h diff --git a/.github/workflows/build-meson.yml b/.github/workflows/build-meson.yml index f1bef1f5eb..267e0c606d 100644 --- a/.github/workflows/build-meson.yml +++ b/.github/workflows/build-meson.yml @@ -45,6 +45,6 @@ jobs: # run: | # meson configure bbdir -Dwith_pybind11=True # meson compile -C bbdir - # LD_LIBRARY_PATH=$(pwd)/bbdir/src \ + # LD_LIBRARY_PATH=$(pwd)/bbdir/highs \ # PYTHONPATH=$(pwd)/bbdir \ # python examples/call_highs_from_python.py diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 8e368317c8..c14b477ebe 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -11,7 +11,7 @@ jobs: - uses: DoozyX/clang-format-lint-action@v0.18 with: source: - 'app/ src/Highs.h ./src/lp_data ./src/mip ./src/model ./src/simplex ./src/presolve ./src/simplex ./src/util ./src/test ./src/qpsolver' - # ./src/test ./interfaces' + 'app/ highs/Highs.h ./highs/lp_data ./highs/mip ./highs/model ./highs/simplex ./highs/presolve ./highs/simplex ./highs/util ./highs/test ./highs/qpsolver' + # ./highs/test ./interfaces' extensions: 'h,cpp,c' clangFormatVersion: 18 diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 3a3ca6b601..d60ccde3e0 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -45,7 +45,7 @@ jobs: lcov --remove cov.info "extern/zstr/*" -o cov.info lcov --remove cov.info "extern/catch*" -o cov.info lcov --remove cov.info "app/CLI11*" -o cov.info - lcov --remove cov.info "src/test*" -o cov.info + lcov --remove cov.info "highs/test*" -o cov.info lcov --list cov.info mv cov.info coverage.info diff --git a/.gitignore b/.gitignore index bf13a09a8d..55dfa5f1f2 100644 --- a/.gitignore +++ b/.gitignore @@ -250,7 +250,7 @@ cov.info #SCIP interface lpi_highs.cpp -src/highspy/highs_bindings.*.so +highs/highspy/highs_bindings.*.so # Model written with HiGHSDEV=on HighsRunModel.mps diff --git a/BUILD.bazel b/BUILD.bazel index a1d9c0be45..5272ff401e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -3,7 +3,7 @@ load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary", "cc_test") copy_file( name = "highs-config", - src = "src/HConfig.h.bazel.in", + src = "highs/HConfig.h.bazel.in", out = "HConfig.h", visibility = ["//visibility:public"], ) @@ -18,27 +18,27 @@ cc_library( name = "highs", srcs = glob([ "extern/filereaderlp/*.cpp", - "src/interfaces/highs_c_api.cpp", - "src/io/*.cpp", - "src/ipm/*.cpp", - "src/ipm/ipx/*.cc", - "src/ipm/basiclu/*.c", - "src/lp_data/*.cpp", - "src/mip/*.cpp", - "src/model/*.cpp", - "src/parallel/*.cpp", - "src/pdlp/*.cpp", - "src/pdlp/cupdlp/*.c", - "src/presolve/*.cpp", - "src/qpsolver/*.cpp", - "src/simplex/*.cpp", - "src/test/*.cpp", - "src/util/*.cpp", + "highs/interfaces/highs_c_api.cpp", + "highs/io/*.cpp", + "highs/ipm/*.cpp", + "highs/ipm/ipx/*.cc", + "highs/ipm/basiclu/*.c", + "highs/lp_data/*.cpp", + "highs/mip/*.cpp", + "highs/model/*.cpp", + "highs/parallel/*.cpp", + "highs/pdlp/*.cpp", + "highs/pdlp/cupdlp/*.c", + "highs/presolve/*.cpp", + "highs/qpsolver/*.cpp", + "highs/simplex/*.cpp", + "highs/test/*.cpp", + "highs/util/*.cpp", ]), hdrs = glob([ "**/*.h", - "src/qpsolver/*.hpp", - "src/Highs.h", + "highs/qpsolver/*.hpp", + "highs/Highs.h", "extern/filereaderlp/*.hpp", "extern/zstr/*.hpp", ]), @@ -50,19 +50,19 @@ cc_library( "extern", # "extern/filereaderlp", # "extern/zstr", - "src", - # "src/ipm", - # "src/ipm/ipx", - # "src/ipm/basiclu", - # "src/lp_data", - # "src/mip", - # "src/model", - # "src/parallel", - # "src/presolve", - # "src/qpsolver", - # "src/simplex", - # "src/test", - # "src/util", + "highs", + # "highs/ipm", + # "highs/ipm/ipx", + # "highs/ipm/basiclu", + # "highs/lp_data", + # "highs/mip", + # "highs/model", + # "highs/parallel", + # "highs/presolve", + # "highs/qpsolver", + # "highs/simplex", + # "highs/test", + # "highs/util", "bazel-bin", ], linkopts = ["-lpthread"], diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d4b36d18d..b06adaae35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -521,7 +521,7 @@ set(CPACK_PACKAGE_VENDOR "University of Edinburgh") # string(TIMESTAMP TODAY "%Y-%m-%d") # message(STATUS "Compilation date: " ${TODAY}) -configure_file(${PROJECT_SOURCE_DIR}/src/HConfig.h.in ${HIGHS_BINARY_DIR}/HConfig.h) +configure_file(${PROJECT_SOURCE_DIR}/highs/HConfig.h.in ${HIGHS_BINARY_DIR}/HConfig.h) if (DEBUG_MEMORY STREQUAL "Address") set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} \ @@ -679,7 +679,7 @@ if(NOT FAST_BUILD) COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --zerocounters COMMAND ${LCOV_PATH} --capture --initial --directory ${CMAKE_BINARY_DIR}/bin --output-file ${CMAKE_BINARY_DIR}/coverage.info COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_CTEST_COMMAND} -LE "(LONG|FAIL)" || true - COMMAND ${LCOV_PATH} --capture --directory ${CMAKE_BINARY_DIR}/bin --directory ${CMAKE_BINARY_DIR}/src --directory ${CMAKE_BINARY_DIR}/app --directory ${CMAKE_BINARY_DIR}/check --output-file ${CMAKE_BINARY_DIR}/coverage.info + COMMAND ${LCOV_PATH} --capture --directory ${CMAKE_BINARY_DIR}/bin --directory ${CMAKE_BINARY_DIR}/highs --directory ${CMAKE_BINARY_DIR}/app --directory ${CMAKE_BINARY_DIR}/check --output-file ${CMAKE_BINARY_DIR}/coverage.info COMMAND ${LCOV_PATH} --remove "*/usr/include/*" --output-file ${CMAKE_BINARY_DIR}/coverage.info.cleaned COMMAND ${GENHTML_PATH} -o ${CMAKE_BINARY_DIR}/coverage ${CMAKE_BINARY_DIR}/coverage.info.cleaned COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/coverage.info.cleaned @@ -693,7 +693,7 @@ if(NOT FAST_BUILD) COMMAND ${LCOV_PATH} --directory ${CMAKE_BINARY_DIR} --zerocounters COMMAND ${LCOV_PATH} --capture --initial --directory ${CMAKE_BINARY_DIR}/bin --output-file ${CMAKE_BINARY_DIR}/coverage.info COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_CTEST_COMMAND} -LE "(LONG|FAIL)" || true - COMMAND ${LCOV_PATH} --capture --directory ${CMAKE_BINARY_DIR}/bin --directory ${CMAKE_BINARY_DIR}/src --directory ${CMAKE_BINARY_DIR}/app --directory ${CMAKE_BINARY_DIR}/check --output-file ${CMAKE_BINARY_DIR}/coverage.info + COMMAND ${LCOV_PATH} --capture --directory ${CMAKE_BINARY_DIR}/bin --directory ${CMAKE_BINARY_DIR}/highs --directory ${CMAKE_BINARY_DIR}/app --directory ${CMAKE_BINARY_DIR}/check --output-file ${CMAKE_BINARY_DIR}/coverage.info VERBATIM WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMENT "Resetting code coverage counters to zero.") @@ -705,19 +705,19 @@ if(NOT FAST_BUILD) ${PROJECT_SOURCE_DIR}/app ${PROJECT_SOURCE_DIR}/extern ${PROJECT_SOURCE_DIR}/extern/zstr - ${PROJECT_SOURCE_DIR}/src - ${PROJECT_SOURCE_DIR}/src/io - ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp - ${PROJECT_SOURCE_DIR}/src/ipm/ipx - ${PROJECT_SOURCE_DIR}/src/ipm/basiclu - ${PROJECT_SOURCE_DIR}/src/lp_data - ${PROJECT_SOURCE_DIR}/src/mip - ${PROJECT_SOURCE_DIR}/src/model - ${PROJECT_SOURCE_DIR}/src/presolve - ${PROJECT_SOURCE_DIR}/src/qpsolver - ${PROJECT_SOURCE_DIR}/src/simplex - ${PROJECT_SOURCE_DIR}/src/test - ${PROJECT_SOURCE_DIR}/src/util) + ${PROJECT_SOURCE_DIR}/highs + ${PROJECT_SOURCE_DIR}/highs/io + ${PROJECT_SOURCE_DIR}/highs/pdlp/cupdlp + ${PROJECT_SOURCE_DIR}/highs/ipm/ipx + ${PROJECT_SOURCE_DIR}/highs/ipm/basiclu + ${PROJECT_SOURCE_DIR}/highs/lp_data + ${PROJECT_SOURCE_DIR}/highs/mip + ${PROJECT_SOURCE_DIR}/highs/model + ${PROJECT_SOURCE_DIR}/highs/presolve + ${PROJECT_SOURCE_DIR}/highs/qpsolver + ${PROJECT_SOURCE_DIR}/highs/simplex + ${PROJECT_SOURCE_DIR}/highs/test + ${PROJECT_SOURCE_DIR}/highs/util) # explicitly switch on colored output for ninja if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") @@ -731,7 +731,7 @@ if(NOT FAST_BUILD) # endif() # Targets - add_subdirectory(src) + add_subdirectory(highs) add_subdirectory(app) if(BUILD_TESTING) enable_testing() diff --git a/README.md b/README.md index f2dda02dda..8c461bc421 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ For a full list of options, see the [options page](https://ergo-code.github.io/H ## Interfaces -There are HiGHS interfaces for C, C#, FORTRAN, and Python in `HiGHS/src/interfaces`, with example driver files in `HiGHS/examples/`. More on language and modelling interfaces can be found at https://ergo-code.github.io/HiGHS/stable/interfaces/other/. +There are HiGHS interfaces for C, C#, FORTRAN, and Python in `HiGHS/highs/interfaces`, with example driver files in `HiGHS/examples/`. More on language and modelling interfaces can be found at https://ergo-code.github.io/HiGHS/stable/interfaces/other/. We are happy to give a reasonable level of support via email sent to highsopt@gmail.com. @@ -213,7 +213,7 @@ The installation can be tested using the small example `HiGHS/examples/call_high The [Google Colab Example Notebook](https://colab.research.google.com/drive/1JmHF53OYfU-0Sp9bzLw-D2TQyRABSjHb?usp=sharing) also demonstrates how to call `highspy`. ### C -The C API is in `HiGHS/src/interfaces/highs_c_api.h`. It is included in the default build. For more details, check out the documentation website https://ergo-code.github.io/HiGHS/. +The C API is in `HiGHS/highs/interfaces/highs_c_api.h`. It is included in the default build. For more details, check out the documentation website https://ergo-code.github.io/HiGHS/. ### CSharp @@ -238,7 +238,7 @@ Details for building locally can be found in `nuget/README.md`. ### Fortran -The Fortran API is in `HiGHS/src/interfaces/highs_fortran_api.f90`. It is *not* included in the default build. For more details, check out the documentation website https://ergo-code.github.io/HiGHS/. +The Fortran API is in `HiGHS/highs/interfaces/highs_fortran_api.f90`. It is *not* included in the default build. For more details, check out the documentation website https://ergo-code.github.io/HiGHS/. ## Reference diff --git a/build_webdemo.sh b/build_webdemo.sh index 12e7682232..9deb6fb360 100644 --- a/build_webdemo.sh +++ b/build_webdemo.sh @@ -14,7 +14,7 @@ # This will create the file `build_webdemo/bin/highs.html`. For fast edit # iterations run -# find src app | entr -rs 'make -C build_webdemo highs; echo' +# find highs app | entr -rs 'make -C build_webdemo highs; echo' # This will rebuild `highs.html` every time a source file is modified (e.g. # from Visual Studio Code). diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 7d2b5f4d83..d109de6bbe 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -9,7 +9,7 @@ if (FORTRAN AND NOT BUILD_EXTRA_UNIT_ONLY) target_link_libraries(fortrantest highs FortranHighs) endif() target_include_directories(fortrantest PUBLIC - ${PROJECT_SOURCE_DIR}/src/interfaces + ${PROJECT_SOURCE_DIR}/highs/interfaces ${PROJECT_SOURCE_DIR}/check) endif() @@ -120,7 +120,7 @@ if ((NOT FAST_BUILD OR ALL_TESTS) AND NOT (BUILD_EXTRA_UNIT_ONLY)) else() target_link_libraries(unit_tests cudalin ${CUDA_LIBRARY} m) endif() - target_include_directories(unit_tests PRIVATE ${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/cuda) + target_include_directories(unit_tests PRIVATE ${PROJECT_SOURCE_DIR}/highs/pdlp/cupdlp/cuda) set_target_properties(unit_tests PROPERTIES CUDA_SEPARABLE_COMPILATION ON) endif() else() diff --git a/check/pythontest.py b/check/pythontest.py index fd7c32c8db..0a1328f2c0 100644 --- a/check/pythontest.py +++ b/check/pythontest.py @@ -1,4 +1,4 @@ -execfile("../src/interfaces/highs_lp_solver.py") +execfile("../highs/interfaces/highs_lp_solver.py") cc = (1.0, -2.0) cl = (0.0, 0.0) diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index cc74a45121..addd15dd4d 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -4,7 +4,7 @@ endif() # set(CMAKE_VERBOSE_MAKEFILE ON) # Main Target -add_subdirectory(src) +add_subdirectory(highs) # ALIAS # add_library(${PROJECT_NAMESPACE}::highs ALIAS highs) @@ -16,7 +16,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Includes target_include_directories(highs INTERFACE $ - $ + $ $ $ $ @@ -50,36 +50,20 @@ install(FILES ${PROJECT_BINARY_DIR}/highs_export.h string (TOLOWER ${PROJECT_NAME} lower) -if (NOT CUPDLP_GPU) - install(TARGETS highs - EXPORT ${lower}-targets - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/highs - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/highs) - - if (NOT HIGHS_COVERAGE) - # Add library targets to the build-tree export set - export(TARGETS highs - NAMESPACE ${PROJECT_NAMESPACE}::highs - FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake") - endif() -else() - install(TARGETS highs cudalin +install(TARGETS highs + EXPORT ${lower}-targets + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +if (CUPDLP_GPU) + install(TARGETS cudalin EXPORT ${lower}-targets - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/highs + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/highs) - - if (NOT HIGHS_COVERAGE) - # Add library targets to the build-tree export set - export(TARGETS highs cudalin - NAMESPACE ${PROJECT_NAMESPACE}::highs - FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake") - endif() + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() if (NOT HIGHS_COVERAGE) @@ -87,10 +71,6 @@ if (NOT HIGHS_COVERAGE) NAMESPACE ${PROJECT_NAMESPACE}:: FILE highs-targets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${lower}) - # install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake" - # DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/highs) - # install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" - # DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() diff --git a/cmake/dotnet.cmake b/cmake/dotnet.cmake index c3eb96f7a4..f4274bfdc1 100644 --- a/cmake/dotnet.cmake +++ b/cmake/dotnet.cmake @@ -82,7 +82,7 @@ configure_file( @ONLY) file(COPY - ${PROJECT_SOURCE_DIR}/src/interfaces/highs_csharp_api.cs + ${PROJECT_SOURCE_DIR}/highs/interfaces/highs_csharp_api.cs DESTINATION ${DOTNET_PROJECT_DIR}) file(COPY diff --git a/cmake/python-highs.cmake b/cmake/python-highs.cmake index 4a429cb110..6f7b34e8fb 100644 --- a/cmake/python-highs.cmake +++ b/cmake/python-highs.cmake @@ -20,7 +20,7 @@ set(headers_python ${highs_headers_python} find_package(Python COMPONENTS Interpreter Development.Module REQUIRED) find_package(pybind11 CONFIG) -python_add_library(_core MODULE src/highs_bindings.cpp WITH_SOABI) +python_add_library(_core MODULE highs/highs_bindings.cpp WITH_SOABI) # Pybind11 # include(FetchContent) diff --git a/cmake/sources-python.cmake b/cmake/sources-python.cmake index 5cb0869206..fb09c0c653 100644 --- a/cmake/sources-python.cmake +++ b/cmake/sources-python.cmake @@ -3,45 +3,45 @@ set(include_dirs_python $ $ $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ $) set(cupdlp_sources_python - src/pdlp/cupdlp/cupdlp_cs.c - src/pdlp/cupdlp/cupdlp_linalg.c - src/pdlp/cupdlp/cupdlp_proj.c - src/pdlp/cupdlp/cupdlp_restart.c - src/pdlp/cupdlp/cupdlp_scaling.c - src/pdlp/cupdlp/cupdlp_solver.c - src/pdlp/cupdlp/cupdlp_step.c - src/pdlp/cupdlp/cupdlp_utils.c) + highs/pdlp/cupdlp/cupdlp_cs.c + highs/pdlp/cupdlp/cupdlp_linalg.c + highs/pdlp/cupdlp/cupdlp_proj.c + highs/pdlp/cupdlp/cupdlp_restart.c + highs/pdlp/cupdlp/cupdlp_scaling.c + highs/pdlp/cupdlp/cupdlp_solver.c + highs/pdlp/cupdlp/cupdlp_step.c + highs/pdlp/cupdlp/cupdlp_utils.c) set(cupdlp_headers_python - src/pdlp/cupdlp/cupdlp_cs.h - src/pdlp/cupdlp/cupdlp_defs.h - src/pdlp/cupdlp/cupdlp_linalg.h - src/pdlp/cupdlp/cupdlp_proj.h - src/pdlp/cupdlp/cupdlp_restart.h - src/pdlp/cupdlp/cupdlp_scaling.h - src/pdlp/cupdlp/cupdlp_solver.h - src/pdlp/cupdlp/cupdlp_step.h - src/pdlp/cupdlp/cupdlp_utils.c) + highs/pdlp/cupdlp/cupdlp_cs.h + highs/pdlp/cupdlp/cupdlp_defs.h + highs/pdlp/cupdlp/cupdlp_linalg.h + highs/pdlp/cupdlp/cupdlp_proj.h + highs/pdlp/cupdlp/cupdlp_restart.h + highs/pdlp/cupdlp/cupdlp_scaling.h + highs/pdlp/cupdlp/cupdlp_solver.h + highs/pdlp/cupdlp/cupdlp_step.h + highs/pdlp/cupdlp/cupdlp_utils.c) set(cuda_sources_python pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu @@ -50,239 +50,239 @@ set(cuda_sources_python pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu) set(basiclu_sources_python - src/ipm/basiclu/basiclu_factorize.c - src/ipm/basiclu/basiclu_get_factors.c - src/ipm/basiclu/basiclu_initialize.c - src/ipm/basiclu/basiclu_object.c - src/ipm/basiclu/basiclu_solve_dense.c - src/ipm/basiclu/basiclu_solve_for_update.c - src/ipm/basiclu/basiclu_solve_sparse.c - src/ipm/basiclu/basiclu_update.c - src/ipm/basiclu/lu_build_factors.c - src/ipm/basiclu/lu_condest.c - src/ipm/basiclu/lu_dfs.c - src/ipm/basiclu/lu_factorize_bump.c - src/ipm/basiclu/lu_file.c - src/ipm/basiclu/lu_garbage_perm.c - src/ipm/basiclu/lu_initialize.c - src/ipm/basiclu/lu_internal.c - src/ipm/basiclu/lu_markowitz.c - src/ipm/basiclu/lu_matrix_norm.c - src/ipm/basiclu/lu_pivot.c - src/ipm/basiclu/lu_residual_test.c - src/ipm/basiclu/lu_setup_bump.c - src/ipm/basiclu/lu_singletons.c - src/ipm/basiclu/lu_solve_dense.c - src/ipm/basiclu/lu_solve_for_update.c - src/ipm/basiclu/lu_solve_sparse.c - src/ipm/basiclu/lu_solve_symbolic.c - src/ipm/basiclu/lu_solve_triangular.c - src/ipm/basiclu/lu_update.c) + highs/ipm/basiclu/basiclu_factorize.c + highs/ipm/basiclu/basiclu_get_factors.c + highs/ipm/basiclu/basiclu_initialize.c + highs/ipm/basiclu/basiclu_object.c + highs/ipm/basiclu/basiclu_solve_dense.c + highs/ipm/basiclu/basiclu_solve_for_update.c + highs/ipm/basiclu/basiclu_solve_sparse.c + highs/ipm/basiclu/basiclu_update.c + highs/ipm/basiclu/lu_build_factors.c + highs/ipm/basiclu/lu_condest.c + highs/ipm/basiclu/lu_dfs.c + highs/ipm/basiclu/lu_factorize_bump.c + highs/ipm/basiclu/lu_file.c + highs/ipm/basiclu/lu_garbage_perm.c + highs/ipm/basiclu/lu_initialize.c + highs/ipm/basiclu/lu_internal.c + highs/ipm/basiclu/lu_markowitz.c + highs/ipm/basiclu/lu_matrix_norm.c + highs/ipm/basiclu/lu_pivot.c + highs/ipm/basiclu/lu_residual_test.c + highs/ipm/basiclu/lu_setup_bump.c + highs/ipm/basiclu/lu_singletons.c + highs/ipm/basiclu/lu_solve_dense.c + highs/ipm/basiclu/lu_solve_for_update.c + highs/ipm/basiclu/lu_solve_sparse.c + highs/ipm/basiclu/lu_solve_symbolic.c + highs/ipm/basiclu/lu_solve_triangular.c + highs/ipm/basiclu/lu_update.c) set(basiclu_headers_python - src/ipm/basiclu/basiclu_factorize.h - src/ipm/basiclu/basiclu_get_factors.h - src/ipm/basiclu/basiclu_initialize.h - src/ipm/basiclu/basiclu_obj_factorize.h - src/ipm/basiclu/basiclu_obj_free.h - src/ipm/basiclu/basiclu_obj_get_factors.h - src/ipm/basiclu/basiclu_obj_initialize.h - src/ipm/basiclu/basiclu_obj_solve_dense.h - src/ipm/basiclu/basiclu_obj_solve_for_update.h - src/ipm/basiclu/basiclu_obj_solve_sparse.h - src/ipm/basiclu/basiclu_obj_update.h - src/ipm/basiclu/basiclu_object.h - src/ipm/basiclu/basiclu_solve_dense.h - src/ipm/basiclu/basiclu_solve_for_update.h - src/ipm/basiclu/basiclu_solve_sparse.h - src/ipm/basiclu/basiclu_update.h - src/ipm/basiclu/basiclu.h - src/ipm/basiclu/lu_def.h - src/ipm/basiclu/lu_file.h - src/ipm/basiclu/lu_internal.h - src/ipm/basiclu/lu_list.h) + highs/ipm/basiclu/basiclu_factorize.h + highs/ipm/basiclu/basiclu_get_factors.h + highs/ipm/basiclu/basiclu_initialize.h + highs/ipm/basiclu/basiclu_obj_factorize.h + highs/ipm/basiclu/basiclu_obj_free.h + highs/ipm/basiclu/basiclu_obj_get_factors.h + highs/ipm/basiclu/basiclu_obj_initialize.h + highs/ipm/basiclu/basiclu_obj_solve_dense.h + highs/ipm/basiclu/basiclu_obj_solve_for_update.h + highs/ipm/basiclu/basiclu_obj_solve_sparse.h + highs/ipm/basiclu/basiclu_obj_update.h + highs/ipm/basiclu/basiclu_object.h + highs/ipm/basiclu/basiclu_solve_dense.h + highs/ipm/basiclu/basiclu_solve_for_update.h + highs/ipm/basiclu/basiclu_solve_sparse.h + highs/ipm/basiclu/basiclu_update.h + highs/ipm/basiclu/basiclu.h + highs/ipm/basiclu/lu_def.h + highs/ipm/basiclu/lu_file.h + highs/ipm/basiclu/lu_internal.h + highs/ipm/basiclu/lu_list.h) set(ipx_sources_python - src/ipm/ipx/basiclu_kernel.cc - src/ipm/ipx/basiclu_wrapper.cc - src/ipm/ipx/basis.cc - src/ipm/ipx/conjugate_residuals.cc - src/ipm/ipx/control.cc - src/ipm/ipx/crossover.cc - src/ipm/ipx/diagonal_precond.cc - src/ipm/ipx/forrest_tomlin.cc - src/ipm/ipx/guess_basis.cc - src/ipm/ipx/indexed_vector.cc - src/ipm/ipx/info.cc - src/ipm/ipx/ipm.cc - src/ipm/ipx/ipx_c.cc - src/ipm/ipx/iterate.cc - src/ipm/ipx/kkt_solver_basis.cc - src/ipm/ipx/kkt_solver_diag.cc - src/ipm/ipx/kkt_solver.cc - src/ipm/ipx/linear_operator.cc - src/ipm/ipx/lp_solver.cc - src/ipm/ipx/lu_factorization.cc - src/ipm/ipx/lu_update.cc - src/ipm/ipx/maxvolume.cc - src/ipm/ipx/model.cc - src/ipm/ipx/normal_matrix.cc - src/ipm/ipx/sparse_matrix.cc - src/ipm/ipx/sparse_utils.cc - src/ipm/ipx/splitted_normal_matrix.cc - src/ipm/ipx/starting_basis.cc - src/ipm/ipx/symbolic_invert.cc - src/ipm/ipx/timer.cc - src/ipm/ipx/utils.cc) + highs/ipm/ipx/basiclu_kernel.cc + highs/ipm/ipx/basiclu_wrapper.cc + highs/ipm/ipx/basis.cc + highs/ipm/ipx/conjugate_residuals.cc + highs/ipm/ipx/control.cc + highs/ipm/ipx/crossover.cc + highs/ipm/ipx/diagonal_precond.cc + highs/ipm/ipx/forrest_tomlin.cc + highs/ipm/ipx/guess_basis.cc + highs/ipm/ipx/indexed_vector.cc + highs/ipm/ipx/info.cc + highs/ipm/ipx/ipm.cc + highs/ipm/ipx/ipx_c.cc + highs/ipm/ipx/iterate.cc + highs/ipm/ipx/kkt_solver_basis.cc + highs/ipm/ipx/kkt_solver_diag.cc + highs/ipm/ipx/kkt_solver.cc + highs/ipm/ipx/linear_operator.cc + highs/ipm/ipx/lp_solver.cc + highs/ipm/ipx/lu_factorization.cc + highs/ipm/ipx/lu_update.cc + highs/ipm/ipx/maxvolume.cc + highs/ipm/ipx/model.cc + highs/ipm/ipx/normal_matrix.cc + highs/ipm/ipx/sparse_matrix.cc + highs/ipm/ipx/sparse_utils.cc + highs/ipm/ipx/splitted_normal_matrix.cc + highs/ipm/ipx/starting_basis.cc + highs/ipm/ipx/symbolic_invert.cc + highs/ipm/ipx/timer.cc + highs/ipm/ipx/utils.cc) set(ipx_headers_python - src/ipm/ipx/basiclu_kernel.h - src/ipm/ipx/basiclu_wrapper.h - src/ipm/ipx/basis.h - src/ipm/ipx/conjugate_residuals.h - src/ipm/ipx/control.h - src/ipm/ipx/crossover.h - src/ipm/ipx/diagonal_precond.h - src/ipm/ipx/forrest_tomlin.h - src/ipm/ipx/guess_basis.h - src/ipm/ipx/indexed_vector.h - src/ipm/ipx/info.h - src/ipm/ipx/ipm.h - src/ipm/ipx/ipx_c.h - src/ipm/ipx/ipx_config.h - src/ipm/ipx/ipx_info.h - src/ipm/ipx/ipx_internal.h - src/ipm/ipx/ipx_parameters.h - src/ipm/ipx/ipx_status.h - src/ipm/ipx/iterate.h - src/ipm/ipx/kkt_solver_basis.h - src/ipm/ipx/kkt_solver_diag.h - src/ipm/ipx/kkt_solver.h - src/ipm/ipx/linear_operator.h - src/ipm/ipx/lp_solver.h - src/ipm/ipx/lu_factorization.h - src/ipm/ipx/lu_update.h - src/ipm/ipx/maxvolume.h - src/ipm/ipx/model.h - src/ipm/ipx/multistream.h - src/ipm/ipx/normal_matrix.h - src/ipm/ipx/power_method.h - src/ipm/ipx/sparse_matrix.h - src/ipm/ipx/sparse_utils.h - src/ipm/ipx/splitted_normal_matrix.h - src/ipm/ipx/starting_basis.h - src/ipm/ipx/symbolic_invert.h - src/ipm/ipx/timer.h - src/ipm/ipx/utils.h) + highs/ipm/ipx/basiclu_kernel.h + highs/ipm/ipx/basiclu_wrapper.h + highs/ipm/ipx/basis.h + highs/ipm/ipx/conjugate_residuals.h + highs/ipm/ipx/control.h + highs/ipm/ipx/crossover.h + highs/ipm/ipx/diagonal_precond.h + highs/ipm/ipx/forrest_tomlin.h + highs/ipm/ipx/guess_basis.h + highs/ipm/ipx/indexed_vector.h + highs/ipm/ipx/info.h + highs/ipm/ipx/ipm.h + highs/ipm/ipx/ipx_c.h + highs/ipm/ipx/ipx_config.h + highs/ipm/ipx/ipx_info.h + highs/ipm/ipx/ipx_internal.h + highs/ipm/ipx/ipx_parameters.h + highs/ipm/ipx/ipx_status.h + highs/ipm/ipx/iterate.h + highs/ipm/ipx/kkt_solver_basis.h + highs/ipm/ipx/kkt_solver_diag.h + highs/ipm/ipx/kkt_solver.h + highs/ipm/ipx/linear_operator.h + highs/ipm/ipx/lp_solver.h + highs/ipm/ipx/lu_factorization.h + highs/ipm/ipx/lu_update.h + highs/ipm/ipx/maxvolume.h + highs/ipm/ipx/model.h + highs/ipm/ipx/multistream.h + highs/ipm/ipx/normal_matrix.h + highs/ipm/ipx/power_method.h + highs/ipm/ipx/sparse_matrix.h + highs/ipm/ipx/sparse_utils.h + highs/ipm/ipx/splitted_normal_matrix.h + highs/ipm/ipx/starting_basis.h + highs/ipm/ipx/symbolic_invert.h + highs/ipm/ipx/timer.h + highs/ipm/ipx/utils.h) set(highs_sources_python extern/filereaderlp/reader.cpp - src/interfaces/highs_c_api.cpp - src/io/Filereader.cpp - src/io/FilereaderEms.cpp - src/io/FilereaderLp.cpp - src/io/FilereaderMps.cpp - src/io/HighsIO.cpp - src/io/HMpsFF.cpp - src/io/HMPSIO.cpp - src/io/LoadOptions.cpp - src/ipm/IpxWrapper.cpp - src/lp_data/Highs.cpp - src/lp_data/HighsCallback.cpp - src/lp_data/HighsDebug.cpp - src/lp_data/HighsIis.cpp - src/lp_data/HighsInfo.cpp - src/lp_data/HighsInfoDebug.cpp - src/lp_data/HighsInterface.cpp - src/lp_data/HighsLp.cpp - src/lp_data/HighsLpUtils.cpp - src/lp_data/HighsModelUtils.cpp - src/lp_data/HighsOptions.cpp - src/lp_data/HighsRanging.cpp - src/lp_data/HighsSolution.cpp - src/lp_data/HighsSolutionDebug.cpp - src/lp_data/HighsSolve.cpp - src/lp_data/HighsStatus.cpp - src/mip/HighsCliqueTable.cpp - src/mip/HighsConflictPool.cpp - src/mip/HighsCutGeneration.cpp - src/mip/HighsCutPool.cpp - src/mip/HighsDebugSol.cpp - src/mip/HighsDomain.cpp - src/mip/HighsDynamicRowMatrix.cpp - src/mip/HighsGFkSolve.cpp - src/mip/HighsImplications.cpp - src/mip/HighsLpAggregator.cpp - src/mip/HighsLpRelaxation.cpp - src/mip/HighsMipAnalysis.cpp - src/mip/HighsMipSolver.cpp - src/mip/HighsMipSolverData.cpp - src/mip/HighsModkSeparator.cpp - src/mip/HighsNodeQueue.cpp - src/mip/HighsObjectiveFunction.cpp - src/mip/HighsPathSeparator.cpp - src/mip/HighsPrimalHeuristics.cpp - src/mip/HighsPseudocost.cpp - src/mip/HighsRedcostFixing.cpp - src/mip/HighsSearch.cpp - src/mip/HighsSeparation.cpp - src/mip/HighsSeparator.cpp - src/mip/HighsTableauSeparator.cpp - src/mip/HighsTransformedLp.cpp - src/model/HighsHessian.cpp - src/model/HighsHessianUtils.cpp - src/model/HighsModel.cpp - src/parallel/HighsTaskExecutor.cpp - src/pdlp/CupdlpWrapper.cpp - src/presolve/HighsPostsolveStack.cpp - src/presolve/HighsSymmetry.cpp - src/presolve/HPresolve.cpp - src/presolve/HPresolveAnalysis.cpp - src/presolve/ICrash.cpp - src/presolve/ICrashUtil.cpp - src/presolve/ICrashX.cpp - src/presolve/PresolveComponent.cpp - src/qpsolver/a_asm.cpp - src/qpsolver/a_quass.cpp - src/qpsolver/basis.cpp - src/qpsolver/perturbation.cpp - src/qpsolver/quass.cpp - src/qpsolver/ratiotest.cpp - src/qpsolver/scaling.cpp - src/simplex/HEkk.cpp - src/simplex/HEkkControl.cpp - src/simplex/HEkkDebug.cpp - src/simplex/HEkkDual.cpp - src/simplex/HEkkDualMulti.cpp - src/simplex/HEkkDualRHS.cpp - src/simplex/HEkkDualRow.cpp - src/simplex/HEkkInterface.cpp - src/simplex/HEkkPrimal.cpp - src/simplex/HighsSimplexAnalysis.cpp - src/simplex/HSimplex.cpp - src/simplex/HSimplexDebug.cpp - src/simplex/HSimplexNla.cpp - src/simplex/HSimplexNlaDebug.cpp - src/simplex/HSimplexNlaFreeze.cpp - src/simplex/HSimplexNlaProductForm.cpp - src/simplex/HSimplexReport.cpp - src/test/KktCh2.cpp - src/test/DevKkt.cpp - src/util/HFactor.cpp - src/util/HFactorDebug.cpp - src/util/HFactorExtend.cpp - src/util/HFactorRefactor.cpp - src/util/HFactorUtils.cpp - src/util/HighsHash.cpp - src/util/HighsLinearSumBounds.cpp - src/util/HighsMatrixPic.cpp - src/util/HighsMatrixUtils.cpp - src/util/HighsSort.cpp - src/util/HighsSparseMatrix.cpp - src/util/HighsUtils.cpp - src/util/HSet.cpp - src/util/HVectorBase.cpp - src/util/stringutil.cpp) + highs/interfaces/highs_c_api.cpp + highs/io/Filereader.cpp + highs/io/FilereaderEms.cpp + highs/io/FilereaderLp.cpp + highs/io/FilereaderMps.cpp + highs/io/HighsIO.cpp + highs/io/HMpsFF.cpp + highs/io/HMPSIO.cpp + highs/io/LoadOptions.cpp + highs/ipm/IpxWrapper.cpp + highs/lp_data/Highs.cpp + highs/lp_data/HighsCallback.cpp + highs/lp_data/HighsDebug.cpp + highs/lp_data/HighsIis.cpp + highs/lp_data/HighsInfo.cpp + highs/lp_data/HighsInfoDebug.cpp + highs/lp_data/HighsInterface.cpp + highs/lp_data/HighsLp.cpp + highs/lp_data/HighsLpUtils.cpp + highs/lp_data/HighsModelUtils.cpp + highs/lp_data/HighsOptions.cpp + highs/lp_data/HighsRanging.cpp + highs/lp_data/HighsSolution.cpp + highs/lp_data/HighsSolutionDebug.cpp + highs/lp_data/HighsSolve.cpp + highs/lp_data/HighsStatus.cpp + highs/mip/HighsCliqueTable.cpp + highs/mip/HighsConflictPool.cpp + highs/mip/HighsCutGeneration.cpp + highs/mip/HighsCutPool.cpp + highs/mip/HighsDebugSol.cpp + highs/mip/HighsDomain.cpp + highs/mip/HighsDynamicRowMatrix.cpp + highs/mip/HighsGFkSolve.cpp + highs/mip/HighsImplications.cpp + highs/mip/HighsLpAggregator.cpp + highs/mip/HighsLpRelaxation.cpp + highs/mip/HighsMipAnalysis.cpp + highs/mip/HighsMipSolver.cpp + highs/mip/HighsMipSolverData.cpp + highs/mip/HighsModkSeparator.cpp + highs/mip/HighsNodeQueue.cpp + highs/mip/HighsObjectiveFunction.cpp + highs/mip/HighsPathSeparator.cpp + highs/mip/HighsPrimalHeuristics.cpp + highs/mip/HighsPseudocost.cpp + highs/mip/HighsRedcostFixing.cpp + highs/mip/HighsSearch.cpp + highs/mip/HighsSeparation.cpp + highs/mip/HighsSeparator.cpp + highs/mip/HighsTableauSeparator.cpp + highs/mip/HighsTransformedLp.cpp + highs/model/HighsHessian.cpp + highs/model/HighsHessianUtils.cpp + highs/model/HighsModel.cpp + highs/parallel/HighsTaskExecutor.cpp + highs/pdlp/CupdlpWrapper.cpp + highs/presolve/HighsPostsolveStack.cpp + highs/presolve/HighsSymmetry.cpp + highs/presolve/HPresolve.cpp + highs/presolve/HPresolveAnalysis.cpp + highs/presolve/ICrash.cpp + highs/presolve/ICrashUtil.cpp + highs/presolve/ICrashX.cpp + highs/presolve/PresolveComponent.cpp + highs/qpsolver/a_asm.cpp + highs/qpsolver/a_quass.cpp + highs/qpsolver/basis.cpp + highs/qpsolver/perturbation.cpp + highs/qpsolver/quass.cpp + highs/qpsolver/ratiotest.cpp + highs/qpsolver/scaling.cpp + highs/simplex/HEkk.cpp + highs/simplex/HEkkControl.cpp + highs/simplex/HEkkDebug.cpp + highs/simplex/HEkkDual.cpp + highs/simplex/HEkkDualMulti.cpp + highs/simplex/HEkkDualRHS.cpp + highs/simplex/HEkkDualRow.cpp + highs/simplex/HEkkInterface.cpp + highs/simplex/HEkkPrimal.cpp + highs/simplex/HighsSimplexAnalysis.cpp + highs/simplex/HSimplex.cpp + highs/simplex/HSimplexDebug.cpp + highs/simplex/HSimplexNla.cpp + highs/simplex/HSimplexNlaDebug.cpp + highs/simplex/HSimplexNlaFreeze.cpp + highs/simplex/HSimplexNlaProductForm.cpp + highs/simplex/HSimplexReport.cpp + highs/test/KktCh2.cpp + highs/test/DevKkt.cpp + highs/util/HFactor.cpp + highs/util/HFactorDebug.cpp + highs/util/HFactorExtend.cpp + highs/util/HFactorRefactor.cpp + highs/util/HFactorUtils.cpp + highs/util/HighsHash.cpp + highs/util/HighsLinearSumBounds.cpp + highs/util/HighsMatrixPic.cpp + highs/util/HighsMatrixUtils.cpp + highs/util/HighsSort.cpp + highs/util/HighsSparseMatrix.cpp + highs/util/HighsUtils.cpp + highs/util/HSet.cpp + highs/util/HVectorBase.cpp + highs/util/stringutil.cpp) set(highs_headers_python extern/filereaderlp/builder.hpp @@ -290,156 +290,156 @@ set(highs_headers_python extern/filereaderlp/model.hpp extern/filereaderlp/reader.hpp extern/pdqsort/pdqsort.h - src/interfaces/highs_c_api.h - src/io/Filereader.h - src/io/FilereaderEms.h - src/io/FilereaderLp.h - src/io/FilereaderMps.h - src/io/HighsIO.h - src/io/HMpsFF.h - src/io/HMPSIO.h - src/io/LoadOptions.h - src/ipm/IpxSolution.h - src/ipm/IpxWrapper.h - src/lp_data/HConst.h - src/lp_data/HighsAnalysis.h - src/lp_data/HighsCallback.h - src/lp_data/HighsCallbackStruct.h - src/lp_data/HighsDebug.h - src/lp_data/HighsIis.h - src/lp_data/HighsInfo.h - src/lp_data/HighsInfoDebug.h - src/lp_data/HighsLp.h - src/lp_data/HighsLpSolverObject.h - src/lp_data/HighsLpUtils.h - src/lp_data/HighsModelUtils.h - src/lp_data/HighsOptions.h - src/lp_data/HighsRanging.h - src/lp_data/HighsSolution.h - src/lp_data/HighsSolutionDebug.h - src/lp_data/HighsSolve.h - src/lp_data/HighsStatus.h - src/lp_data/HStruct.h - src/mip/HighsCliqueTable.h - src/mip/HighsConflictPool.h - src/mip/HighsCutGeneration.h - src/mip/HighsCutPool.h - src/mip/HighsDebugSol.h - src/mip/HighsDomain.h - src/mip/HighsDomainChange.h - src/mip/HighsDynamicRowMatrix.h - src/mip/HighsGFkSolve.h - src/mip/HighsImplications.h - src/mip/HighsLpAggregator.h - src/mip/HighsLpRelaxation.h - src/mip/HighsMipAnalysis.h - src/mip/HighsMipSolver.h - src/mip/HighsMipSolverData.h - src/mip/HighsModkSeparator.h - src/mip/HighsNodeQueue.h - src/mip/HighsObjectiveFunction.h - src/mip/HighsPathSeparator.h - src/mip/HighsPrimalHeuristics.h - src/mip/HighsPseudocost.h - src/mip/HighsRedcostFixing.h - src/mip/HighsSearch.h - src/mip/HighsSeparation.h - src/mip/HighsSeparator.h - src/mip/HighsTableauSeparator.h - src/mip/HighsTransformedLp.h - src/mip/MipTimer.h - src/model/HighsHessian.h - src/model/HighsHessianUtils.h - src/model/HighsModel.h - src/parallel/HighsBinarySemaphore.h - src/parallel/HighsCacheAlign.h - src/parallel/HighsCombinable.h - src/parallel/HighsMutex.h - src/parallel/HighsParallel.h - src/parallel/HighsRaceTimer.h - src/parallel/HighsSchedulerConstants.h - src/parallel/HighsSpinMutex.h - src/parallel/HighsSplitDeque.h - src/parallel/HighsTask.h - src/parallel/HighsTaskExecutor.h - src/pdlp/CupdlpWrapper.h - src/presolve/HighsPostsolveStack.h - src/presolve/HighsSymmetry.h - src/presolve/HPresolve.h - src/presolve/HPresolveAnalysis.h - src/presolve/ICrash.h - src/presolve/ICrashUtil.h - src/presolve/ICrashX.h - src/presolve/PresolveComponent.h - src/qpsolver/a_asm.hpp - src/qpsolver/a_quass.hpp - src/qpsolver/basis.hpp - src/qpsolver/crashsolution.hpp - src/qpsolver/dantzigpricing.hpp - src/qpsolver/devexpricing.hpp - src/qpsolver/eventhandler.hpp - src/qpsolver/factor.hpp - src/qpsolver/feasibility_bounded.hpp - src/qpsolver/feasibility_highs.hpp - src/qpsolver/gradient.hpp - src/qpsolver/instance.hpp - src/qpsolver/matrix.hpp - src/qpsolver/perturbation.hpp - src/qpsolver/pricing.hpp - src/qpsolver/qpconst.hpp - src/qpsolver/qpvector.hpp - src/qpsolver/quass.hpp - src/qpsolver/ratiotest.hpp - src/qpsolver/runtime.hpp - src/qpsolver/scaling.hpp - src/qpsolver/settings.hpp - src/qpsolver/snippets.hpp - src/qpsolver/statistics.hpp - src/qpsolver/steepestedgepricing.hpp - src/simplex/HApp.h - src/simplex/HEkk.h - src/simplex/HEkkDual.h - src/simplex/HEkkDualRHS.h - src/simplex/HEkkDualRow.h - src/simplex/HEkkPrimal.h - src/simplex/HighsSimplexAnalysis.h - src/simplex/HSimplex.h - src/simplex/HSimplexDebug.h - src/simplex/HSimplexNla.h - src/simplex/HSimplexReport.h - src/simplex/SimplexConst.h - src/simplex/SimplexStruct.h - src/simplex/SimplexTimer.h - src/test/DevKkt.h - src/test/KktCh2.h - src/util/FactorTimer.h - src/util/HFactor.h - src/util/HFactorConst.h - src/util/HFactorDebug.h - src/util/HighsCDouble.h - src/util/HighsComponent.h - src/util/HighsDataStack.h - src/util/HighsDisjointSets.h - src/util/HighsHash.h - src/util/HighsHashTree.h - src/util/HighsInt.h - src/util/HighsIntegers.h - src/util/HighsLinearSumBounds.h - src/util/HighsMatrixPic.h - src/util/HighsMatrixSlice.h - src/util/HighsMatrixUtils.h - src/util/HighsMemoryAllocation.h - src/util/HighsRandom.h - src/util/HighsRbTree.h - src/util/HighsSort.h - src/util/HighsSparseMatrix.h - src/util/HighsSparseVectorSum.h - src/util/HighsSplay.h - src/util/HighsTimer.h - src/util/HighsUtils.h - src/util/HSet.h - src/util/HVector.h - src/util/HVectorBase.h - src/util/stringutil.h - src/Highs.h + highs/interfaces/highs_c_api.h + highs/io/Filereader.h + highs/io/FilereaderEms.h + highs/io/FilereaderLp.h + highs/io/FilereaderMps.h + highs/io/HighsIO.h + highs/io/HMpsFF.h + highs/io/HMPSIO.h + highs/io/LoadOptions.h + highs/ipm/IpxSolution.h + highs/ipm/IpxWrapper.h + highs/lp_data/HConst.h + highs/lp_data/HighsAnalysis.h + highs/lp_data/HighsCallback.h + highs/lp_data/HighsCallbackStruct.h + highs/lp_data/HighsDebug.h + highs/lp_data/HighsIis.h + highs/lp_data/HighsInfo.h + highs/lp_data/HighsInfoDebug.h + highs/lp_data/HighsLp.h + highs/lp_data/HighsLpSolverObject.h + highs/lp_data/HighsLpUtils.h + highs/lp_data/HighsModelUtils.h + highs/lp_data/HighsOptions.h + highs/lp_data/HighsRanging.h + highs/lp_data/HighsSolution.h + highs/lp_data/HighsSolutionDebug.h + highs/lp_data/HighsSolve.h + highs/lp_data/HighsStatus.h + highs/lp_data/HStruct.h + highs/mip/HighsCliqueTable.h + highs/mip/HighsConflictPool.h + highs/mip/HighsCutGeneration.h + highs/mip/HighsCutPool.h + highs/mip/HighsDebugSol.h + highs/mip/HighsDomain.h + highs/mip/HighsDomainChange.h + highs/mip/HighsDynamicRowMatrix.h + highs/mip/HighsGFkSolve.h + highs/mip/HighsImplications.h + highs/mip/HighsLpAggregator.h + highs/mip/HighsLpRelaxation.h + highs/mip/HighsMipAnalysis.h + highs/mip/HighsMipSolver.h + highs/mip/HighsMipSolverData.h + highs/mip/HighsModkSeparator.h + highs/mip/HighsNodeQueue.h + highs/mip/HighsObjectiveFunction.h + highs/mip/HighsPathSeparator.h + highs/mip/HighsPrimalHeuristics.h + highs/mip/HighsPseudocost.h + highs/mip/HighsRedcostFixing.h + highs/mip/HighsSearch.h + highs/mip/HighsSeparation.h + highs/mip/HighsSeparator.h + highs/mip/HighsTableauSeparator.h + highs/mip/HighsTransformedLp.h + highs/mip/MipTimer.h + highs/model/HighsHessian.h + highs/model/HighsHessianUtils.h + highs/model/HighsModel.h + highs/parallel/HighsBinarySemaphore.h + highs/parallel/HighsCacheAlign.h + highs/parallel/HighsCombinable.h + highs/parallel/HighsMutex.h + highs/parallel/HighsParallel.h + highs/parallel/HighsRaceTimer.h + highs/parallel/HighsSchedulerConstants.h + highs/parallel/HighsSpinMutex.h + highs/parallel/HighsSplitDeque.h + highs/parallel/HighsTask.h + highs/parallel/HighsTaskExecutor.h + highs/pdlp/CupdlpWrapper.h + highs/presolve/HighsPostsolveStack.h + highs/presolve/HighsSymmetry.h + highs/presolve/HPresolve.h + highs/presolve/HPresolveAnalysis.h + highs/presolve/ICrash.h + highs/presolve/ICrashUtil.h + highs/presolve/ICrashX.h + highs/presolve/PresolveComponent.h + highs/qpsolver/a_asm.hpp + highs/qpsolver/a_quass.hpp + highs/qpsolver/basis.hpp + highs/qpsolver/crashsolution.hpp + highs/qpsolver/dantzigpricing.hpp + highs/qpsolver/devexpricing.hpp + highs/qpsolver/eventhandler.hpp + highs/qpsolver/factor.hpp + highs/qpsolver/feasibility_bounded.hpp + highs/qpsolver/feasibility_highs.hpp + highs/qpsolver/gradient.hpp + highs/qpsolver/instance.hpp + highs/qpsolver/matrix.hpp + highs/qpsolver/perturbation.hpp + highs/qpsolver/pricing.hpp + highs/qpsolver/qpconst.hpp + highs/qpsolver/qpvector.hpp + highs/qpsolver/quass.hpp + highs/qpsolver/ratiotest.hpp + highs/qpsolver/runtime.hpp + highs/qpsolver/scaling.hpp + highs/qpsolver/settings.hpp + highs/qpsolver/snippets.hpp + highs/qpsolver/statistics.hpp + highs/qpsolver/steepestedgepricing.hpp + highs/simplex/HApp.h + highs/simplex/HEkk.h + highs/simplex/HEkkDual.h + highs/simplex/HEkkDualRHS.h + highs/simplex/HEkkDualRow.h + highs/simplex/HEkkPrimal.h + highs/simplex/HighsSimplexAnalysis.h + highs/simplex/HSimplex.h + highs/simplex/HSimplexDebug.h + highs/simplex/HSimplexNla.h + highs/simplex/HSimplexReport.h + highs/simplex/SimplexConst.h + highs/simplex/SimplexStruct.h + highs/simplex/SimplexTimer.h + highs/test/DevKkt.h + highs/test/KktCh2.h + highs/util/FactorTimer.h + highs/util/HFactor.h + highs/util/HFactorConst.h + highs/util/HFactorDebug.h + highs/util/HighsCDouble.h + highs/util/HighsComponent.h + highs/util/HighsDataStack.h + highs/util/HighsDisjointSets.h + highs/util/HighsHash.h + highs/util/HighsHashTree.h + highs/util/HighsInt.h + highs/util/HighsIntegers.h + highs/util/HighsLinearSumBounds.h + highs/util/HighsMatrixPic.h + highs/util/HighsMatrixSlice.h + highs/util/HighsMatrixUtils.h + highs/util/HighsMemoryAllocation.h + highs/util/HighsRandom.h + highs/util/HighsRbTree.h + highs/util/HighsSort.h + highs/util/HighsSparseMatrix.h + highs/util/HighsSparseVectorSum.h + highs/util/HighsSplay.h + highs/util/HighsTimer.h + highs/util/HighsUtils.h + highs/util/HSet.h + highs/util/HVector.h + highs/util/HVectorBase.h + highs/util/stringutil.h + highs/Highs.h ) \ No newline at end of file diff --git a/cmake/sources.cmake b/cmake/sources.cmake index a3988e42f4..cefffbe2ae 100644 --- a/cmake/sources.cmake +++ b/cmake/sources.cmake @@ -3,23 +3,23 @@ set(include_dirs $ $ $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ $) set(cupdlp_sources diff --git a/docs/HiGHS_CopyrightHeaderUpdateAll b/docs/HiGHS_CopyrightHeaderUpdateAll index 0b1edbcd9d..f6981215ae 100755 --- a/docs/HiGHS_CopyrightHeaderUpdateAll +++ b/docs/HiGHS_CopyrightHeaderUpdateAll @@ -1,23 +1,23 @@ -./HiGHS_CopyrightHeader.pl ../src/Highs.h -./HiGHS_CopyrightHeader.pl ../src/ipm/*.cpp -./HiGHS_CopyrightHeader.pl ../src/ipm/*.h -./HiGHS_CopyrightHeader.pl ../src/interfaces/*.cpp -./HiGHS_CopyrightHeader.pl ../src/interfaces/*.h -./HiGHS_CopyrightHeader.pl ../src/interfaces/*.hpp -./HiGHS_CopyrightHeader.pl ../src/io/*.cpp -./HiGHS_CopyrightHeader.pl ../src/io/*.h -./HiGHS_CopyrightHeader.pl ../src/mip/*.cpp -./HiGHS_CopyrightHeader.pl ../src/mip/*.h -./HiGHS_CopyrightHeader.pl ../src/lp_data/*.h -./HiGHS_CopyrightHeader.pl ../src/lp_data/*.cpp -./HiGHS_CopyrightHeader.pl ../src/pdlp/*.cpp -./HiGHS_CopyrightHeader.pl ../src/pdlp/*.h -./HiGHS_CopyrightHeader.pl ../src/presolve/*.cpp -./HiGHS_CopyrightHeader.pl ../src/presolve/*.h -./HiGHS_CopyrightHeader.pl ../src/simplex/*.h -./HiGHS_CopyrightHeader.pl ../src/simplex/*.cpp -./HiGHS_CopyrightHeader.pl ../src/test/*.h -./HiGHS_CopyrightHeader.pl ../src/test/*.cpp -./HiGHS_CopyrightHeader.pl ../src/util/*.h -./HiGHS_CopyrightHeader.pl ../src/util/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/Highs.h +./HiGHS_CopyrightHeader.pl ../highs/ipm/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/ipm/*.h +./HiGHS_CopyrightHeader.pl ../highs/interfaces/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/interfaces/*.h +./HiGHS_CopyrightHeader.pl ../highs/interfaces/*.hpp +./HiGHS_CopyrightHeader.pl ../highs/io/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/io/*.h +./HiGHS_CopyrightHeader.pl ../highs/mip/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/mip/*.h +./HiGHS_CopyrightHeader.pl ../highs/lp_data/*.h +./HiGHS_CopyrightHeader.pl ../highs/lp_data/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/pdlp/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/pdlp/*.h +./HiGHS_CopyrightHeader.pl ../highs/presolve/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/presolve/*.h +./HiGHS_CopyrightHeader.pl ../highs/simplex/*.h +./HiGHS_CopyrightHeader.pl ../highs/simplex/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/test/*.h +./HiGHS_CopyrightHeader.pl ../highs/test/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/util/*.h +./HiGHS_CopyrightHeader.pl ../highs/util/*.cpp ./HiGHS_CopyrightHeader.pl ../app/RunHighs.cpp diff --git a/docs/c_api_gen/build.jl b/docs/c_api_gen/build.jl index 7ba40d16db..7f78096139 100644 --- a/docs/c_api_gen/build.jl +++ b/docs/c_api_gen/build.jl @@ -10,7 +10,7 @@ import Clang: Generators -highs_src = joinpath(dirname(dirname(@__DIR__)), "src") +highs_src = joinpath(dirname(dirname(@__DIR__)), "highs") c_api = joinpath(highs_src, "interfaces", "highs_c_api.h") Generators.build!( diff --git a/docs/src/index.md b/docs/src/index.md index 2e0e65a03b..2a16a48d3f 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -50,7 +50,7 @@ also be used to extract solution data and perform other operations relating to the incumbent model. The basic functionality is introduced via a [`Guide`](@ref guide-basic), with links to examples of its use in the `Python` interface `highspy`. This makes use of the C++ structures and enums, and is as close as possible to the native C++ library -calls. These can be studied via the [C++ header file](https://github.com/ERGO-Code/HiGHS/blob/master/src/Highs.h). +calls. These can be studied via the [C++ header file](https://github.com/ERGO-Code/HiGHS/blob/master/highs/Highs.h). The C interface cannot make use of the C++ structures and enums, and its methods are documented [explicitly](@ref c-api). diff --git a/docs/src/interfaces/cpp/library.md b/docs/src/interfaces/cpp/library.md index 27f8615300..ace8d9e359 100644 --- a/docs/src/interfaces/cpp/library.md +++ b/docs/src/interfaces/cpp/library.md @@ -1,4 +1,4 @@ -The HiGHS library is defined in the [`src/Highs.h`](https://github.com/ERGO-Code/HiGHS/blob/master/src/Highs.h) header file. It contains the definition of the methods and members of the class. +The HiGHS library is defined in the [`highs/Highs.h`](https://github.com/ERGO-Code/HiGHS/blob/master/highs/Highs.h) header file. It contains the definition of the methods and members of the class. ## Define model diff --git a/docs/src/interfaces/csharp.md b/docs/src/interfaces/csharp.md index a5c27fcf41..306069e49e 100644 --- a/docs/src/interfaces/csharp.md +++ b/docs/src/interfaces/csharp.md @@ -35,7 +35,7 @@ Details for building locally can be found in `nuget/README.md`. The C# API can be called directly. Here are observations on calling the HiGHS C# API from C#: - * The file `HiGHS/src/interfaces/highs_csharp_api.cs` contains all the PInvoke you need. + * The file `HiGHS/highs/interfaces/highs_csharp_api.cs` contains all the PInvoke you need. * Make sure, that the native HiGHS library (`highs.dll`, `libhighs.dll`, `libhighs.so`, ... depending on your platform) can be found at runtime. How to do this is platform dependent, copying it next to your C# executable diff --git a/docs/src/interfaces/fortran.md b/docs/src/interfaces/fortran.md index 8d5786b46a..bd9aaa393c 100644 --- a/docs/src/interfaces/fortran.md +++ b/docs/src/interfaces/fortran.md @@ -2,7 +2,7 @@ #### [Fortran](@id fortran-api) The interface is in -`HiGHS/src/interfaces/highs_fortran_api.f90`. Its +`HiGHS/highs/interfaces/highs_fortran_api.f90`. Its methods are simply bindings to the [`C` API](@ref c-api) To include in the build, switch the Fortran CMake parameter on: diff --git a/src/CMakeLists.txt b/highs/CMakeLists.txt similarity index 98% rename from src/CMakeLists.txt rename to highs/CMakeLists.txt index 970aa43494..0ac6a4d62b 100644 --- a/src/CMakeLists.txt +++ b/highs/CMakeLists.txt @@ -96,10 +96,10 @@ if(NOT FAST_BUILD) FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake") # Configure the config file for the build tree: - # Either list all the src/* directories here, or put explicit paths in all the + # Either list all the highs/* directories here, or put explicit paths in all the # include statements. # M reckons that the latter is more transparent, and I'm inclined to agree. - set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${HIGHS_BINARY_DIR}") + set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/highs" "${HIGHS_BINARY_DIR}") configure_file(${PROJECT_SOURCE_DIR}/cmake/highs-config.cmake.in "${HIGHS_BINARY_DIR}/highs-config.cmake" @ONLY) @@ -155,7 +155,7 @@ else() if (CUPDLP_GPU) target_include_directories(highs PUBLIC "$") - set(CUPDLP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/src/pdlp/cupdlp/") + set(CUPDLP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/highs/pdlp/cupdlp/") add_subdirectory(pdlp/cupdlp/cuda) diff --git a/src/HConfig.h.bazel.in b/highs/HConfig.h.bazel.in similarity index 100% rename from src/HConfig.h.bazel.in rename to highs/HConfig.h.bazel.in diff --git a/src/HConfig.h.in b/highs/HConfig.h.in similarity index 100% rename from src/HConfig.h.in rename to highs/HConfig.h.in diff --git a/src/HConfig.h.meson.in b/highs/HConfig.h.meson.in similarity index 100% rename from src/HConfig.h.meson.in rename to highs/HConfig.h.meson.in diff --git a/src/Highs.h b/highs/Highs.h similarity index 100% rename from src/Highs.h rename to highs/Highs.h diff --git a/src/highs_bindings.cpp b/highs/highs_bindings.cpp similarity index 100% rename from src/highs_bindings.cpp rename to highs/highs_bindings.cpp diff --git a/src/highspy/__init__.py b/highs/highspy/__init__.py similarity index 100% rename from src/highspy/__init__.py rename to highs/highspy/__init__.py diff --git a/src/highspy/__init__.pyi b/highs/highspy/__init__.pyi similarity index 100% rename from src/highspy/__init__.pyi rename to highs/highspy/__init__.pyi diff --git a/src/highspy/_core/__init__.pyi b/highs/highspy/_core/__init__.pyi similarity index 100% rename from src/highspy/_core/__init__.pyi rename to highs/highspy/_core/__init__.pyi diff --git a/src/highspy/_core/cb.pyi b/highs/highspy/_core/cb.pyi similarity index 100% rename from src/highspy/_core/cb.pyi rename to highs/highspy/_core/cb.pyi diff --git a/src/highspy/_core/simplex_constants.pyi b/highs/highspy/_core/simplex_constants.pyi similarity index 100% rename from src/highspy/_core/simplex_constants.pyi rename to highs/highspy/_core/simplex_constants.pyi diff --git a/src/highspy/highs.py b/highs/highspy/highs.py similarity index 100% rename from src/highspy/highs.py rename to highs/highspy/highs.py diff --git a/src/interfaces/highs_c_api.cpp b/highs/interfaces/highs_c_api.cpp similarity index 100% rename from src/interfaces/highs_c_api.cpp rename to highs/interfaces/highs_c_api.cpp diff --git a/src/interfaces/highs_c_api.h b/highs/interfaces/highs_c_api.h similarity index 100% rename from src/interfaces/highs_c_api.h rename to highs/interfaces/highs_c_api.h diff --git a/src/interfaces/highs_csharp_api.cs b/highs/interfaces/highs_csharp_api.cs similarity index 100% rename from src/interfaces/highs_csharp_api.cs rename to highs/interfaces/highs_csharp_api.cs diff --git a/src/interfaces/highs_fortran_api.f90 b/highs/interfaces/highs_fortran_api.f90 similarity index 100% rename from src/interfaces/highs_fortran_api.f90 rename to highs/interfaces/highs_fortran_api.f90 diff --git a/src/io/Filereader.cpp b/highs/io/Filereader.cpp similarity index 100% rename from src/io/Filereader.cpp rename to highs/io/Filereader.cpp diff --git a/src/io/Filereader.h b/highs/io/Filereader.h similarity index 100% rename from src/io/Filereader.h rename to highs/io/Filereader.h diff --git a/src/io/FilereaderEms.cpp b/highs/io/FilereaderEms.cpp similarity index 100% rename from src/io/FilereaderEms.cpp rename to highs/io/FilereaderEms.cpp diff --git a/src/io/FilereaderEms.h b/highs/io/FilereaderEms.h similarity index 100% rename from src/io/FilereaderEms.h rename to highs/io/FilereaderEms.h diff --git a/src/io/FilereaderLp.cpp b/highs/io/FilereaderLp.cpp similarity index 100% rename from src/io/FilereaderLp.cpp rename to highs/io/FilereaderLp.cpp diff --git a/src/io/FilereaderLp.h b/highs/io/FilereaderLp.h similarity index 100% rename from src/io/FilereaderLp.h rename to highs/io/FilereaderLp.h diff --git a/src/io/FilereaderMps.cpp b/highs/io/FilereaderMps.cpp similarity index 100% rename from src/io/FilereaderMps.cpp rename to highs/io/FilereaderMps.cpp diff --git a/src/io/FilereaderMps.h b/highs/io/FilereaderMps.h similarity index 100% rename from src/io/FilereaderMps.h rename to highs/io/FilereaderMps.h diff --git a/src/io/HMPSIO.cpp b/highs/io/HMPSIO.cpp similarity index 100% rename from src/io/HMPSIO.cpp rename to highs/io/HMPSIO.cpp diff --git a/src/io/HMPSIO.h b/highs/io/HMPSIO.h similarity index 100% rename from src/io/HMPSIO.h rename to highs/io/HMPSIO.h diff --git a/src/io/HMpsFF.cpp b/highs/io/HMpsFF.cpp similarity index 100% rename from src/io/HMpsFF.cpp rename to highs/io/HMpsFF.cpp diff --git a/src/io/HMpsFF.h b/highs/io/HMpsFF.h similarity index 100% rename from src/io/HMpsFF.h rename to highs/io/HMpsFF.h diff --git a/src/io/HighsIO.cpp b/highs/io/HighsIO.cpp similarity index 100% rename from src/io/HighsIO.cpp rename to highs/io/HighsIO.cpp diff --git a/src/io/HighsIO.h b/highs/io/HighsIO.h similarity index 100% rename from src/io/HighsIO.h rename to highs/io/HighsIO.h diff --git a/src/io/LoadOptions.cpp b/highs/io/LoadOptions.cpp similarity index 100% rename from src/io/LoadOptions.cpp rename to highs/io/LoadOptions.cpp diff --git a/src/io/LoadOptions.h b/highs/io/LoadOptions.h similarity index 100% rename from src/io/LoadOptions.h rename to highs/io/LoadOptions.h diff --git a/src/ipm/IpxSolution.h b/highs/ipm/IpxSolution.h similarity index 100% rename from src/ipm/IpxSolution.h rename to highs/ipm/IpxSolution.h diff --git a/src/ipm/IpxWrapper.cpp b/highs/ipm/IpxWrapper.cpp similarity index 100% rename from src/ipm/IpxWrapper.cpp rename to highs/ipm/IpxWrapper.cpp diff --git a/src/ipm/IpxWrapper.h b/highs/ipm/IpxWrapper.h similarity index 100% rename from src/ipm/IpxWrapper.h rename to highs/ipm/IpxWrapper.h diff --git a/src/ipm/basiclu/basiclu.h b/highs/ipm/basiclu/basiclu.h similarity index 100% rename from src/ipm/basiclu/basiclu.h rename to highs/ipm/basiclu/basiclu.h diff --git a/src/ipm/basiclu/basiclu_factorize.c b/highs/ipm/basiclu/basiclu_factorize.c similarity index 100% rename from src/ipm/basiclu/basiclu_factorize.c rename to highs/ipm/basiclu/basiclu_factorize.c diff --git a/src/ipm/basiclu/basiclu_factorize.h b/highs/ipm/basiclu/basiclu_factorize.h similarity index 100% rename from src/ipm/basiclu/basiclu_factorize.h rename to highs/ipm/basiclu/basiclu_factorize.h diff --git a/src/ipm/basiclu/basiclu_get_factors.c b/highs/ipm/basiclu/basiclu_get_factors.c similarity index 100% rename from src/ipm/basiclu/basiclu_get_factors.c rename to highs/ipm/basiclu/basiclu_get_factors.c diff --git a/src/ipm/basiclu/basiclu_get_factors.h b/highs/ipm/basiclu/basiclu_get_factors.h similarity index 100% rename from src/ipm/basiclu/basiclu_get_factors.h rename to highs/ipm/basiclu/basiclu_get_factors.h diff --git a/src/ipm/basiclu/basiclu_initialize.c b/highs/ipm/basiclu/basiclu_initialize.c similarity index 100% rename from src/ipm/basiclu/basiclu_initialize.c rename to highs/ipm/basiclu/basiclu_initialize.c diff --git a/src/ipm/basiclu/basiclu_initialize.h b/highs/ipm/basiclu/basiclu_initialize.h similarity index 100% rename from src/ipm/basiclu/basiclu_initialize.h rename to highs/ipm/basiclu/basiclu_initialize.h diff --git a/src/ipm/basiclu/basiclu_obj_factorize.h b/highs/ipm/basiclu/basiclu_obj_factorize.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_factorize.h rename to highs/ipm/basiclu/basiclu_obj_factorize.h diff --git a/src/ipm/basiclu/basiclu_obj_free.h b/highs/ipm/basiclu/basiclu_obj_free.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_free.h rename to highs/ipm/basiclu/basiclu_obj_free.h diff --git a/src/ipm/basiclu/basiclu_obj_get_factors.h b/highs/ipm/basiclu/basiclu_obj_get_factors.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_get_factors.h rename to highs/ipm/basiclu/basiclu_obj_get_factors.h diff --git a/src/ipm/basiclu/basiclu_obj_initialize.h b/highs/ipm/basiclu/basiclu_obj_initialize.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_initialize.h rename to highs/ipm/basiclu/basiclu_obj_initialize.h diff --git a/src/ipm/basiclu/basiclu_obj_solve_dense.h b/highs/ipm/basiclu/basiclu_obj_solve_dense.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_solve_dense.h rename to highs/ipm/basiclu/basiclu_obj_solve_dense.h diff --git a/src/ipm/basiclu/basiclu_obj_solve_for_update.h b/highs/ipm/basiclu/basiclu_obj_solve_for_update.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_solve_for_update.h rename to highs/ipm/basiclu/basiclu_obj_solve_for_update.h diff --git a/src/ipm/basiclu/basiclu_obj_solve_sparse.h b/highs/ipm/basiclu/basiclu_obj_solve_sparse.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_solve_sparse.h rename to highs/ipm/basiclu/basiclu_obj_solve_sparse.h diff --git a/src/ipm/basiclu/basiclu_obj_update.h b/highs/ipm/basiclu/basiclu_obj_update.h similarity index 100% rename from src/ipm/basiclu/basiclu_obj_update.h rename to highs/ipm/basiclu/basiclu_obj_update.h diff --git a/src/ipm/basiclu/basiclu_object.c b/highs/ipm/basiclu/basiclu_object.c similarity index 100% rename from src/ipm/basiclu/basiclu_object.c rename to highs/ipm/basiclu/basiclu_object.c diff --git a/src/ipm/basiclu/basiclu_object.h b/highs/ipm/basiclu/basiclu_object.h similarity index 100% rename from src/ipm/basiclu/basiclu_object.h rename to highs/ipm/basiclu/basiclu_object.h diff --git a/src/ipm/basiclu/basiclu_solve_dense.c b/highs/ipm/basiclu/basiclu_solve_dense.c similarity index 100% rename from src/ipm/basiclu/basiclu_solve_dense.c rename to highs/ipm/basiclu/basiclu_solve_dense.c diff --git a/src/ipm/basiclu/basiclu_solve_dense.h b/highs/ipm/basiclu/basiclu_solve_dense.h similarity index 100% rename from src/ipm/basiclu/basiclu_solve_dense.h rename to highs/ipm/basiclu/basiclu_solve_dense.h diff --git a/src/ipm/basiclu/basiclu_solve_for_update.c b/highs/ipm/basiclu/basiclu_solve_for_update.c similarity index 100% rename from src/ipm/basiclu/basiclu_solve_for_update.c rename to highs/ipm/basiclu/basiclu_solve_for_update.c diff --git a/src/ipm/basiclu/basiclu_solve_for_update.h b/highs/ipm/basiclu/basiclu_solve_for_update.h similarity index 100% rename from src/ipm/basiclu/basiclu_solve_for_update.h rename to highs/ipm/basiclu/basiclu_solve_for_update.h diff --git a/src/ipm/basiclu/basiclu_solve_sparse.c b/highs/ipm/basiclu/basiclu_solve_sparse.c similarity index 100% rename from src/ipm/basiclu/basiclu_solve_sparse.c rename to highs/ipm/basiclu/basiclu_solve_sparse.c diff --git a/src/ipm/basiclu/basiclu_solve_sparse.h b/highs/ipm/basiclu/basiclu_solve_sparse.h similarity index 100% rename from src/ipm/basiclu/basiclu_solve_sparse.h rename to highs/ipm/basiclu/basiclu_solve_sparse.h diff --git a/src/ipm/basiclu/basiclu_update.c b/highs/ipm/basiclu/basiclu_update.c similarity index 100% rename from src/ipm/basiclu/basiclu_update.c rename to highs/ipm/basiclu/basiclu_update.c diff --git a/src/ipm/basiclu/basiclu_update.h b/highs/ipm/basiclu/basiclu_update.h similarity index 100% rename from src/ipm/basiclu/basiclu_update.h rename to highs/ipm/basiclu/basiclu_update.h diff --git a/src/ipm/basiclu/lu_build_factors.c b/highs/ipm/basiclu/lu_build_factors.c similarity index 100% rename from src/ipm/basiclu/lu_build_factors.c rename to highs/ipm/basiclu/lu_build_factors.c diff --git a/src/ipm/basiclu/lu_condest.c b/highs/ipm/basiclu/lu_condest.c similarity index 100% rename from src/ipm/basiclu/lu_condest.c rename to highs/ipm/basiclu/lu_condest.c diff --git a/src/ipm/basiclu/lu_def.h b/highs/ipm/basiclu/lu_def.h similarity index 100% rename from src/ipm/basiclu/lu_def.h rename to highs/ipm/basiclu/lu_def.h diff --git a/src/ipm/basiclu/lu_dfs.c b/highs/ipm/basiclu/lu_dfs.c similarity index 100% rename from src/ipm/basiclu/lu_dfs.c rename to highs/ipm/basiclu/lu_dfs.c diff --git a/src/ipm/basiclu/lu_factorize_bump.c b/highs/ipm/basiclu/lu_factorize_bump.c similarity index 100% rename from src/ipm/basiclu/lu_factorize_bump.c rename to highs/ipm/basiclu/lu_factorize_bump.c diff --git a/src/ipm/basiclu/lu_file.c b/highs/ipm/basiclu/lu_file.c similarity index 100% rename from src/ipm/basiclu/lu_file.c rename to highs/ipm/basiclu/lu_file.c diff --git a/src/ipm/basiclu/lu_file.h b/highs/ipm/basiclu/lu_file.h similarity index 100% rename from src/ipm/basiclu/lu_file.h rename to highs/ipm/basiclu/lu_file.h diff --git a/src/ipm/basiclu/lu_garbage_perm.c b/highs/ipm/basiclu/lu_garbage_perm.c similarity index 100% rename from src/ipm/basiclu/lu_garbage_perm.c rename to highs/ipm/basiclu/lu_garbage_perm.c diff --git a/src/ipm/basiclu/lu_initialize.c b/highs/ipm/basiclu/lu_initialize.c similarity index 100% rename from src/ipm/basiclu/lu_initialize.c rename to highs/ipm/basiclu/lu_initialize.c diff --git a/src/ipm/basiclu/lu_internal.c b/highs/ipm/basiclu/lu_internal.c similarity index 100% rename from src/ipm/basiclu/lu_internal.c rename to highs/ipm/basiclu/lu_internal.c diff --git a/src/ipm/basiclu/lu_internal.h b/highs/ipm/basiclu/lu_internal.h similarity index 100% rename from src/ipm/basiclu/lu_internal.h rename to highs/ipm/basiclu/lu_internal.h diff --git a/src/ipm/basiclu/lu_list.h b/highs/ipm/basiclu/lu_list.h similarity index 100% rename from src/ipm/basiclu/lu_list.h rename to highs/ipm/basiclu/lu_list.h diff --git a/src/ipm/basiclu/lu_markowitz.c b/highs/ipm/basiclu/lu_markowitz.c similarity index 100% rename from src/ipm/basiclu/lu_markowitz.c rename to highs/ipm/basiclu/lu_markowitz.c diff --git a/src/ipm/basiclu/lu_matrix_norm.c b/highs/ipm/basiclu/lu_matrix_norm.c similarity index 100% rename from src/ipm/basiclu/lu_matrix_norm.c rename to highs/ipm/basiclu/lu_matrix_norm.c diff --git a/src/ipm/basiclu/lu_pivot.c b/highs/ipm/basiclu/lu_pivot.c similarity index 100% rename from src/ipm/basiclu/lu_pivot.c rename to highs/ipm/basiclu/lu_pivot.c diff --git a/src/ipm/basiclu/lu_residual_test.c b/highs/ipm/basiclu/lu_residual_test.c similarity index 100% rename from src/ipm/basiclu/lu_residual_test.c rename to highs/ipm/basiclu/lu_residual_test.c diff --git a/src/ipm/basiclu/lu_setup_bump.c b/highs/ipm/basiclu/lu_setup_bump.c similarity index 100% rename from src/ipm/basiclu/lu_setup_bump.c rename to highs/ipm/basiclu/lu_setup_bump.c diff --git a/src/ipm/basiclu/lu_singletons.c b/highs/ipm/basiclu/lu_singletons.c similarity index 100% rename from src/ipm/basiclu/lu_singletons.c rename to highs/ipm/basiclu/lu_singletons.c diff --git a/src/ipm/basiclu/lu_solve_dense.c b/highs/ipm/basiclu/lu_solve_dense.c similarity index 100% rename from src/ipm/basiclu/lu_solve_dense.c rename to highs/ipm/basiclu/lu_solve_dense.c diff --git a/src/ipm/basiclu/lu_solve_for_update.c b/highs/ipm/basiclu/lu_solve_for_update.c similarity index 100% rename from src/ipm/basiclu/lu_solve_for_update.c rename to highs/ipm/basiclu/lu_solve_for_update.c diff --git a/src/ipm/basiclu/lu_solve_sparse.c b/highs/ipm/basiclu/lu_solve_sparse.c similarity index 100% rename from src/ipm/basiclu/lu_solve_sparse.c rename to highs/ipm/basiclu/lu_solve_sparse.c diff --git a/src/ipm/basiclu/lu_solve_symbolic.c b/highs/ipm/basiclu/lu_solve_symbolic.c similarity index 100% rename from src/ipm/basiclu/lu_solve_symbolic.c rename to highs/ipm/basiclu/lu_solve_symbolic.c diff --git a/src/ipm/basiclu/lu_solve_triangular.c b/highs/ipm/basiclu/lu_solve_triangular.c similarity index 100% rename from src/ipm/basiclu/lu_solve_triangular.c rename to highs/ipm/basiclu/lu_solve_triangular.c diff --git a/src/ipm/basiclu/lu_update.c b/highs/ipm/basiclu/lu_update.c similarity index 100% rename from src/ipm/basiclu/lu_update.c rename to highs/ipm/basiclu/lu_update.c diff --git a/src/ipm/ipx/basiclu_kernel.cc b/highs/ipm/ipx/basiclu_kernel.cc similarity index 100% rename from src/ipm/ipx/basiclu_kernel.cc rename to highs/ipm/ipx/basiclu_kernel.cc diff --git a/src/ipm/ipx/basiclu_kernel.h b/highs/ipm/ipx/basiclu_kernel.h similarity index 100% rename from src/ipm/ipx/basiclu_kernel.h rename to highs/ipm/ipx/basiclu_kernel.h diff --git a/src/ipm/ipx/basiclu_wrapper.cc b/highs/ipm/ipx/basiclu_wrapper.cc similarity index 100% rename from src/ipm/ipx/basiclu_wrapper.cc rename to highs/ipm/ipx/basiclu_wrapper.cc diff --git a/src/ipm/ipx/basiclu_wrapper.h b/highs/ipm/ipx/basiclu_wrapper.h similarity index 100% rename from src/ipm/ipx/basiclu_wrapper.h rename to highs/ipm/ipx/basiclu_wrapper.h diff --git a/src/ipm/ipx/basis.cc b/highs/ipm/ipx/basis.cc similarity index 100% rename from src/ipm/ipx/basis.cc rename to highs/ipm/ipx/basis.cc diff --git a/src/ipm/ipx/basis.h b/highs/ipm/ipx/basis.h similarity index 100% rename from src/ipm/ipx/basis.h rename to highs/ipm/ipx/basis.h diff --git a/src/ipm/ipx/conjugate_residuals.cc b/highs/ipm/ipx/conjugate_residuals.cc similarity index 100% rename from src/ipm/ipx/conjugate_residuals.cc rename to highs/ipm/ipx/conjugate_residuals.cc diff --git a/src/ipm/ipx/conjugate_residuals.h b/highs/ipm/ipx/conjugate_residuals.h similarity index 100% rename from src/ipm/ipx/conjugate_residuals.h rename to highs/ipm/ipx/conjugate_residuals.h diff --git a/src/ipm/ipx/control.cc b/highs/ipm/ipx/control.cc similarity index 100% rename from src/ipm/ipx/control.cc rename to highs/ipm/ipx/control.cc diff --git a/src/ipm/ipx/control.h b/highs/ipm/ipx/control.h similarity index 100% rename from src/ipm/ipx/control.h rename to highs/ipm/ipx/control.h diff --git a/src/ipm/ipx/crossover.cc b/highs/ipm/ipx/crossover.cc similarity index 100% rename from src/ipm/ipx/crossover.cc rename to highs/ipm/ipx/crossover.cc diff --git a/src/ipm/ipx/crossover.h b/highs/ipm/ipx/crossover.h similarity index 100% rename from src/ipm/ipx/crossover.h rename to highs/ipm/ipx/crossover.h diff --git a/src/ipm/ipx/diagonal_precond.cc b/highs/ipm/ipx/diagonal_precond.cc similarity index 100% rename from src/ipm/ipx/diagonal_precond.cc rename to highs/ipm/ipx/diagonal_precond.cc diff --git a/src/ipm/ipx/diagonal_precond.h b/highs/ipm/ipx/diagonal_precond.h similarity index 100% rename from src/ipm/ipx/diagonal_precond.h rename to highs/ipm/ipx/diagonal_precond.h diff --git a/src/ipm/ipx/forrest_tomlin.cc b/highs/ipm/ipx/forrest_tomlin.cc similarity index 100% rename from src/ipm/ipx/forrest_tomlin.cc rename to highs/ipm/ipx/forrest_tomlin.cc diff --git a/src/ipm/ipx/forrest_tomlin.h b/highs/ipm/ipx/forrest_tomlin.h similarity index 100% rename from src/ipm/ipx/forrest_tomlin.h rename to highs/ipm/ipx/forrest_tomlin.h diff --git a/src/ipm/ipx/guess_basis.cc b/highs/ipm/ipx/guess_basis.cc similarity index 100% rename from src/ipm/ipx/guess_basis.cc rename to highs/ipm/ipx/guess_basis.cc diff --git a/src/ipm/ipx/guess_basis.h b/highs/ipm/ipx/guess_basis.h similarity index 100% rename from src/ipm/ipx/guess_basis.h rename to highs/ipm/ipx/guess_basis.h diff --git a/src/ipm/ipx/indexed_vector.cc b/highs/ipm/ipx/indexed_vector.cc similarity index 100% rename from src/ipm/ipx/indexed_vector.cc rename to highs/ipm/ipx/indexed_vector.cc diff --git a/src/ipm/ipx/indexed_vector.h b/highs/ipm/ipx/indexed_vector.h similarity index 100% rename from src/ipm/ipx/indexed_vector.h rename to highs/ipm/ipx/indexed_vector.h diff --git a/src/ipm/ipx/info.cc b/highs/ipm/ipx/info.cc similarity index 100% rename from src/ipm/ipx/info.cc rename to highs/ipm/ipx/info.cc diff --git a/src/ipm/ipx/info.h b/highs/ipm/ipx/info.h similarity index 100% rename from src/ipm/ipx/info.h rename to highs/ipm/ipx/info.h diff --git a/src/ipm/ipx/ipm.cc b/highs/ipm/ipx/ipm.cc similarity index 100% rename from src/ipm/ipx/ipm.cc rename to highs/ipm/ipx/ipm.cc diff --git a/src/ipm/ipx/ipm.h b/highs/ipm/ipx/ipm.h similarity index 100% rename from src/ipm/ipx/ipm.h rename to highs/ipm/ipx/ipm.h diff --git a/src/ipm/ipx/ipx_c.cc b/highs/ipm/ipx/ipx_c.cc similarity index 100% rename from src/ipm/ipx/ipx_c.cc rename to highs/ipm/ipx/ipx_c.cc diff --git a/src/ipm/ipx/ipx_c.h b/highs/ipm/ipx/ipx_c.h similarity index 96% rename from src/ipm/ipx/ipx_c.h rename to highs/ipm/ipx/ipx_c.h index b8af2ac0aa..f90fda498d 100644 --- a/src/ipm/ipx/ipx_c.h +++ b/highs/ipm/ipx/ipx_c.h @@ -10,7 +10,7 @@ extern "C"{ #endif /* These functions call their equivalent method of LpSolver for - the object pointed to by @self. See src/lp_solver.h for + the object pointed to by @self. See highs/lp_solver.h for documentation of the methods. */ ipxint ipx_load_model(void* self, ipxint num_var, const double* obj, const double* lb, const double* ub, ipxint num_constr, diff --git a/src/ipm/ipx/ipx_config.h b/highs/ipm/ipx/ipx_config.h similarity index 100% rename from src/ipm/ipx/ipx_config.h rename to highs/ipm/ipx/ipx_config.h diff --git a/src/ipm/ipx/ipx_info.h b/highs/ipm/ipx/ipx_info.h similarity index 100% rename from src/ipm/ipx/ipx_info.h rename to highs/ipm/ipx/ipx_info.h diff --git a/src/ipm/ipx/ipx_internal.h b/highs/ipm/ipx/ipx_internal.h similarity index 100% rename from src/ipm/ipx/ipx_internal.h rename to highs/ipm/ipx/ipx_internal.h diff --git a/src/ipm/ipx/ipx_parameters.h b/highs/ipm/ipx/ipx_parameters.h similarity index 100% rename from src/ipm/ipx/ipx_parameters.h rename to highs/ipm/ipx/ipx_parameters.h diff --git a/src/ipm/ipx/ipx_status.h b/highs/ipm/ipx/ipx_status.h similarity index 100% rename from src/ipm/ipx/ipx_status.h rename to highs/ipm/ipx/ipx_status.h diff --git a/src/ipm/ipx/iterate.cc b/highs/ipm/ipx/iterate.cc similarity index 100% rename from src/ipm/ipx/iterate.cc rename to highs/ipm/ipx/iterate.cc diff --git a/src/ipm/ipx/iterate.h b/highs/ipm/ipx/iterate.h similarity index 100% rename from src/ipm/ipx/iterate.h rename to highs/ipm/ipx/iterate.h diff --git a/src/ipm/ipx/kkt_solver.cc b/highs/ipm/ipx/kkt_solver.cc similarity index 100% rename from src/ipm/ipx/kkt_solver.cc rename to highs/ipm/ipx/kkt_solver.cc diff --git a/src/ipm/ipx/kkt_solver.h b/highs/ipm/ipx/kkt_solver.h similarity index 100% rename from src/ipm/ipx/kkt_solver.h rename to highs/ipm/ipx/kkt_solver.h diff --git a/src/ipm/ipx/kkt_solver_basis.cc b/highs/ipm/ipx/kkt_solver_basis.cc similarity index 100% rename from src/ipm/ipx/kkt_solver_basis.cc rename to highs/ipm/ipx/kkt_solver_basis.cc diff --git a/src/ipm/ipx/kkt_solver_basis.h b/highs/ipm/ipx/kkt_solver_basis.h similarity index 100% rename from src/ipm/ipx/kkt_solver_basis.h rename to highs/ipm/ipx/kkt_solver_basis.h diff --git a/src/ipm/ipx/kkt_solver_diag.cc b/highs/ipm/ipx/kkt_solver_diag.cc similarity index 100% rename from src/ipm/ipx/kkt_solver_diag.cc rename to highs/ipm/ipx/kkt_solver_diag.cc diff --git a/src/ipm/ipx/kkt_solver_diag.h b/highs/ipm/ipx/kkt_solver_diag.h similarity index 100% rename from src/ipm/ipx/kkt_solver_diag.h rename to highs/ipm/ipx/kkt_solver_diag.h diff --git a/src/ipm/ipx/linear_operator.cc b/highs/ipm/ipx/linear_operator.cc similarity index 100% rename from src/ipm/ipx/linear_operator.cc rename to highs/ipm/ipx/linear_operator.cc diff --git a/src/ipm/ipx/linear_operator.h b/highs/ipm/ipx/linear_operator.h similarity index 100% rename from src/ipm/ipx/linear_operator.h rename to highs/ipm/ipx/linear_operator.h diff --git a/src/ipm/ipx/lp_solver.cc b/highs/ipm/ipx/lp_solver.cc similarity index 100% rename from src/ipm/ipx/lp_solver.cc rename to highs/ipm/ipx/lp_solver.cc diff --git a/src/ipm/ipx/lp_solver.h b/highs/ipm/ipx/lp_solver.h similarity index 100% rename from src/ipm/ipx/lp_solver.h rename to highs/ipm/ipx/lp_solver.h diff --git a/src/ipm/ipx/lu_factorization.cc b/highs/ipm/ipx/lu_factorization.cc similarity index 100% rename from src/ipm/ipx/lu_factorization.cc rename to highs/ipm/ipx/lu_factorization.cc diff --git a/src/ipm/ipx/lu_factorization.h b/highs/ipm/ipx/lu_factorization.h similarity index 100% rename from src/ipm/ipx/lu_factorization.h rename to highs/ipm/ipx/lu_factorization.h diff --git a/src/ipm/ipx/lu_update.cc b/highs/ipm/ipx/lu_update.cc similarity index 100% rename from src/ipm/ipx/lu_update.cc rename to highs/ipm/ipx/lu_update.cc diff --git a/src/ipm/ipx/lu_update.h b/highs/ipm/ipx/lu_update.h similarity index 100% rename from src/ipm/ipx/lu_update.h rename to highs/ipm/ipx/lu_update.h diff --git a/src/ipm/ipx/maxvolume.cc b/highs/ipm/ipx/maxvolume.cc similarity index 100% rename from src/ipm/ipx/maxvolume.cc rename to highs/ipm/ipx/maxvolume.cc diff --git a/src/ipm/ipx/maxvolume.h b/highs/ipm/ipx/maxvolume.h similarity index 100% rename from src/ipm/ipx/maxvolume.h rename to highs/ipm/ipx/maxvolume.h diff --git a/src/ipm/ipx/model.cc b/highs/ipm/ipx/model.cc similarity index 100% rename from src/ipm/ipx/model.cc rename to highs/ipm/ipx/model.cc diff --git a/src/ipm/ipx/model.h b/highs/ipm/ipx/model.h similarity index 100% rename from src/ipm/ipx/model.h rename to highs/ipm/ipx/model.h diff --git a/src/ipm/ipx/multistream.h b/highs/ipm/ipx/multistream.h similarity index 100% rename from src/ipm/ipx/multistream.h rename to highs/ipm/ipx/multistream.h diff --git a/src/ipm/ipx/normal_matrix.cc b/highs/ipm/ipx/normal_matrix.cc similarity index 100% rename from src/ipm/ipx/normal_matrix.cc rename to highs/ipm/ipx/normal_matrix.cc diff --git a/src/ipm/ipx/normal_matrix.h b/highs/ipm/ipx/normal_matrix.h similarity index 100% rename from src/ipm/ipx/normal_matrix.h rename to highs/ipm/ipx/normal_matrix.h diff --git a/src/ipm/ipx/power_method.h b/highs/ipm/ipx/power_method.h similarity index 100% rename from src/ipm/ipx/power_method.h rename to highs/ipm/ipx/power_method.h diff --git a/src/ipm/ipx/sparse_matrix.cc b/highs/ipm/ipx/sparse_matrix.cc similarity index 100% rename from src/ipm/ipx/sparse_matrix.cc rename to highs/ipm/ipx/sparse_matrix.cc diff --git a/src/ipm/ipx/sparse_matrix.h b/highs/ipm/ipx/sparse_matrix.h similarity index 100% rename from src/ipm/ipx/sparse_matrix.h rename to highs/ipm/ipx/sparse_matrix.h diff --git a/src/ipm/ipx/sparse_utils.cc b/highs/ipm/ipx/sparse_utils.cc similarity index 100% rename from src/ipm/ipx/sparse_utils.cc rename to highs/ipm/ipx/sparse_utils.cc diff --git a/src/ipm/ipx/sparse_utils.h b/highs/ipm/ipx/sparse_utils.h similarity index 100% rename from src/ipm/ipx/sparse_utils.h rename to highs/ipm/ipx/sparse_utils.h diff --git a/src/ipm/ipx/splitted_normal_matrix.cc b/highs/ipm/ipx/splitted_normal_matrix.cc similarity index 100% rename from src/ipm/ipx/splitted_normal_matrix.cc rename to highs/ipm/ipx/splitted_normal_matrix.cc diff --git a/src/ipm/ipx/splitted_normal_matrix.h b/highs/ipm/ipx/splitted_normal_matrix.h similarity index 100% rename from src/ipm/ipx/splitted_normal_matrix.h rename to highs/ipm/ipx/splitted_normal_matrix.h diff --git a/src/ipm/ipx/starting_basis.cc b/highs/ipm/ipx/starting_basis.cc similarity index 100% rename from src/ipm/ipx/starting_basis.cc rename to highs/ipm/ipx/starting_basis.cc diff --git a/src/ipm/ipx/starting_basis.h b/highs/ipm/ipx/starting_basis.h similarity index 100% rename from src/ipm/ipx/starting_basis.h rename to highs/ipm/ipx/starting_basis.h diff --git a/src/ipm/ipx/symbolic_invert.cc b/highs/ipm/ipx/symbolic_invert.cc similarity index 100% rename from src/ipm/ipx/symbolic_invert.cc rename to highs/ipm/ipx/symbolic_invert.cc diff --git a/src/ipm/ipx/symbolic_invert.h b/highs/ipm/ipx/symbolic_invert.h similarity index 100% rename from src/ipm/ipx/symbolic_invert.h rename to highs/ipm/ipx/symbolic_invert.h diff --git a/src/ipm/ipx/timer.cc b/highs/ipm/ipx/timer.cc similarity index 100% rename from src/ipm/ipx/timer.cc rename to highs/ipm/ipx/timer.cc diff --git a/src/ipm/ipx/timer.h b/highs/ipm/ipx/timer.h similarity index 100% rename from src/ipm/ipx/timer.h rename to highs/ipm/ipx/timer.h diff --git a/src/ipm/ipx/utils.cc b/highs/ipm/ipx/utils.cc similarity index 100% rename from src/ipm/ipx/utils.cc rename to highs/ipm/ipx/utils.cc diff --git a/src/ipm/ipx/utils.h b/highs/ipm/ipx/utils.h similarity index 100% rename from src/ipm/ipx/utils.h rename to highs/ipm/ipx/utils.h diff --git a/src/lp_data/HConst.h b/highs/lp_data/HConst.h similarity index 100% rename from src/lp_data/HConst.h rename to highs/lp_data/HConst.h diff --git a/src/lp_data/HStruct.h b/highs/lp_data/HStruct.h similarity index 100% rename from src/lp_data/HStruct.h rename to highs/lp_data/HStruct.h diff --git a/src/lp_data/Highs.cpp b/highs/lp_data/Highs.cpp similarity index 100% rename from src/lp_data/Highs.cpp rename to highs/lp_data/Highs.cpp diff --git a/src/lp_data/HighsAnalysis.h b/highs/lp_data/HighsAnalysis.h similarity index 100% rename from src/lp_data/HighsAnalysis.h rename to highs/lp_data/HighsAnalysis.h diff --git a/src/lp_data/HighsCallback.cpp b/highs/lp_data/HighsCallback.cpp similarity index 100% rename from src/lp_data/HighsCallback.cpp rename to highs/lp_data/HighsCallback.cpp diff --git a/src/lp_data/HighsCallback.h b/highs/lp_data/HighsCallback.h similarity index 100% rename from src/lp_data/HighsCallback.h rename to highs/lp_data/HighsCallback.h diff --git a/src/lp_data/HighsCallbackStruct.h b/highs/lp_data/HighsCallbackStruct.h similarity index 100% rename from src/lp_data/HighsCallbackStruct.h rename to highs/lp_data/HighsCallbackStruct.h diff --git a/src/lp_data/HighsDebug.cpp b/highs/lp_data/HighsDebug.cpp similarity index 100% rename from src/lp_data/HighsDebug.cpp rename to highs/lp_data/HighsDebug.cpp diff --git a/src/lp_data/HighsDebug.h b/highs/lp_data/HighsDebug.h similarity index 100% rename from src/lp_data/HighsDebug.h rename to highs/lp_data/HighsDebug.h diff --git a/src/lp_data/HighsDeprecated.cpp b/highs/lp_data/HighsDeprecated.cpp similarity index 100% rename from src/lp_data/HighsDeprecated.cpp rename to highs/lp_data/HighsDeprecated.cpp diff --git a/src/lp_data/HighsIis.cpp b/highs/lp_data/HighsIis.cpp similarity index 100% rename from src/lp_data/HighsIis.cpp rename to highs/lp_data/HighsIis.cpp diff --git a/src/lp_data/HighsIis.h b/highs/lp_data/HighsIis.h similarity index 100% rename from src/lp_data/HighsIis.h rename to highs/lp_data/HighsIis.h diff --git a/src/lp_data/HighsInfo.cpp b/highs/lp_data/HighsInfo.cpp similarity index 100% rename from src/lp_data/HighsInfo.cpp rename to highs/lp_data/HighsInfo.cpp diff --git a/src/lp_data/HighsInfo.h b/highs/lp_data/HighsInfo.h similarity index 100% rename from src/lp_data/HighsInfo.h rename to highs/lp_data/HighsInfo.h diff --git a/src/lp_data/HighsInfoDebug.cpp b/highs/lp_data/HighsInfoDebug.cpp similarity index 100% rename from src/lp_data/HighsInfoDebug.cpp rename to highs/lp_data/HighsInfoDebug.cpp diff --git a/src/lp_data/HighsInfoDebug.h b/highs/lp_data/HighsInfoDebug.h similarity index 100% rename from src/lp_data/HighsInfoDebug.h rename to highs/lp_data/HighsInfoDebug.h diff --git a/src/lp_data/HighsInterface.cpp b/highs/lp_data/HighsInterface.cpp similarity index 100% rename from src/lp_data/HighsInterface.cpp rename to highs/lp_data/HighsInterface.cpp diff --git a/src/lp_data/HighsLp.cpp b/highs/lp_data/HighsLp.cpp similarity index 100% rename from src/lp_data/HighsLp.cpp rename to highs/lp_data/HighsLp.cpp diff --git a/src/lp_data/HighsLp.h b/highs/lp_data/HighsLp.h similarity index 100% rename from src/lp_data/HighsLp.h rename to highs/lp_data/HighsLp.h diff --git a/src/lp_data/HighsLpSolverObject.h b/highs/lp_data/HighsLpSolverObject.h similarity index 100% rename from src/lp_data/HighsLpSolverObject.h rename to highs/lp_data/HighsLpSolverObject.h diff --git a/src/lp_data/HighsLpUtils.cpp b/highs/lp_data/HighsLpUtils.cpp similarity index 100% rename from src/lp_data/HighsLpUtils.cpp rename to highs/lp_data/HighsLpUtils.cpp diff --git a/src/lp_data/HighsLpUtils.h b/highs/lp_data/HighsLpUtils.h similarity index 100% rename from src/lp_data/HighsLpUtils.h rename to highs/lp_data/HighsLpUtils.h diff --git a/src/lp_data/HighsModelUtils.cpp b/highs/lp_data/HighsModelUtils.cpp similarity index 100% rename from src/lp_data/HighsModelUtils.cpp rename to highs/lp_data/HighsModelUtils.cpp diff --git a/src/lp_data/HighsModelUtils.h b/highs/lp_data/HighsModelUtils.h similarity index 100% rename from src/lp_data/HighsModelUtils.h rename to highs/lp_data/HighsModelUtils.h diff --git a/src/lp_data/HighsOptions.cpp b/highs/lp_data/HighsOptions.cpp similarity index 100% rename from src/lp_data/HighsOptions.cpp rename to highs/lp_data/HighsOptions.cpp diff --git a/src/lp_data/HighsOptions.h b/highs/lp_data/HighsOptions.h similarity index 100% rename from src/lp_data/HighsOptions.h rename to highs/lp_data/HighsOptions.h diff --git a/src/lp_data/HighsRanging.cpp b/highs/lp_data/HighsRanging.cpp similarity index 100% rename from src/lp_data/HighsRanging.cpp rename to highs/lp_data/HighsRanging.cpp diff --git a/src/lp_data/HighsRanging.h b/highs/lp_data/HighsRanging.h similarity index 100% rename from src/lp_data/HighsRanging.h rename to highs/lp_data/HighsRanging.h diff --git a/src/lp_data/HighsSolution.cpp b/highs/lp_data/HighsSolution.cpp similarity index 100% rename from src/lp_data/HighsSolution.cpp rename to highs/lp_data/HighsSolution.cpp diff --git a/src/lp_data/HighsSolution.h b/highs/lp_data/HighsSolution.h similarity index 100% rename from src/lp_data/HighsSolution.h rename to highs/lp_data/HighsSolution.h diff --git a/src/lp_data/HighsSolutionDebug.cpp b/highs/lp_data/HighsSolutionDebug.cpp similarity index 100% rename from src/lp_data/HighsSolutionDebug.cpp rename to highs/lp_data/HighsSolutionDebug.cpp diff --git a/src/lp_data/HighsSolutionDebug.h b/highs/lp_data/HighsSolutionDebug.h similarity index 100% rename from src/lp_data/HighsSolutionDebug.h rename to highs/lp_data/HighsSolutionDebug.h diff --git a/src/lp_data/HighsSolve.cpp b/highs/lp_data/HighsSolve.cpp similarity index 100% rename from src/lp_data/HighsSolve.cpp rename to highs/lp_data/HighsSolve.cpp diff --git a/src/lp_data/HighsSolve.h b/highs/lp_data/HighsSolve.h similarity index 100% rename from src/lp_data/HighsSolve.h rename to highs/lp_data/HighsSolve.h diff --git a/src/lp_data/HighsStatus.cpp b/highs/lp_data/HighsStatus.cpp similarity index 100% rename from src/lp_data/HighsStatus.cpp rename to highs/lp_data/HighsStatus.cpp diff --git a/src/lp_data/HighsStatus.h b/highs/lp_data/HighsStatus.h similarity index 100% rename from src/lp_data/HighsStatus.h rename to highs/lp_data/HighsStatus.h diff --git a/src/meson.build b/highs/meson.build similarity index 100% rename from src/meson.build rename to highs/meson.build diff --git a/src/mip/HighsCliqueTable.cpp b/highs/mip/HighsCliqueTable.cpp similarity index 100% rename from src/mip/HighsCliqueTable.cpp rename to highs/mip/HighsCliqueTable.cpp diff --git a/src/mip/HighsCliqueTable.h b/highs/mip/HighsCliqueTable.h similarity index 100% rename from src/mip/HighsCliqueTable.h rename to highs/mip/HighsCliqueTable.h diff --git a/src/mip/HighsConflictPool.cpp b/highs/mip/HighsConflictPool.cpp similarity index 100% rename from src/mip/HighsConflictPool.cpp rename to highs/mip/HighsConflictPool.cpp diff --git a/src/mip/HighsConflictPool.h b/highs/mip/HighsConflictPool.h similarity index 100% rename from src/mip/HighsConflictPool.h rename to highs/mip/HighsConflictPool.h diff --git a/src/mip/HighsCutGeneration.cpp b/highs/mip/HighsCutGeneration.cpp similarity index 100% rename from src/mip/HighsCutGeneration.cpp rename to highs/mip/HighsCutGeneration.cpp diff --git a/src/mip/HighsCutGeneration.h b/highs/mip/HighsCutGeneration.h similarity index 100% rename from src/mip/HighsCutGeneration.h rename to highs/mip/HighsCutGeneration.h diff --git a/src/mip/HighsCutPool.cpp b/highs/mip/HighsCutPool.cpp similarity index 100% rename from src/mip/HighsCutPool.cpp rename to highs/mip/HighsCutPool.cpp diff --git a/src/mip/HighsCutPool.h b/highs/mip/HighsCutPool.h similarity index 100% rename from src/mip/HighsCutPool.h rename to highs/mip/HighsCutPool.h diff --git a/src/mip/HighsDebugSol.cpp b/highs/mip/HighsDebugSol.cpp similarity index 100% rename from src/mip/HighsDebugSol.cpp rename to highs/mip/HighsDebugSol.cpp diff --git a/src/mip/HighsDebugSol.h b/highs/mip/HighsDebugSol.h similarity index 100% rename from src/mip/HighsDebugSol.h rename to highs/mip/HighsDebugSol.h diff --git a/src/mip/HighsDomain.cpp b/highs/mip/HighsDomain.cpp similarity index 100% rename from src/mip/HighsDomain.cpp rename to highs/mip/HighsDomain.cpp diff --git a/src/mip/HighsDomain.h b/highs/mip/HighsDomain.h similarity index 100% rename from src/mip/HighsDomain.h rename to highs/mip/HighsDomain.h diff --git a/src/mip/HighsDomainChange.h b/highs/mip/HighsDomainChange.h similarity index 100% rename from src/mip/HighsDomainChange.h rename to highs/mip/HighsDomainChange.h diff --git a/src/mip/HighsDynamicRowMatrix.cpp b/highs/mip/HighsDynamicRowMatrix.cpp similarity index 100% rename from src/mip/HighsDynamicRowMatrix.cpp rename to highs/mip/HighsDynamicRowMatrix.cpp diff --git a/src/mip/HighsDynamicRowMatrix.h b/highs/mip/HighsDynamicRowMatrix.h similarity index 100% rename from src/mip/HighsDynamicRowMatrix.h rename to highs/mip/HighsDynamicRowMatrix.h diff --git a/src/mip/HighsGFkSolve.cpp b/highs/mip/HighsGFkSolve.cpp similarity index 100% rename from src/mip/HighsGFkSolve.cpp rename to highs/mip/HighsGFkSolve.cpp diff --git a/src/mip/HighsGFkSolve.h b/highs/mip/HighsGFkSolve.h similarity index 100% rename from src/mip/HighsGFkSolve.h rename to highs/mip/HighsGFkSolve.h diff --git a/src/mip/HighsImplications.cpp b/highs/mip/HighsImplications.cpp similarity index 100% rename from src/mip/HighsImplications.cpp rename to highs/mip/HighsImplications.cpp diff --git a/src/mip/HighsImplications.h b/highs/mip/HighsImplications.h similarity index 100% rename from src/mip/HighsImplications.h rename to highs/mip/HighsImplications.h diff --git a/src/mip/HighsLpAggregator.cpp b/highs/mip/HighsLpAggregator.cpp similarity index 100% rename from src/mip/HighsLpAggregator.cpp rename to highs/mip/HighsLpAggregator.cpp diff --git a/src/mip/HighsLpAggregator.h b/highs/mip/HighsLpAggregator.h similarity index 100% rename from src/mip/HighsLpAggregator.h rename to highs/mip/HighsLpAggregator.h diff --git a/src/mip/HighsLpRelaxation.cpp b/highs/mip/HighsLpRelaxation.cpp similarity index 100% rename from src/mip/HighsLpRelaxation.cpp rename to highs/mip/HighsLpRelaxation.cpp diff --git a/src/mip/HighsLpRelaxation.h b/highs/mip/HighsLpRelaxation.h similarity index 100% rename from src/mip/HighsLpRelaxation.h rename to highs/mip/HighsLpRelaxation.h diff --git a/src/mip/HighsMipAnalysis.cpp b/highs/mip/HighsMipAnalysis.cpp similarity index 100% rename from src/mip/HighsMipAnalysis.cpp rename to highs/mip/HighsMipAnalysis.cpp diff --git a/src/mip/HighsMipAnalysis.h b/highs/mip/HighsMipAnalysis.h similarity index 100% rename from src/mip/HighsMipAnalysis.h rename to highs/mip/HighsMipAnalysis.h diff --git a/src/mip/HighsMipSolver.cpp b/highs/mip/HighsMipSolver.cpp similarity index 100% rename from src/mip/HighsMipSolver.cpp rename to highs/mip/HighsMipSolver.cpp diff --git a/src/mip/HighsMipSolver.h b/highs/mip/HighsMipSolver.h similarity index 100% rename from src/mip/HighsMipSolver.h rename to highs/mip/HighsMipSolver.h diff --git a/src/mip/HighsMipSolverData.cpp b/highs/mip/HighsMipSolverData.cpp similarity index 100% rename from src/mip/HighsMipSolverData.cpp rename to highs/mip/HighsMipSolverData.cpp diff --git a/src/mip/HighsMipSolverData.h b/highs/mip/HighsMipSolverData.h similarity index 100% rename from src/mip/HighsMipSolverData.h rename to highs/mip/HighsMipSolverData.h diff --git a/src/mip/HighsModkSeparator.cpp b/highs/mip/HighsModkSeparator.cpp similarity index 100% rename from src/mip/HighsModkSeparator.cpp rename to highs/mip/HighsModkSeparator.cpp diff --git a/src/mip/HighsModkSeparator.h b/highs/mip/HighsModkSeparator.h similarity index 100% rename from src/mip/HighsModkSeparator.h rename to highs/mip/HighsModkSeparator.h diff --git a/src/mip/HighsNodeQueue.cpp b/highs/mip/HighsNodeQueue.cpp similarity index 100% rename from src/mip/HighsNodeQueue.cpp rename to highs/mip/HighsNodeQueue.cpp diff --git a/src/mip/HighsNodeQueue.h b/highs/mip/HighsNodeQueue.h similarity index 100% rename from src/mip/HighsNodeQueue.h rename to highs/mip/HighsNodeQueue.h diff --git a/src/mip/HighsObjectiveFunction.cpp b/highs/mip/HighsObjectiveFunction.cpp similarity index 100% rename from src/mip/HighsObjectiveFunction.cpp rename to highs/mip/HighsObjectiveFunction.cpp diff --git a/src/mip/HighsObjectiveFunction.h b/highs/mip/HighsObjectiveFunction.h similarity index 100% rename from src/mip/HighsObjectiveFunction.h rename to highs/mip/HighsObjectiveFunction.h diff --git a/src/mip/HighsPathSeparator.cpp b/highs/mip/HighsPathSeparator.cpp similarity index 100% rename from src/mip/HighsPathSeparator.cpp rename to highs/mip/HighsPathSeparator.cpp diff --git a/src/mip/HighsPathSeparator.h b/highs/mip/HighsPathSeparator.h similarity index 100% rename from src/mip/HighsPathSeparator.h rename to highs/mip/HighsPathSeparator.h diff --git a/src/mip/HighsPrimalHeuristics.cpp b/highs/mip/HighsPrimalHeuristics.cpp similarity index 100% rename from src/mip/HighsPrimalHeuristics.cpp rename to highs/mip/HighsPrimalHeuristics.cpp diff --git a/src/mip/HighsPrimalHeuristics.h b/highs/mip/HighsPrimalHeuristics.h similarity index 100% rename from src/mip/HighsPrimalHeuristics.h rename to highs/mip/HighsPrimalHeuristics.h diff --git a/src/mip/HighsPseudocost.cpp b/highs/mip/HighsPseudocost.cpp similarity index 100% rename from src/mip/HighsPseudocost.cpp rename to highs/mip/HighsPseudocost.cpp diff --git a/src/mip/HighsPseudocost.h b/highs/mip/HighsPseudocost.h similarity index 100% rename from src/mip/HighsPseudocost.h rename to highs/mip/HighsPseudocost.h diff --git a/src/mip/HighsRedcostFixing.cpp b/highs/mip/HighsRedcostFixing.cpp similarity index 100% rename from src/mip/HighsRedcostFixing.cpp rename to highs/mip/HighsRedcostFixing.cpp diff --git a/src/mip/HighsRedcostFixing.h b/highs/mip/HighsRedcostFixing.h similarity index 100% rename from src/mip/HighsRedcostFixing.h rename to highs/mip/HighsRedcostFixing.h diff --git a/src/mip/HighsSearch.cpp b/highs/mip/HighsSearch.cpp similarity index 100% rename from src/mip/HighsSearch.cpp rename to highs/mip/HighsSearch.cpp diff --git a/src/mip/HighsSearch.h b/highs/mip/HighsSearch.h similarity index 100% rename from src/mip/HighsSearch.h rename to highs/mip/HighsSearch.h diff --git a/src/mip/HighsSeparation.cpp b/highs/mip/HighsSeparation.cpp similarity index 100% rename from src/mip/HighsSeparation.cpp rename to highs/mip/HighsSeparation.cpp diff --git a/src/mip/HighsSeparation.h b/highs/mip/HighsSeparation.h similarity index 100% rename from src/mip/HighsSeparation.h rename to highs/mip/HighsSeparation.h diff --git a/src/mip/HighsSeparator.cpp b/highs/mip/HighsSeparator.cpp similarity index 100% rename from src/mip/HighsSeparator.cpp rename to highs/mip/HighsSeparator.cpp diff --git a/src/mip/HighsSeparator.h b/highs/mip/HighsSeparator.h similarity index 100% rename from src/mip/HighsSeparator.h rename to highs/mip/HighsSeparator.h diff --git a/src/mip/HighsTableauSeparator.cpp b/highs/mip/HighsTableauSeparator.cpp similarity index 100% rename from src/mip/HighsTableauSeparator.cpp rename to highs/mip/HighsTableauSeparator.cpp diff --git a/src/mip/HighsTableauSeparator.h b/highs/mip/HighsTableauSeparator.h similarity index 100% rename from src/mip/HighsTableauSeparator.h rename to highs/mip/HighsTableauSeparator.h diff --git a/src/mip/HighsTransformedLp.cpp b/highs/mip/HighsTransformedLp.cpp similarity index 100% rename from src/mip/HighsTransformedLp.cpp rename to highs/mip/HighsTransformedLp.cpp diff --git a/src/mip/HighsTransformedLp.h b/highs/mip/HighsTransformedLp.h similarity index 100% rename from src/mip/HighsTransformedLp.h rename to highs/mip/HighsTransformedLp.h diff --git a/src/mip/MipTimer.h b/highs/mip/MipTimer.h similarity index 100% rename from src/mip/MipTimer.h rename to highs/mip/MipTimer.h diff --git a/src/model/HighsHessian.cpp b/highs/model/HighsHessian.cpp similarity index 100% rename from src/model/HighsHessian.cpp rename to highs/model/HighsHessian.cpp diff --git a/src/model/HighsHessian.h b/highs/model/HighsHessian.h similarity index 100% rename from src/model/HighsHessian.h rename to highs/model/HighsHessian.h diff --git a/src/model/HighsHessianUtils.cpp b/highs/model/HighsHessianUtils.cpp similarity index 100% rename from src/model/HighsHessianUtils.cpp rename to highs/model/HighsHessianUtils.cpp diff --git a/src/model/HighsHessianUtils.h b/highs/model/HighsHessianUtils.h similarity index 100% rename from src/model/HighsHessianUtils.h rename to highs/model/HighsHessianUtils.h diff --git a/src/model/HighsModel.cpp b/highs/model/HighsModel.cpp similarity index 100% rename from src/model/HighsModel.cpp rename to highs/model/HighsModel.cpp diff --git a/src/model/HighsModel.h b/highs/model/HighsModel.h similarity index 100% rename from src/model/HighsModel.h rename to highs/model/HighsModel.h diff --git a/src/parallel/HighsBinarySemaphore.h b/highs/parallel/HighsBinarySemaphore.h similarity index 100% rename from src/parallel/HighsBinarySemaphore.h rename to highs/parallel/HighsBinarySemaphore.h diff --git a/src/parallel/HighsCacheAlign.h b/highs/parallel/HighsCacheAlign.h similarity index 100% rename from src/parallel/HighsCacheAlign.h rename to highs/parallel/HighsCacheAlign.h diff --git a/src/parallel/HighsCombinable.h b/highs/parallel/HighsCombinable.h similarity index 100% rename from src/parallel/HighsCombinable.h rename to highs/parallel/HighsCombinable.h diff --git a/src/parallel/HighsMutex.h b/highs/parallel/HighsMutex.h similarity index 100% rename from src/parallel/HighsMutex.h rename to highs/parallel/HighsMutex.h diff --git a/src/parallel/HighsParallel.h b/highs/parallel/HighsParallel.h similarity index 100% rename from src/parallel/HighsParallel.h rename to highs/parallel/HighsParallel.h diff --git a/src/parallel/HighsRaceTimer.h b/highs/parallel/HighsRaceTimer.h similarity index 100% rename from src/parallel/HighsRaceTimer.h rename to highs/parallel/HighsRaceTimer.h diff --git a/src/parallel/HighsSchedulerConstants.h b/highs/parallel/HighsSchedulerConstants.h similarity index 100% rename from src/parallel/HighsSchedulerConstants.h rename to highs/parallel/HighsSchedulerConstants.h diff --git a/src/parallel/HighsSpinMutex.h b/highs/parallel/HighsSpinMutex.h similarity index 100% rename from src/parallel/HighsSpinMutex.h rename to highs/parallel/HighsSpinMutex.h diff --git a/src/parallel/HighsSplitDeque.h b/highs/parallel/HighsSplitDeque.h similarity index 100% rename from src/parallel/HighsSplitDeque.h rename to highs/parallel/HighsSplitDeque.h diff --git a/src/parallel/HighsTask.h b/highs/parallel/HighsTask.h similarity index 100% rename from src/parallel/HighsTask.h rename to highs/parallel/HighsTask.h diff --git a/src/parallel/HighsTaskExecutor.cpp b/highs/parallel/HighsTaskExecutor.cpp similarity index 100% rename from src/parallel/HighsTaskExecutor.cpp rename to highs/parallel/HighsTaskExecutor.cpp diff --git a/src/parallel/HighsTaskExecutor.h b/highs/parallel/HighsTaskExecutor.h similarity index 100% rename from src/parallel/HighsTaskExecutor.h rename to highs/parallel/HighsTaskExecutor.h diff --git a/src/pdlp/CupdlpWrapper.cpp b/highs/pdlp/CupdlpWrapper.cpp similarity index 100% rename from src/pdlp/CupdlpWrapper.cpp rename to highs/pdlp/CupdlpWrapper.cpp diff --git a/src/pdlp/CupdlpWrapper.h b/highs/pdlp/CupdlpWrapper.h similarity index 100% rename from src/pdlp/CupdlpWrapper.h rename to highs/pdlp/CupdlpWrapper.h diff --git a/src/pdlp/README.md b/highs/pdlp/README.md similarity index 100% rename from src/pdlp/README.md rename to highs/pdlp/README.md diff --git a/src/pdlp/cupdlp/Diff b/highs/pdlp/cupdlp/Diff similarity index 100% rename from src/pdlp/cupdlp/Diff rename to highs/pdlp/cupdlp/Diff diff --git a/src/pdlp/cupdlp/Meld b/highs/pdlp/cupdlp/Meld similarity index 100% rename from src/pdlp/cupdlp/Meld rename to highs/pdlp/cupdlp/Meld diff --git a/src/pdlp/cupdlp/Merge b/highs/pdlp/cupdlp/Merge similarity index 100% rename from src/pdlp/cupdlp/Merge rename to highs/pdlp/cupdlp/Merge diff --git a/src/pdlp/cupdlp/README.md b/highs/pdlp/cupdlp/README.md similarity index 82% rename from src/pdlp/cupdlp/README.md rename to highs/pdlp/cupdlp/README.md index 55cd8a9ffd..4863b9ff29 100644 --- a/src/pdlp/cupdlp/README.md +++ b/highs/pdlp/cupdlp/README.md @@ -32,7 +32,7 @@ now, as CUPDLP_CPU is set ## Use of macro definitions within C++ -When definitions in [glbopts.h](https://github.com/ERGO-Code/HiGHS/blob/add-pdlp/src/pdlp/cupdlp/glbopts.h) such as the following are used in [CupdlpWrapper.cpp](https://github.com/ERGO-Code/HiGHS/blob/add-pdlp/src/pdlp/CupdlpWrapper.cpp) there is a g++ compiler error, because `typeof` isn't recognised +When definitions in `glbopts.h` are used in `CupdlpWrapper.cpp` there is a g++ compiler error, because `typeof` isn't recognised > #define CUPDLP_INIT(var, size) \ { \ @@ -57,11 +57,11 @@ Three methods * `void cupdlp_haslb(cupdlp_float *haslb, const cupdlp_float *lb, const cupdlp_float bound, const cupdlp_int len);` * `void cupdlp_hasub(cupdlp_float *hasub, const cupdlp_float *ub, const cupdlp_float bound, const cupdlp_int len);` -are declared in [cupdlp_linalg.h](https://github.com/ERGO-Code/HiGHS/blob/add-pdlp/src/pdlp/cupdlp/cupdlp_linalg.h) and defined in [cupdlp_linalg.c](https://github.com/ERGO-Code/HiGHS/blob/add-pdlp/src/pdlp/cupdlp/cupdlp_linalg.c) but not picked up by g++. Hence duplicate methods are declared and defined in [CupdlpWrapper.h](https://github.com/ERGO-Code/HiGHS/blob/add-pdlp/src/pdlp/CupdlpWrapper.h) and [CupdlpWrapper.cpp](https://github.com/ERGO-Code/HiGHS/blob/add-pdlp/src/pdlp/CupdlpWrapper.cpp). +are declared in `cupdlp_linalg.h` and defined in `cupdlp_linalg.c` but not picked up by g++. Hence duplicate methods are declared and defined in `CupdlpWrapper.h` and `CupdlpWrapper.cpp`. ## Use of macro definitions within C -Although the macro definitions in [glbopts.h](https://github.com/ERGO-Code/HiGHS/blob/add-pdlp/src/pdlp/cupdlp/glbopts.h) are fine when used in C under Linux, they cause the following compiler errors on Windows. +Although the macro definitions in `glbopts.h` are fine when used in C under Linux, they cause the following compiler errors on Windows. > error C2146: syntax error: missing ';' before identifier 'calloc' (or 'malloc') diff --git a/src/pdlp/cupdlp/cuda/CMakeLists.txt b/highs/pdlp/cupdlp/cuda/CMakeLists.txt similarity index 100% rename from src/pdlp/cupdlp/cuda/CMakeLists.txt rename to highs/pdlp/cupdlp/cuda/CMakeLists.txt diff --git a/src/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu b/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu similarity index 100% rename from src/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu rename to highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cu diff --git a/src/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh b/highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh similarity index 100% rename from src/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh rename to highs/pdlp/cupdlp/cuda/cupdlp_cuda_kernels.cuh diff --git a/src/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu b/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu similarity index 100% rename from src/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu rename to highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cu diff --git a/src/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh b/highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh similarity index 100% rename from src/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh rename to highs/pdlp/cupdlp/cuda/cupdlp_cudalinalg.cuh diff --git a/src/pdlp/cupdlp/cuda/test_cublas.c b/highs/pdlp/cupdlp/cuda/test_cublas.c similarity index 100% rename from src/pdlp/cupdlp/cuda/test_cublas.c rename to highs/pdlp/cupdlp/cuda/test_cublas.c diff --git a/src/pdlp/cupdlp/cuda/test_cuda_linalg.c b/highs/pdlp/cupdlp/cuda/test_cuda_linalg.c similarity index 100% rename from src/pdlp/cupdlp/cuda/test_cuda_linalg.c rename to highs/pdlp/cupdlp/cuda/test_cuda_linalg.c diff --git a/src/pdlp/cupdlp/cupdlp.h b/highs/pdlp/cupdlp/cupdlp.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp.h rename to highs/pdlp/cupdlp/cupdlp.h diff --git a/src/pdlp/cupdlp/cupdlp_cs.c b/highs/pdlp/cupdlp/cupdlp_cs.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_cs.c rename to highs/pdlp/cupdlp/cupdlp_cs.c diff --git a/src/pdlp/cupdlp/cupdlp_cs.h b/highs/pdlp/cupdlp/cupdlp_cs.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_cs.h rename to highs/pdlp/cupdlp/cupdlp_cs.h diff --git a/src/pdlp/cupdlp/cupdlp_defs.h b/highs/pdlp/cupdlp/cupdlp_defs.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_defs.h rename to highs/pdlp/cupdlp/cupdlp_defs.h diff --git a/src/pdlp/cupdlp/cupdlp_linalg.c b/highs/pdlp/cupdlp/cupdlp_linalg.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_linalg.c rename to highs/pdlp/cupdlp/cupdlp_linalg.c diff --git a/src/pdlp/cupdlp/cupdlp_linalg.h b/highs/pdlp/cupdlp/cupdlp_linalg.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_linalg.h rename to highs/pdlp/cupdlp/cupdlp_linalg.h diff --git a/src/pdlp/cupdlp/cupdlp_proj.c b/highs/pdlp/cupdlp/cupdlp_proj.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_proj.c rename to highs/pdlp/cupdlp/cupdlp_proj.c diff --git a/src/pdlp/cupdlp/cupdlp_proj.h b/highs/pdlp/cupdlp/cupdlp_proj.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_proj.h rename to highs/pdlp/cupdlp/cupdlp_proj.h diff --git a/src/pdlp/cupdlp/cupdlp_restart.c b/highs/pdlp/cupdlp/cupdlp_restart.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_restart.c rename to highs/pdlp/cupdlp/cupdlp_restart.c diff --git a/src/pdlp/cupdlp/cupdlp_restart.h b/highs/pdlp/cupdlp/cupdlp_restart.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_restart.h rename to highs/pdlp/cupdlp/cupdlp_restart.h diff --git a/src/pdlp/cupdlp/cupdlp_scaling.c b/highs/pdlp/cupdlp/cupdlp_scaling.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_scaling.c rename to highs/pdlp/cupdlp/cupdlp_scaling.c diff --git a/src/pdlp/cupdlp/cupdlp_scaling.h b/highs/pdlp/cupdlp/cupdlp_scaling.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_scaling.h rename to highs/pdlp/cupdlp/cupdlp_scaling.h diff --git a/src/pdlp/cupdlp/cupdlp_solver.c b/highs/pdlp/cupdlp/cupdlp_solver.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_solver.c rename to highs/pdlp/cupdlp/cupdlp_solver.c diff --git a/src/pdlp/cupdlp/cupdlp_solver.h b/highs/pdlp/cupdlp/cupdlp_solver.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_solver.h rename to highs/pdlp/cupdlp/cupdlp_solver.h diff --git a/src/pdlp/cupdlp/cupdlp_step.c b/highs/pdlp/cupdlp/cupdlp_step.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_step.c rename to highs/pdlp/cupdlp/cupdlp_step.c diff --git a/src/pdlp/cupdlp/cupdlp_step.h b/highs/pdlp/cupdlp/cupdlp_step.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_step.h rename to highs/pdlp/cupdlp/cupdlp_step.h diff --git a/src/pdlp/cupdlp/cupdlp_utils.c b/highs/pdlp/cupdlp/cupdlp_utils.c similarity index 100% rename from src/pdlp/cupdlp/cupdlp_utils.c rename to highs/pdlp/cupdlp/cupdlp_utils.c diff --git a/src/pdlp/cupdlp/cupdlp_utils.h b/highs/pdlp/cupdlp/cupdlp_utils.h similarity index 100% rename from src/pdlp/cupdlp/cupdlp_utils.h rename to highs/pdlp/cupdlp/cupdlp_utils.h diff --git a/src/pdlp/cupdlp/glbopts.h b/highs/pdlp/cupdlp/glbopts.h similarity index 100% rename from src/pdlp/cupdlp/glbopts.h rename to highs/pdlp/cupdlp/glbopts.h diff --git a/src/presolve/HPresolve.cpp b/highs/presolve/HPresolve.cpp similarity index 100% rename from src/presolve/HPresolve.cpp rename to highs/presolve/HPresolve.cpp diff --git a/src/presolve/HPresolve.h b/highs/presolve/HPresolve.h similarity index 100% rename from src/presolve/HPresolve.h rename to highs/presolve/HPresolve.h diff --git a/src/presolve/HPresolveAnalysis.cpp b/highs/presolve/HPresolveAnalysis.cpp similarity index 100% rename from src/presolve/HPresolveAnalysis.cpp rename to highs/presolve/HPresolveAnalysis.cpp diff --git a/src/presolve/HPresolveAnalysis.h b/highs/presolve/HPresolveAnalysis.h similarity index 100% rename from src/presolve/HPresolveAnalysis.h rename to highs/presolve/HPresolveAnalysis.h diff --git a/src/presolve/HighsPostsolveStack.cpp b/highs/presolve/HighsPostsolveStack.cpp similarity index 100% rename from src/presolve/HighsPostsolveStack.cpp rename to highs/presolve/HighsPostsolveStack.cpp diff --git a/src/presolve/HighsPostsolveStack.h b/highs/presolve/HighsPostsolveStack.h similarity index 100% rename from src/presolve/HighsPostsolveStack.h rename to highs/presolve/HighsPostsolveStack.h diff --git a/src/presolve/HighsSymmetry.cpp b/highs/presolve/HighsSymmetry.cpp similarity index 100% rename from src/presolve/HighsSymmetry.cpp rename to highs/presolve/HighsSymmetry.cpp diff --git a/src/presolve/HighsSymmetry.h b/highs/presolve/HighsSymmetry.h similarity index 100% rename from src/presolve/HighsSymmetry.h rename to highs/presolve/HighsSymmetry.h diff --git a/src/presolve/ICrash.cpp b/highs/presolve/ICrash.cpp similarity index 100% rename from src/presolve/ICrash.cpp rename to highs/presolve/ICrash.cpp diff --git a/src/presolve/ICrash.h b/highs/presolve/ICrash.h similarity index 100% rename from src/presolve/ICrash.h rename to highs/presolve/ICrash.h diff --git a/src/presolve/ICrashUtil.cpp b/highs/presolve/ICrashUtil.cpp similarity index 100% rename from src/presolve/ICrashUtil.cpp rename to highs/presolve/ICrashUtil.cpp diff --git a/src/presolve/ICrashUtil.h b/highs/presolve/ICrashUtil.h similarity index 100% rename from src/presolve/ICrashUtil.h rename to highs/presolve/ICrashUtil.h diff --git a/src/presolve/ICrashX.cpp b/highs/presolve/ICrashX.cpp similarity index 100% rename from src/presolve/ICrashX.cpp rename to highs/presolve/ICrashX.cpp diff --git a/src/presolve/ICrashX.h b/highs/presolve/ICrashX.h similarity index 100% rename from src/presolve/ICrashX.h rename to highs/presolve/ICrashX.h diff --git a/src/presolve/PresolveComponent.cpp b/highs/presolve/PresolveComponent.cpp similarity index 100% rename from src/presolve/PresolveComponent.cpp rename to highs/presolve/PresolveComponent.cpp diff --git a/src/presolve/PresolveComponent.h b/highs/presolve/PresolveComponent.h similarity index 100% rename from src/presolve/PresolveComponent.h rename to highs/presolve/PresolveComponent.h diff --git a/src/qpsolver/a_asm.cpp b/highs/qpsolver/a_asm.cpp similarity index 100% rename from src/qpsolver/a_asm.cpp rename to highs/qpsolver/a_asm.cpp diff --git a/src/qpsolver/a_asm.hpp b/highs/qpsolver/a_asm.hpp similarity index 100% rename from src/qpsolver/a_asm.hpp rename to highs/qpsolver/a_asm.hpp diff --git a/src/qpsolver/a_quass.cpp b/highs/qpsolver/a_quass.cpp similarity index 100% rename from src/qpsolver/a_quass.cpp rename to highs/qpsolver/a_quass.cpp diff --git a/src/qpsolver/a_quass.hpp b/highs/qpsolver/a_quass.hpp similarity index 100% rename from src/qpsolver/a_quass.hpp rename to highs/qpsolver/a_quass.hpp diff --git a/src/qpsolver/basis.cpp b/highs/qpsolver/basis.cpp similarity index 100% rename from src/qpsolver/basis.cpp rename to highs/qpsolver/basis.cpp diff --git a/src/qpsolver/basis.hpp b/highs/qpsolver/basis.hpp similarity index 100% rename from src/qpsolver/basis.hpp rename to highs/qpsolver/basis.hpp diff --git a/src/qpsolver/crashsolution.hpp b/highs/qpsolver/crashsolution.hpp similarity index 100% rename from src/qpsolver/crashsolution.hpp rename to highs/qpsolver/crashsolution.hpp diff --git a/src/qpsolver/dantzigpricing.hpp b/highs/qpsolver/dantzigpricing.hpp similarity index 100% rename from src/qpsolver/dantzigpricing.hpp rename to highs/qpsolver/dantzigpricing.hpp diff --git a/src/qpsolver/devexharrispricing.hpp b/highs/qpsolver/devexharrispricing.hpp similarity index 100% rename from src/qpsolver/devexharrispricing.hpp rename to highs/qpsolver/devexharrispricing.hpp diff --git a/src/qpsolver/devexpricing.hpp b/highs/qpsolver/devexpricing.hpp similarity index 100% rename from src/qpsolver/devexpricing.hpp rename to highs/qpsolver/devexpricing.hpp diff --git a/src/qpsolver/eventhandler.hpp b/highs/qpsolver/eventhandler.hpp similarity index 100% rename from src/qpsolver/eventhandler.hpp rename to highs/qpsolver/eventhandler.hpp diff --git a/src/qpsolver/factor.hpp b/highs/qpsolver/factor.hpp similarity index 100% rename from src/qpsolver/factor.hpp rename to highs/qpsolver/factor.hpp diff --git a/src/qpsolver/feasibility_bounded.hpp b/highs/qpsolver/feasibility_bounded.hpp similarity index 100% rename from src/qpsolver/feasibility_bounded.hpp rename to highs/qpsolver/feasibility_bounded.hpp diff --git a/src/qpsolver/feasibility_highs.hpp b/highs/qpsolver/feasibility_highs.hpp similarity index 100% rename from src/qpsolver/feasibility_highs.hpp rename to highs/qpsolver/feasibility_highs.hpp diff --git a/src/qpsolver/gradient.hpp b/highs/qpsolver/gradient.hpp similarity index 100% rename from src/qpsolver/gradient.hpp rename to highs/qpsolver/gradient.hpp diff --git a/src/qpsolver/instance.hpp b/highs/qpsolver/instance.hpp similarity index 100% rename from src/qpsolver/instance.hpp rename to highs/qpsolver/instance.hpp diff --git a/src/qpsolver/matrix.hpp b/highs/qpsolver/matrix.hpp similarity index 100% rename from src/qpsolver/matrix.hpp rename to highs/qpsolver/matrix.hpp diff --git a/src/qpsolver/perturbation.cpp b/highs/qpsolver/perturbation.cpp similarity index 100% rename from src/qpsolver/perturbation.cpp rename to highs/qpsolver/perturbation.cpp diff --git a/src/qpsolver/perturbation.hpp b/highs/qpsolver/perturbation.hpp similarity index 100% rename from src/qpsolver/perturbation.hpp rename to highs/qpsolver/perturbation.hpp diff --git a/src/qpsolver/pricing.hpp b/highs/qpsolver/pricing.hpp similarity index 100% rename from src/qpsolver/pricing.hpp rename to highs/qpsolver/pricing.hpp diff --git a/src/qpsolver/qpconst.hpp b/highs/qpsolver/qpconst.hpp similarity index 100% rename from src/qpsolver/qpconst.hpp rename to highs/qpsolver/qpconst.hpp diff --git a/src/qpsolver/qpvector.hpp b/highs/qpsolver/qpvector.hpp similarity index 100% rename from src/qpsolver/qpvector.hpp rename to highs/qpsolver/qpvector.hpp diff --git a/src/qpsolver/quass.cpp b/highs/qpsolver/quass.cpp similarity index 100% rename from src/qpsolver/quass.cpp rename to highs/qpsolver/quass.cpp diff --git a/src/qpsolver/quass.hpp b/highs/qpsolver/quass.hpp similarity index 100% rename from src/qpsolver/quass.hpp rename to highs/qpsolver/quass.hpp diff --git a/src/qpsolver/ratiotest.cpp b/highs/qpsolver/ratiotest.cpp similarity index 100% rename from src/qpsolver/ratiotest.cpp rename to highs/qpsolver/ratiotest.cpp diff --git a/src/qpsolver/ratiotest.hpp b/highs/qpsolver/ratiotest.hpp similarity index 100% rename from src/qpsolver/ratiotest.hpp rename to highs/qpsolver/ratiotest.hpp diff --git a/src/qpsolver/reducedcosts.hpp b/highs/qpsolver/reducedcosts.hpp similarity index 100% rename from src/qpsolver/reducedcosts.hpp rename to highs/qpsolver/reducedcosts.hpp diff --git a/src/qpsolver/reducedgradient.hpp b/highs/qpsolver/reducedgradient.hpp similarity index 100% rename from src/qpsolver/reducedgradient.hpp rename to highs/qpsolver/reducedgradient.hpp diff --git a/src/qpsolver/runtime.hpp b/highs/qpsolver/runtime.hpp similarity index 100% rename from src/qpsolver/runtime.hpp rename to highs/qpsolver/runtime.hpp diff --git a/src/qpsolver/scaling.cpp b/highs/qpsolver/scaling.cpp similarity index 100% rename from src/qpsolver/scaling.cpp rename to highs/qpsolver/scaling.cpp diff --git a/src/qpsolver/scaling.hpp b/highs/qpsolver/scaling.hpp similarity index 100% rename from src/qpsolver/scaling.hpp rename to highs/qpsolver/scaling.hpp diff --git a/src/qpsolver/settings.hpp b/highs/qpsolver/settings.hpp similarity index 100% rename from src/qpsolver/settings.hpp rename to highs/qpsolver/settings.hpp diff --git a/src/qpsolver/snippets.hpp b/highs/qpsolver/snippets.hpp similarity index 100% rename from src/qpsolver/snippets.hpp rename to highs/qpsolver/snippets.hpp diff --git a/src/qpsolver/statistics.hpp b/highs/qpsolver/statistics.hpp similarity index 100% rename from src/qpsolver/statistics.hpp rename to highs/qpsolver/statistics.hpp diff --git a/src/qpsolver/steepestedgepricing.hpp b/highs/qpsolver/steepestedgepricing.hpp similarity index 100% rename from src/qpsolver/steepestedgepricing.hpp rename to highs/qpsolver/steepestedgepricing.hpp diff --git a/src/simplex/HApp.h b/highs/simplex/HApp.h similarity index 100% rename from src/simplex/HApp.h rename to highs/simplex/HApp.h diff --git a/src/simplex/HEkk.cpp b/highs/simplex/HEkk.cpp similarity index 100% rename from src/simplex/HEkk.cpp rename to highs/simplex/HEkk.cpp diff --git a/src/simplex/HEkk.h b/highs/simplex/HEkk.h similarity index 100% rename from src/simplex/HEkk.h rename to highs/simplex/HEkk.h diff --git a/src/simplex/HEkkControl.cpp b/highs/simplex/HEkkControl.cpp similarity index 100% rename from src/simplex/HEkkControl.cpp rename to highs/simplex/HEkkControl.cpp diff --git a/src/simplex/HEkkDebug.cpp b/highs/simplex/HEkkDebug.cpp similarity index 100% rename from src/simplex/HEkkDebug.cpp rename to highs/simplex/HEkkDebug.cpp diff --git a/src/simplex/HEkkDual.cpp b/highs/simplex/HEkkDual.cpp similarity index 100% rename from src/simplex/HEkkDual.cpp rename to highs/simplex/HEkkDual.cpp diff --git a/src/simplex/HEkkDual.h b/highs/simplex/HEkkDual.h similarity index 100% rename from src/simplex/HEkkDual.h rename to highs/simplex/HEkkDual.h diff --git a/src/simplex/HEkkDualMulti.cpp b/highs/simplex/HEkkDualMulti.cpp similarity index 100% rename from src/simplex/HEkkDualMulti.cpp rename to highs/simplex/HEkkDualMulti.cpp diff --git a/src/simplex/HEkkDualRHS.cpp b/highs/simplex/HEkkDualRHS.cpp similarity index 100% rename from src/simplex/HEkkDualRHS.cpp rename to highs/simplex/HEkkDualRHS.cpp diff --git a/src/simplex/HEkkDualRHS.h b/highs/simplex/HEkkDualRHS.h similarity index 100% rename from src/simplex/HEkkDualRHS.h rename to highs/simplex/HEkkDualRHS.h diff --git a/src/simplex/HEkkDualRow.cpp b/highs/simplex/HEkkDualRow.cpp similarity index 100% rename from src/simplex/HEkkDualRow.cpp rename to highs/simplex/HEkkDualRow.cpp diff --git a/src/simplex/HEkkDualRow.h b/highs/simplex/HEkkDualRow.h similarity index 100% rename from src/simplex/HEkkDualRow.h rename to highs/simplex/HEkkDualRow.h diff --git a/src/simplex/HEkkInterface.cpp b/highs/simplex/HEkkInterface.cpp similarity index 100% rename from src/simplex/HEkkInterface.cpp rename to highs/simplex/HEkkInterface.cpp diff --git a/src/simplex/HEkkPrimal.cpp b/highs/simplex/HEkkPrimal.cpp similarity index 100% rename from src/simplex/HEkkPrimal.cpp rename to highs/simplex/HEkkPrimal.cpp diff --git a/src/simplex/HEkkPrimal.h b/highs/simplex/HEkkPrimal.h similarity index 100% rename from src/simplex/HEkkPrimal.h rename to highs/simplex/HEkkPrimal.h diff --git a/src/simplex/HSimplex.cpp b/highs/simplex/HSimplex.cpp similarity index 100% rename from src/simplex/HSimplex.cpp rename to highs/simplex/HSimplex.cpp diff --git a/src/simplex/HSimplex.h b/highs/simplex/HSimplex.h similarity index 100% rename from src/simplex/HSimplex.h rename to highs/simplex/HSimplex.h diff --git a/src/simplex/HSimplexDebug.cpp b/highs/simplex/HSimplexDebug.cpp similarity index 100% rename from src/simplex/HSimplexDebug.cpp rename to highs/simplex/HSimplexDebug.cpp diff --git a/src/simplex/HSimplexDebug.h b/highs/simplex/HSimplexDebug.h similarity index 100% rename from src/simplex/HSimplexDebug.h rename to highs/simplex/HSimplexDebug.h diff --git a/src/simplex/HSimplexNla.cpp b/highs/simplex/HSimplexNla.cpp similarity index 100% rename from src/simplex/HSimplexNla.cpp rename to highs/simplex/HSimplexNla.cpp diff --git a/src/simplex/HSimplexNla.h b/highs/simplex/HSimplexNla.h similarity index 100% rename from src/simplex/HSimplexNla.h rename to highs/simplex/HSimplexNla.h diff --git a/src/simplex/HSimplexNlaDebug.cpp b/highs/simplex/HSimplexNlaDebug.cpp similarity index 100% rename from src/simplex/HSimplexNlaDebug.cpp rename to highs/simplex/HSimplexNlaDebug.cpp diff --git a/src/simplex/HSimplexNlaFreeze.cpp b/highs/simplex/HSimplexNlaFreeze.cpp similarity index 100% rename from src/simplex/HSimplexNlaFreeze.cpp rename to highs/simplex/HSimplexNlaFreeze.cpp diff --git a/src/simplex/HSimplexNlaProductForm.cpp b/highs/simplex/HSimplexNlaProductForm.cpp similarity index 100% rename from src/simplex/HSimplexNlaProductForm.cpp rename to highs/simplex/HSimplexNlaProductForm.cpp diff --git a/src/simplex/HSimplexReport.cpp b/highs/simplex/HSimplexReport.cpp similarity index 100% rename from src/simplex/HSimplexReport.cpp rename to highs/simplex/HSimplexReport.cpp diff --git a/src/simplex/HSimplexReport.h b/highs/simplex/HSimplexReport.h similarity index 100% rename from src/simplex/HSimplexReport.h rename to highs/simplex/HSimplexReport.h diff --git a/src/simplex/HighsSimplexAnalysis.cpp b/highs/simplex/HighsSimplexAnalysis.cpp similarity index 100% rename from src/simplex/HighsSimplexAnalysis.cpp rename to highs/simplex/HighsSimplexAnalysis.cpp diff --git a/src/simplex/HighsSimplexAnalysis.h b/highs/simplex/HighsSimplexAnalysis.h similarity index 100% rename from src/simplex/HighsSimplexAnalysis.h rename to highs/simplex/HighsSimplexAnalysis.h diff --git a/src/simplex/SimplexConst.h b/highs/simplex/SimplexConst.h similarity index 100% rename from src/simplex/SimplexConst.h rename to highs/simplex/SimplexConst.h diff --git a/src/simplex/SimplexStruct.h b/highs/simplex/SimplexStruct.h similarity index 100% rename from src/simplex/SimplexStruct.h rename to highs/simplex/SimplexStruct.h diff --git a/src/simplex/SimplexTimer.h b/highs/simplex/SimplexTimer.h similarity index 100% rename from src/simplex/SimplexTimer.h rename to highs/simplex/SimplexTimer.h diff --git a/src/util/FactorTimer.h b/highs/util/FactorTimer.h similarity index 100% rename from src/util/FactorTimer.h rename to highs/util/FactorTimer.h diff --git a/src/util/HFactor.cpp b/highs/util/HFactor.cpp similarity index 100% rename from src/util/HFactor.cpp rename to highs/util/HFactor.cpp diff --git a/src/util/HFactor.h b/highs/util/HFactor.h similarity index 100% rename from src/util/HFactor.h rename to highs/util/HFactor.h diff --git a/src/util/HFactorConst.h b/highs/util/HFactorConst.h similarity index 100% rename from src/util/HFactorConst.h rename to highs/util/HFactorConst.h diff --git a/src/util/HFactorDebug.cpp b/highs/util/HFactorDebug.cpp similarity index 100% rename from src/util/HFactorDebug.cpp rename to highs/util/HFactorDebug.cpp diff --git a/src/util/HFactorDebug.h b/highs/util/HFactorDebug.h similarity index 100% rename from src/util/HFactorDebug.h rename to highs/util/HFactorDebug.h diff --git a/src/util/HFactorExtend.cpp b/highs/util/HFactorExtend.cpp similarity index 100% rename from src/util/HFactorExtend.cpp rename to highs/util/HFactorExtend.cpp diff --git a/src/util/HFactorRefactor.cpp b/highs/util/HFactorRefactor.cpp similarity index 100% rename from src/util/HFactorRefactor.cpp rename to highs/util/HFactorRefactor.cpp diff --git a/src/util/HFactorUtils.cpp b/highs/util/HFactorUtils.cpp similarity index 100% rename from src/util/HFactorUtils.cpp rename to highs/util/HFactorUtils.cpp diff --git a/src/util/HSet.cpp b/highs/util/HSet.cpp similarity index 100% rename from src/util/HSet.cpp rename to highs/util/HSet.cpp diff --git a/src/util/HSet.h b/highs/util/HSet.h similarity index 100% rename from src/util/HSet.h rename to highs/util/HSet.h diff --git a/src/util/HVector.h b/highs/util/HVector.h similarity index 100% rename from src/util/HVector.h rename to highs/util/HVector.h diff --git a/src/util/HVectorBase.cpp b/highs/util/HVectorBase.cpp similarity index 100% rename from src/util/HVectorBase.cpp rename to highs/util/HVectorBase.cpp diff --git a/src/util/HVectorBase.h b/highs/util/HVectorBase.h similarity index 100% rename from src/util/HVectorBase.h rename to highs/util/HVectorBase.h diff --git a/src/util/HighsCDouble.h b/highs/util/HighsCDouble.h similarity index 100% rename from src/util/HighsCDouble.h rename to highs/util/HighsCDouble.h diff --git a/src/util/HighsComponent.h b/highs/util/HighsComponent.h similarity index 100% rename from src/util/HighsComponent.h rename to highs/util/HighsComponent.h diff --git a/src/util/HighsDataStack.h b/highs/util/HighsDataStack.h similarity index 100% rename from src/util/HighsDataStack.h rename to highs/util/HighsDataStack.h diff --git a/src/util/HighsDisjointSets.h b/highs/util/HighsDisjointSets.h similarity index 100% rename from src/util/HighsDisjointSets.h rename to highs/util/HighsDisjointSets.h diff --git a/src/util/HighsHash.cpp b/highs/util/HighsHash.cpp similarity index 100% rename from src/util/HighsHash.cpp rename to highs/util/HighsHash.cpp diff --git a/src/util/HighsHash.h b/highs/util/HighsHash.h similarity index 100% rename from src/util/HighsHash.h rename to highs/util/HighsHash.h diff --git a/src/util/HighsHashTree.h b/highs/util/HighsHashTree.h similarity index 100% rename from src/util/HighsHashTree.h rename to highs/util/HighsHashTree.h diff --git a/src/util/HighsInt.h b/highs/util/HighsInt.h similarity index 100% rename from src/util/HighsInt.h rename to highs/util/HighsInt.h diff --git a/src/util/HighsIntegers.h b/highs/util/HighsIntegers.h similarity index 100% rename from src/util/HighsIntegers.h rename to highs/util/HighsIntegers.h diff --git a/src/util/HighsLinearSumBounds.cpp b/highs/util/HighsLinearSumBounds.cpp similarity index 100% rename from src/util/HighsLinearSumBounds.cpp rename to highs/util/HighsLinearSumBounds.cpp diff --git a/src/util/HighsLinearSumBounds.h b/highs/util/HighsLinearSumBounds.h similarity index 100% rename from src/util/HighsLinearSumBounds.h rename to highs/util/HighsLinearSumBounds.h diff --git a/src/util/HighsMatrixPic.cpp b/highs/util/HighsMatrixPic.cpp similarity index 100% rename from src/util/HighsMatrixPic.cpp rename to highs/util/HighsMatrixPic.cpp diff --git a/src/util/HighsMatrixPic.h b/highs/util/HighsMatrixPic.h similarity index 100% rename from src/util/HighsMatrixPic.h rename to highs/util/HighsMatrixPic.h diff --git a/src/util/HighsMatrixSlice.h b/highs/util/HighsMatrixSlice.h similarity index 100% rename from src/util/HighsMatrixSlice.h rename to highs/util/HighsMatrixSlice.h diff --git a/src/util/HighsMatrixUtils.cpp b/highs/util/HighsMatrixUtils.cpp similarity index 100% rename from src/util/HighsMatrixUtils.cpp rename to highs/util/HighsMatrixUtils.cpp diff --git a/src/util/HighsMatrixUtils.h b/highs/util/HighsMatrixUtils.h similarity index 100% rename from src/util/HighsMatrixUtils.h rename to highs/util/HighsMatrixUtils.h diff --git a/src/util/HighsMemoryAllocation.h b/highs/util/HighsMemoryAllocation.h similarity index 100% rename from src/util/HighsMemoryAllocation.h rename to highs/util/HighsMemoryAllocation.h diff --git a/src/util/HighsRandom.h b/highs/util/HighsRandom.h similarity index 100% rename from src/util/HighsRandom.h rename to highs/util/HighsRandom.h diff --git a/src/util/HighsRbTree.h b/highs/util/HighsRbTree.h similarity index 100% rename from src/util/HighsRbTree.h rename to highs/util/HighsRbTree.h diff --git a/src/util/HighsSort.cpp b/highs/util/HighsSort.cpp similarity index 100% rename from src/util/HighsSort.cpp rename to highs/util/HighsSort.cpp diff --git a/src/util/HighsSort.h b/highs/util/HighsSort.h similarity index 100% rename from src/util/HighsSort.h rename to highs/util/HighsSort.h diff --git a/src/util/HighsSparseMatrix.cpp b/highs/util/HighsSparseMatrix.cpp similarity index 100% rename from src/util/HighsSparseMatrix.cpp rename to highs/util/HighsSparseMatrix.cpp diff --git a/src/util/HighsSparseMatrix.h b/highs/util/HighsSparseMatrix.h similarity index 100% rename from src/util/HighsSparseMatrix.h rename to highs/util/HighsSparseMatrix.h diff --git a/src/util/HighsSparseVectorSum.h b/highs/util/HighsSparseVectorSum.h similarity index 100% rename from src/util/HighsSparseVectorSum.h rename to highs/util/HighsSparseVectorSum.h diff --git a/src/util/HighsSplay.h b/highs/util/HighsSplay.h similarity index 100% rename from src/util/HighsSplay.h rename to highs/util/HighsSplay.h diff --git a/src/util/HighsTimer.h b/highs/util/HighsTimer.h similarity index 100% rename from src/util/HighsTimer.h rename to highs/util/HighsTimer.h diff --git a/src/util/HighsUtils.cpp b/highs/util/HighsUtils.cpp similarity index 100% rename from src/util/HighsUtils.cpp rename to highs/util/HighsUtils.cpp diff --git a/src/util/HighsUtils.h b/highs/util/HighsUtils.h similarity index 100% rename from src/util/HighsUtils.h rename to highs/util/HighsUtils.h diff --git a/src/util/stringutil.cpp b/highs/util/stringutil.cpp similarity index 100% rename from src/util/stringutil.cpp rename to highs/util/stringutil.cpp diff --git a/src/util/stringutil.h b/highs/util/stringutil.h similarity index 100% rename from src/util/stringutil.h rename to highs/util/stringutil.h diff --git a/meson.build b/meson.build index 9e0502607b..f5a7c77e4c 100644 --- a/meson.build +++ b/meson.build @@ -186,7 +186,7 @@ endif # --------------------- Library -subdir('src') # defines highslib +subdir('highs') # defines highslib # --------------------- Tests @@ -196,4 +196,4 @@ if get_option('with_tests') endif # --------------------- Bindings -# now in src/ +# now in highs/ diff --git a/nuget/Highs.csproj b/nuget/Highs.csproj index 229df40970..b5f9337083 100644 --- a/nuget/Highs.csproj +++ b/nuget/Highs.csproj @@ -10,7 +10,7 @@ LICENSE.txt - + diff --git a/pyproject.toml b/pyproject.toml index 749eb2927b..c7011c1cc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,21 +40,21 @@ wheel.expand-macos-universal-tags = true # default to the first of ``src/``, ``python/``, or # ```` if they exist. The prefix(s) will be stripped from the package # name inside the wheel. -wheel.packages = ["src/highspy"] +wheel.packages = ["highs/highspy"] # Files to include in the SDist even if they are skipped by default. Supports # gitignore syntax. sdist.include = [ - "src/highspy/highs.py", - "src/highspy/__init__.py", - "src/highspy/__init__.pyi", - "src/highspy/_core/*.pyi", + "highs/highspy/highs.py", + "highs/highspy/__init__.py", + "highs/highspy/__init__.pyi", + "highs/highspy/_core/*.pyi", "tests/test_highspy.py", "Version.txt", "LICENSE", "README.md", - "src/HConfig.h.in", - "src", + "highs/HConfig.h.in", + "highs", "external", "cmake", ] @@ -79,8 +79,8 @@ sdist.exclude = [ "WORKSPACE", "nuget/", "nuget/README.md", - "src/*.bazel*", - "src/*.meson*", + "highs/*.bazel*", + "highs/*.meson*", "interfaces/*csharp*", "interfaces/*fortran*", "flake.*", diff --git a/src/test/DevKkt.cpp b/src/test/DevKkt.cpp deleted file mode 100644 index 57085efdbb..0000000000 --- a/src/test/DevKkt.cpp +++ /dev/null @@ -1,469 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* This file is part of the HiGHS linear optimization suite */ -/* */ -/* Available as open-source under the MIT License */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/**@file - * @brief - */ -#include "test/DevKkt.h" - -#include -#include -#include - -#include "util/HighsCDouble.h" - -namespace presolve { -namespace dev_kkt_check { - -constexpr int dev_print = 1; -constexpr double tol = 1e-07; - -KktInfo initInfo() { - KktInfo info; - info.rules[KktCondition::kColBounds] = - KktConditionDetails(KktCondition::kColBounds); - info.rules[KktCondition::kPrimalFeasibility] = - KktConditionDetails(KktCondition::kPrimalFeasibility); - info.rules[KktCondition::kDualFeasibility] = - KktConditionDetails(KktCondition::kDualFeasibility); - info.rules[KktCondition::kComplementarySlackness] = - KktConditionDetails(KktCondition::kComplementarySlackness); - info.rules[KktCondition::kStationarityOfLagrangian] = - KktConditionDetails(KktCondition::kStationarityOfLagrangian); - info.rules[KktCondition::kBasicFeasibleSolution] = - KktConditionDetails(KktCondition::kBasicFeasibleSolution); - return info; -} - -void checkPrimalBounds(const State& state, KktConditionDetails& details) { - details.type = KktCondition::kColBounds; - details.checked = 0; - details.violated = 0; - details.max_violation = 0.0; - details.sum_violation_2 = 0.0; - - for (int i = 0; i < state.numCol; i++) { - if (state.flagCol[i]) { - details.checked++; - double infeas = 0; - - if ((state.colLower[i] - state.colValue[i] > tol) || - (state.colValue[i] - state.colUpper[i] > tol)) { - if (state.colLower[i] - state.colValue[i] > tol) - infeas = state.colLower[i] - state.colValue[i]; - else - infeas = state.colValue[i] - state.colUpper[i]; - - if (dev_print == 1) - std::cout << "Variable " << i - << " infeasible: lb=" << state.colLower[i] - << ", value=" << state.colValue[i] - << ", ub=" << state.colUpper[i] << std::endl; - - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } -} - -void checkPrimalFeasMatrix(const State& state, KktConditionDetails& details) { - details.type = KktCondition::kPrimalFeasibility; - details.checked = 0; - details.violated = 0; - details.max_violation = 0.0; - details.sum_violation_2 = 0.0; - - for (int i = 0; i < state.numRow; i++) { - if (state.flagRow[i]) { - details.checked++; - double rowV = state.rowValue[i]; - - if (state.rowLower[i] < rowV && rowV < state.rowUpper[i]) continue; - double infeas = 0; - - if (((rowV - state.rowLower[i]) < 0) && - (fabs(rowV - state.rowLower[i]) > tol)) { - infeas = state.rowLower[i] - rowV; - if (dev_print == 1) - std::cout << "Row " << i << " infeasible: Row value=" << rowV - << " L=" << state.rowLower[i] - << " U=" << state.rowUpper[i] << std::endl; - } - - if (((rowV - state.rowUpper[i]) > 0) && - (fabs(rowV - state.rowUpper[i]) > tol)) { - infeas = rowV - state.rowUpper[i]; - if (dev_print == 1) - std::cout << "Row " << i << " infeasible: Row value=" << rowV - << " L=" << state.rowLower[i] - << " U=" << state.rowUpper[i] << std::endl; - } - if (infeas > 0) { - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } - - if (details.violated == 0) { - if (dev_print == 1) std::cout << "Primal feasible.\n"; - } else { - if (dev_print == 1) std::cout << "KKT check error: Primal infeasible.\n"; - } -} - -void checkDualFeasibility(const State& state, KktConditionDetails& details) { - details.type = KktCondition::kPrimalFeasibility; - details.checked = 0; - details.violated = 0; - details.max_violation = 0.0; - details.sum_violation_2 = 0.0; - - // check values of z_j are dual feasible - for (int i = 0; i < state.numCol; i++) { - if (state.flagCol[i]) { - details.checked++; - double infeas = 0; - // j not in L or U - if (state.colLower[i] <= -kHighsInf && state.colUpper[i] >= kHighsInf) { - if (fabs(state.colDual[i]) > tol) { - if (dev_print == 1) - std::cout << "Dual feasibility fail: l=-inf, x[" << i - << "]=" << state.colValue[i] << ", u=inf, z[" << i - << "]=" << state.colDual[i] << std::endl; - infeas = fabs(state.colDual[i]); - } - } - // j in L: x=l and l tol) { - if (dev_print == 1) - std::cout << "Dual feasibility fail: l[" << i - << "]=" << state.colLower[i] << " = x[" << i - << "]=" << state.colValue[i] << ", z[" << i - << "]=" << state.colDual[i] << std::endl; - infeas = fabs(state.colDual[i]); - } - } - // j in U: x=u and l tol) { - if (dev_print == 1) - std::cout << "Dual feasibility fail: x[" << i - << "]=" << state.colValue[i] << "=u[" << i << "], z[" << i - << "]=" << state.colDual[i] << std::endl; - infeas = fabs(state.colDual[i]); - } - } - - if (infeas > 0) { - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } - - // check values of y_i are dual feasible - for (int i = 0; i < state.numRow; i++) { - if (state.flagRow[i]) { - details.checked++; - - double rowV = state.rowValue[i]; - - // L = Ax = U can be any sign - if (fabs(state.rowLower[i] - rowV) < tol && - fabs(state.rowUpper[i] - rowV) < tol) - continue; - - double infeas = 0; - // L = Ax < U - if (fabs(state.rowLower[i] - rowV) < tol && rowV < state.rowUpper[i]) { - if (state.rowDual[i] < -tol) { - if (dev_print == 1) - std::cout << "Dual feasibility fail for row " << i - << ": L= " << state.rowLower[i] << ", Ax=" << rowV - << ", U=" << state.rowUpper[i] - << ", y=" << state.rowDual[i] << std::endl; - infeas = -state.rowDual[i]; - } - } - // L < Ax = U - else if (state.rowLower[i] < rowV && - fabs(rowV - state.rowUpper[i]) < tol) { - if (state.rowDual[i] > tol) { - if (dev_print == 1) - std::cout << "Dual feasibility fail for row " << i - << ": L= " << state.rowLower[i] << ", Ax=" << rowV - << ", U=" << state.rowUpper[i] - << ", y=" << state.rowDual[i] << std::endl; - infeas = state.rowDual[i]; - } - } - // L < Ax < U - else if ((state.rowLower[i] < (rowV + tol)) && - (rowV < (state.rowUpper[i] + tol))) { - if (fabs(state.rowDual[i]) > tol) { - if (dev_print == 1) - std::cout << "Dual feasibility fail for row " << i - << ": L= " << state.rowLower[i] << ", Ax=" << rowV - << ", U=" << state.rowUpper[i] - << ", y=" << state.rowDual[i] << std::endl; - infeas = std::abs(state.rowDual[i]); - } - } - if (infeas > 0) { - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } - - if (details.violated == 0) { - if (dev_print == 1) std::cout << "Dual feasible.\n"; - } else { - if (dev_print == 1) - std::cout << "KKT check error: Dual feasibility fail.\n"; - } -} - -void checkComplementarySlackness(const State& state, - KktConditionDetails& details) { - details.type = KktCondition::kComplementarySlackness; - details.checked = 0; - details.violated = 0; - details.max_violation = 0.0; - details.sum_violation_2 = 0.0; - - for (int i = 0; i < state.numCol; i++) { - if (state.flagCol[i]) { - double infeas = 0; - details.checked++; - if (state.colLower[i] > -kHighsInf && - fabs(state.colValue[i] - state.colLower[i]) > tol) { - if (fabs(state.colDual[i]) > tol && - fabs(state.colValue[i] - state.colUpper[i]) > tol) { - if (dev_print) - // clang-format off - std::cout << "Comp. slackness fail: " - << "l[" << i << "]=" << state.colLower[i] << ", x[" << i - << "]=" << state.colValue[i] << ", z[" << i - << "]=" << state.colDual[i] << std::endl; - // clang-format on - infeas = fabs(state.colDual[i]); - } - } - if (state.colUpper[i] < kHighsInf && - fabs(state.colUpper[i] - state.colValue[i]) > tol) { - if (fabs(state.colDual[i]) > tol && - fabs(state.colValue[i] - state.colLower[i]) > tol) { - if (dev_print == 1) - std::cout << "Comp. slackness fail: x[" << i - << "]=" << state.colValue[i] << ", u[" << i - << "]=" << state.colUpper[i] << ", z[" << i - << "]=" << state.colDual[i] << std::endl; - infeas = fabs(state.colDual[i]); - } - } - - if (infeas > 0) { - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } - - if (details.violated == 0) { - if (dev_print == 1) std::cout << "Complementary Slackness.\n"; - } else { - if (dev_print == 1) std::cout << "KKT check error: Comp slackness fail.\n"; - } -} - -void checkStationarityOfLagrangian(const State& state, - KktConditionDetails& details) { - details.type = KktCondition::kStationarityOfLagrangian; - details.checked = 0; - details.violated = 0; - details.max_violation = 0.0; - details.sum_violation_2 = 0.0; - - // A'y + c - z = 0 - for (int j = 0; j < state.numCol; j++) { - if (state.flagCol[j]) { - details.checked++; - double infeas = 0; - - HighsCDouble lagrV = HighsCDouble(state.colCost[j]) - state.colDual[j]; - for (int k = state.Astart[j]; k < state.Aend[j]; k++) { - const int row = state.Aindex[k]; - assert(row >= 0 && row < state.numRow); - if (state.flagRow[row]) - lagrV = lagrV - state.rowDual[row] * state.Avalue[k]; - } - - if (fabs(double(lagrV)) > tol) { - if (dev_print == 1) - std::cout << "Column " << j - << " fails stationary of Lagrangian: dL/dx" << j << " = " - << double(lagrV) << ", rather than zero." << std::endl; - infeas = fabs(double(lagrV)); - } - - if (infeas > 0) { - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } - - if (details.violated == 0) { - if (dev_print == 1) std::cout << "Stationarity of Lagrangian.\n"; - } else { - if (dev_print == 1) - std::cout << "KKT check error: Lagrangian is not stationary.\n"; - } -} - -void checkBasicFeasibleSolution(const State& state, - KktConditionDetails& details) { - // Go over cols and check that the duals of basic values are zero. - assert((int)state.col_status.size() == state.numCol); - assert((int)state.colDual.size() == state.numCol); - for (int j = 0; j < state.numCol; j++) { - if (state.flagCol[j]) { - details.checked++; - double infeas = 0; - if (state.col_status[j] == HighsBasisStatus::kBasic && - fabs(state.colDual[j]) > tol) { - if (dev_print == 1) - std::cout << "Col " << j << " is basic but has nonzero dual " - << state.colDual[j] << "." << std::endl; - infeas = fabs(state.colDual[j]); - } - - if (infeas > 0) { - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } - - // Go over rows and check that the duals of basic values are zero. - assert((int)state.row_status.size() == state.numRow); - assert((int)state.rowDual.size() == state.numRow); - for (int i = 0; i < state.numRow; i++) { - if (state.flagRow[i]) { - details.checked++; - double infeas = 0; - if (state.row_status[i] == HighsBasisStatus::kBasic && - fabs(state.rowDual[i]) > tol) { - if (dev_print == 1) - std::cout << "Row " << i << " is basic but has nonzero dual: " - << fabs(state.rowDual[i]) << std::endl; - infeas = fabs(state.rowDual[i]); - } - if (infeas > 0) { - details.violated++; - details.sum_violation_2 += infeas * infeas; - - if (details.max_violation < infeas) details.max_violation = infeas; - } - } - } - - if (details.violated == 0) { - if (dev_print == 1) std::cout << "BFS." << std::endl; - } else { - if (dev_print == 1) - std::cout << "BFS X Violated: " << details.violated << std::endl; - } - - // check number of basic rows during postsolve. - int current_n_rows = 0; - int current_n_rows_basic = 0; - int current_n_cols_basic = 0; - - for (int i = 0; i < state.numRow; i++) { - if (state.flagRow[i]) current_n_rows++; - - if (state.flagRow[i] && state.row_status[i] == HighsBasisStatus::kBasic) - current_n_rows_basic++; - } - - for (int i = 0; i < state.numCol; i++) { - if (state.flagCol[i] && state.col_status[i] == HighsBasisStatus::kBasic) - current_n_cols_basic++; - } - - bool holds = current_n_cols_basic + current_n_rows_basic == current_n_rows; - if (!holds) { - details.violated = -1; - std::cout << "BFS X Violated WRONG basis count: " - << current_n_cols_basic + current_n_rows_basic << " " - << current_n_rows << std::endl; - } - // assert(current_n_cols_basic + current_n_rows_basic == current_n_rows); -} - -bool checkKkt(const State& state, KktInfo& info) { - if (state.numCol == 0) { - std::cout << "KKT warning: empty problem" << std::endl; - return true; - } - - std::cout << std::endl; - - checkPrimalBounds(state, info.rules[KktCondition::kColBounds]); - checkPrimalFeasMatrix(state, info.rules[KktCondition::kPrimalFeasibility]); - checkDualFeasibility(state, info.rules[KktCondition::kDualFeasibility]); - checkComplementarySlackness( - state, info.rules[KktCondition::kComplementarySlackness]); - checkStationarityOfLagrangian( - state, info.rules[KktCondition::kStationarityOfLagrangian]); - checkBasicFeasibleSolution(state, - info.rules[KktCondition::kBasicFeasibleSolution]); - - assert(info.rules.size() == 6); - - info.pass_col_bounds = info.rules[KktCondition::kColBounds].violated == 0; - info.pass_primal_feas_matrix = - info.rules[KktCondition::kPrimalFeasibility].violated == 0; - info.pass_dual_feas = - info.rules[KktCondition::kDualFeasibility].violated == 0; - info.pass_comp_slackness = - info.rules[KktCondition::kComplementarySlackness].violated == 0; - info.pass_st_of_L = - info.rules[KktCondition::kStationarityOfLagrangian].violated == 0; - info.pass_bfs = - info.rules[KktCondition::kBasicFeasibleSolution].violated == 0; - - if (info.pass_primal_feas_matrix && info.pass_col_bounds && - info.pass_dual_feas && info.pass_comp_slackness && info.pass_st_of_L) - return true; - - return false; -} - -} // namespace dev_kkt_check -} // namespace presolve diff --git a/src/test/DevKkt.h b/src/test/DevKkt.h deleted file mode 100644 index a01e5b01f4..0000000000 --- a/src/test/DevKkt.h +++ /dev/null @@ -1,143 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* This file is part of the HiGHS linear optimization suite */ -/* */ -/* Available as open-source under the MIT License */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/**@file test/DevKkt.h - * @brief - */ -#ifndef TEST_DEV_KKT_H_ -#define TEST_DEV_KKT_H_ - -#include -#include - -#include "lp_data/HConst.h" - -namespace presolve { -namespace dev_kkt_check { - -struct State { - State( - const HighsInt numCol_, const HighsInt numRow_, - const std::vector& Astart_, const std::vector& Aend_, - const std::vector& Aindex_, const std::vector& Avalue_, - const std::vector& ARstart_, - const std::vector& ARindex_, - const std::vector& ARvalue_, const std::vector& colCost_, - const std::vector& colLower_, - const std::vector& colUpper_, - const std::vector& rowLower_, - const std::vector& rowUpper_, - const std::vector& flagCol_, - const std::vector& flagRow_, - const std::vector& colValue_, const std::vector& colDual_, - const std::vector& rowValue_, const std::vector& rowDual_, - const std::vector& col_status_, - const std::vector& row_status_) - : numCol(numCol_), - numRow(numRow_), - Astart(Astart_), - Aend(Aend_), - Aindex(Aindex_), - Avalue(Avalue_), - ARstart(ARstart_), - ARindex(ARindex_), - ARvalue(ARvalue_), - colCost(colCost_), - colLower(colLower_), - colUpper(colUpper_), - rowLower(rowLower_), - rowUpper(rowUpper_), - flagCol(flagCol_), - flagRow(flagRow_), - colValue(colValue_), - colDual(colDual_), - rowValue(rowValue_), - rowDual(rowDual_), - col_status(col_status_), - row_status(row_status_) {} - - const HighsInt numCol; - const HighsInt numRow; - - const std::vector& Astart; - const std::vector& Aend; - const std::vector& Aindex; - const std::vector& Avalue; - - const std::vector& ARstart; - const std::vector& ARindex; - const std::vector& ARvalue; - - const std::vector& colCost; - const std::vector& colLower; - const std::vector& colUpper; - const std::vector& rowLower; - const std::vector& rowUpper; - - const std::vector& flagCol; - const std::vector& flagRow; - - // solution - const std::vector& colValue; - const std::vector& colDual; - const std::vector& rowValue; - const std::vector& rowDual; - - // basis - const std::vector& col_status; - const std::vector& row_status; -}; - -enum class KktCondition { - kColBounds, - kPrimalFeasibility, - kDualFeasibility, - kComplementarySlackness, - kStationarityOfLagrangian, - kBasicFeasibleSolution, - kUnset, -}; - -struct KktConditionDetails { - KktConditionDetails() {} - KktConditionDetails(KktCondition type_) : type(type_) {} - - KktCondition type = KktCondition::kUnset; - double max_violation = 0.0; - double sum_violation_2 = 0.0; - HighsInt checked = 0; - HighsInt violated = 0; -}; - -struct KktInfo { - std::map rules; - bool pass_col_bounds = false; - bool pass_primal_feas_matrix = false; - bool pass_dual_feas = false; - bool pass_st_of_L = false; - bool pass_comp_slackness = false; - bool pass_bfs = false; -}; - -KktInfo initInfo(); - -bool checkKkt(const State& state, KktInfo& info); - -void checkPrimalBounds(const State& state, KktConditionDetails& details); -void checkPrimalFeasMatrix(const State& state, KktConditionDetails& details); -void checkDualFeasibility(const State& state, KktConditionDetails& details); -void checkComplementarySlackness(const State& state, - KktConditionDetails& details); -void checkStationarityOfLagrangian(const State& state, - KktConditionDetails& details); -void checkBasicFeasibleSolution(const State& state, - KktConditionDetails& details); - -} // namespace dev_kkt_check -} // namespace presolve - -#endif /* TEST_KKTCHSTEP_H_ */ diff --git a/src/test/KktCh2.cpp b/src/test/KktCh2.cpp deleted file mode 100644 index 4222f5e56a..0000000000 --- a/src/test/KktCh2.cpp +++ /dev/null @@ -1,305 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* This file is part of the HiGHS linear optimization suite */ -/* */ -/* Available as open-source under the MIT License */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/**@file test/KktChStep.cpp - * @brief - */ -#include "test/KktCh2.h" - -#include -#include - -#include "test/DevKkt.h" - -using std::cout; -using std::endl; -using std::get; -using std::pair; -using std::setw; -using std::vector; - -namespace presolve { - -namespace dev_kkt_check { - -void KktChStep::setBoundsCostRHS(const vector& colUpper_, - const vector& colLower_, - const vector& cost, - const vector& rowLower_, - const vector& rowUpper_) { - RcolLower = colLower_; - RcolUpper = colUpper_; - RrowLower = rowLower_; - RrowUpper = rowUpper_; - RcolCost = cost; -} - -void KktChStep::addCost(HighsInt col, double value) { RcolCost[col] = value; } - -/* -1 SING_ROW -17 DOUBLETON_EQUATION - -171 DOUBLETON_EQUATION_ROW_BOUNDS_UPDATE -173 DOUBLETON_EQUATION_X_ZERO_INITIALLY -172 DOUBLETON_EQUATION_NEW_X_NONZERO -174 DOUBLETON_EQUATION_NEW_X_ZERO_AR_UPDATE -175 DOUBLETON_EQUATION_NEW_X_ZERO_A_UPDATE - -7 FIXED_COL -0 EMPTY_ROW -6 EMPTY_COL -9 DOMINATED_COLS -10 WEAKLY_DOMINATED_COLS -4 FREE_SING_COL -5 SING_COL_DOUBLETON_INEQ -19 SING_COL_DOUBLETON_INEQ_SECOND_SING_COL -8 IMPLIED_FREE_SING_COL -3 FORCING_ROW -2 FORCING_ROW_VARIABLE -16 REDUNDANT_ROW - -*/ -void KktChStep::addChange(int type, HighsInt row, HighsInt col, double valC, - double dualC, double dualR) { - // when updating fill new values for b, c, bounds in Rb RcolCost RcolUpper, - // RcolLower - vector> upd; - - switch (type) { - case 171: // new bounds from doubleton equation, retrieve old ones - upd = rLowers.top(); - rLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowLower[ind] = get<1>(upd[i]); - } - upd = rUppers.top(); - rUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowUpper[ind] = get<1>(upd[i]); - } - break; - case 1: // row singleton - upd = cLowers.top(); - cLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolLower[ind] = get<1>(upd[i]); - } - upd = cUppers.top(); - cUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolUpper[ind] = get<1>(upd[i]); - } - upd = costs.top(); - costs.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolCost[ind] = get<1>(upd[i]); - } - break; - case 2: // each variable at forcing row: rowDual is cost here - RcolCost[col] = dualR; - break; - case 22: // - upd = rLowers.top(); - rLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowLower[ind] = get<1>(upd[i]); - } - upd = rUppers.top(); - rUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowUpper[ind] = get<1>(upd[i]); - } - break; - case 3: // the row that is forcing - if (valC != 0) { - upd = rLowers.top(); - rLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowLower[ind] = get<1>(upd[i]); - } - upd = rUppers.top(); - rUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowUpper[ind] = get<1>(upd[i]); - } - } - break; - case 4: // implied free column singleton (also from duplicate row) - upd = costs.top(); - costs.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolCost[ind] = get<1>(upd[i]); - } - break; - case 5: // doubleton eq with singleton col - upd = cLowers.top(); - cLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolLower[ind] = get<1>(upd[i]); - } - upd = cUppers.top(); - cUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolUpper[ind] = get<1>(upd[i]); - } - upd = costs.top(); - costs.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolCost[ind] = get<1>(upd[i]); - } - break; - case 17: { // doubleton equation - upd = cLowers.top(); - cLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolLower[ind] = get<1>(upd[i]); - } - upd = cUppers.top(); - cUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolUpper[ind] = get<1>(upd[i]); - } - upd = costs.top(); - costs.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolCost[ind] = get<1>(upd[i]); - } - break; - } - case 6: // empty column, dominated column or weakly dominated - if (valC != 0) { - upd = rLowers.top(); - rLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowLower[ind] = get<1>(upd[i]); - } - upd = rUppers.top(); - rUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowUpper[ind] = get<1>(upd[i]); - } - } - break; - case 7: // fixed variable - if (valC != 0) { - upd = rLowers.top(); - rLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowLower[ind] = get<1>(upd[i]); - } - upd = rUppers.top(); - rUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowUpper[ind] = get<1>(upd[i]); - } - } - break; - case 11: // empty row from duplicate rows - upd = rLowers.top(); - rLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowLower[ind] = get<1>(upd[i]); - } - upd = rUppers.top(); - rUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RrowUpper[ind] = get<1>(upd[i]); - } - break; - case 12: // doubleton eq from duplicate rows; - upd = cLowers.top(); - cLowers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolLower[ind] = get<1>(upd[i]); - } - upd = cUppers.top(); - cUppers.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolUpper[ind] = get<1>(upd[i]); - } - upd = costs.top(); - costs.pop(); - for (size_t i = 0; i < upd.size(); i++) { - HighsInt ind = get<0>(upd[i]); - RcolCost[ind] = get<1>(upd[i]); - } - break; - case 121: // - break; /* - case 14: //two duplicate columns by one - colValue[col] = valC; - colDual[col] = dualC; - RcolLower = cLowers.top(); cLowers.pop(); - RcolUpper = cUppers.top(); cUppers.pop(); - break; - case 15: //sing variable on initEq - flagRow[row] = true; - rowDual[row] = dualR; - break;*/ - } -} - -dev_kkt_check::State KktChStep::initState( - const HighsInt numCol_, const HighsInt numRow_, - const std::vector& Astart_, const std::vector& Aend_, - const std::vector& Aindex_, const std::vector& Avalue_, - const std::vector& ARstart_, - const std::vector& ARindex_, const std::vector& ARvalue_, - const std::vector& flagCol_, - const std::vector& flagRow_, const std::vector& colValue_, - const std::vector& colDual_, const std::vector& rowValue_, - const std::vector& rowDual_, - const std::vector& col_status_, - const std::vector& row_status_) { - // check row value - - std::vector rowValue(numRow_, 0); - for (int row = 0; row < numRow_; row++) { - if (flagRow_[row]) { - for (int k = ARstart_[row]; k < ARstart_[row + 1]; k++) { - const int col = ARindex_[k]; - if (flagCol_[col]) rowValue[row] += ARvalue_[k] * colValue_[col]; - } - assert(rowValue_[row] == rowValue[row]); - } - } - - return dev_kkt_check::State(numCol_, numRow_, Astart_, Aend_, Aindex_, - Avalue_, ARstart_, ARindex_, ARvalue_, RcolCost, - RcolLower, RcolUpper, RrowLower, RrowUpper, - flagCol_, flagRow_, colValue_, colDual_, - rowValue_, rowDual_, col_status_, row_status_); -} - -} // namespace dev_kkt_check - -} // namespace presolve diff --git a/src/test/KktCh2.h b/src/test/KktCh2.h deleted file mode 100644 index c5918b3406..0000000000 --- a/src/test/KktCh2.h +++ /dev/null @@ -1,79 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* This file is part of the HiGHS linear optimization suite */ -/* */ -/* Available as open-source under the MIT License */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/**@file test/KktChStep.h - * @brief - */ -#ifndef TEST_KKTCH2_H_ -#define TEST_KKTCH2_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include "lp_data/HConst.h" -#include "test/DevKkt.h" -#include "util/HighsInt.h" - -namespace presolve { - -namespace dev_kkt_check { - -class KktCheck; - -class KktChStep { - public: - KktChStep() {} - virtual ~KktChStep() {} - - std::vector RcolCost; - std::vector RcolLower; - std::vector RcolUpper; - std::vector RrowLower; - std::vector RrowUpper; - - int print = 1; - - std::stack > > rLowers; - std::stack > > rUppers; - std::stack > > cLowers; - std::stack > > cUppers; - std::stack > > costs; - - // full matrix - void setBoundsCostRHS(const std::vector& colUpper_, - const std::vector& colLower_, - const std::vector& cost, - const std::vector& rowLower_, - const std::vector& rowUpper_); - void addChange(int type, HighsInt row, HighsInt col, double valC, - double dualC, double dualR); - void addCost(HighsInt col, double value); - - dev_kkt_check::State initState( - const HighsInt numCol_, const HighsInt numRow_, - const std::vector& Astart_, const std::vector& Aend_, - const std::vector& Aindex_, const std::vector& Avalue_, - const std::vector& ARstart_, - const std::vector& ARindex_, - const std::vector& ARvalue_, - const std::vector& flagCol_, - const std::vector& flagRow_, - const std::vector& colValue_, const std::vector& colDual_, - const std::vector& rowValue_, const std::vector& rowDual_, - const std::vector& col_status_, - const std::vector& row_status_); -}; - -} // namespace dev_kkt_check - -} // namespace presolve -#endif /* TEST_KKTCHSTEP_H_ */ From 5613d0d91b963b6e7b523c0b1cafbe5321d666a7 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 09:55:20 +0300 Subject: [PATCH 14/22] add highs targets to build tree export set --- cmake/cpp-highs.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index addd15dd4d..40d2d5991c 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -56,6 +56,13 @@ install(TARGETS highs ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +if (NOT HIGHS_COVERAGE) + # Add library targets to the build-tree export set + export(TARGETS highs + NAMESPACE ${PROJECT_NAMESPACE}:: + FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake") +endif() if (CUPDLP_GPU) install(TARGETS cudalin @@ -64,6 +71,13 @@ if (CUPDLP_GPU) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if (NOT HIGHS_COVERAGE) + # Add library targets to the build-tree export set + export(TARGETS cudalin + NAMESPACE ${PROJECT_NAMESPACE}:: + FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake") + endif() endif() if (NOT HIGHS_COVERAGE) From 569b4b8cb9ddb4085cda5ced2a41ec77c809dc35 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 10:23:45 +0300 Subject: [PATCH 15/22] kkt source dir rename' --- .github/workflows/clang-format.yml | 4 +- .github/workflows/code-coverage.yml | 2 +- BUILD.bazel | 2 +- CMakeLists.txt | 2 +- cmake/sources-python.cmake | 10 +- cmake/sources.cmake | 2 +- docs/HiGHS_CopyrightHeaderUpdateAll | 4 +- highs/test_kkt/DevKkt.cpp | 469 ++++++++++++++++++++++++++++ highs/test_kkt/DevKkt.h | 143 +++++++++ highs/test_kkt/KktCh2.cpp | 305 ++++++++++++++++++ highs/test_kkt/KktCh2.h | 79 +++++ 11 files changed, 1009 insertions(+), 13 deletions(-) create mode 100644 highs/test_kkt/DevKkt.cpp create mode 100644 highs/test_kkt/DevKkt.h create mode 100644 highs/test_kkt/KktCh2.cpp create mode 100644 highs/test_kkt/KktCh2.h diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index c14b477ebe..5c12cc99dc 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -11,7 +11,7 @@ jobs: - uses: DoozyX/clang-format-lint-action@v0.18 with: source: - 'app/ highs/Highs.h ./highs/lp_data ./highs/mip ./highs/model ./highs/simplex ./highs/presolve ./highs/simplex ./highs/util ./highs/test ./highs/qpsolver' - # ./highs/test ./interfaces' + 'app/ highs/Highs.h ./highs/lp_data ./highs/mip ./highs/model ./highs/simplex ./highs/presolve ./highs/simplex ./highs/util ./highs/test_kkt ./highs/qpsolver' + # ./highs/test_kkt ./interfaces' extensions: 'h,cpp,c' clangFormatVersion: 18 diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index d60ccde3e0..6a7f04fbbd 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -45,7 +45,7 @@ jobs: lcov --remove cov.info "extern/zstr/*" -o cov.info lcov --remove cov.info "extern/catch*" -o cov.info lcov --remove cov.info "app/CLI11*" -o cov.info - lcov --remove cov.info "highs/test*" -o cov.info + lcov --remove cov.info "highs/test_kkt*" -o cov.info lcov --list cov.info mv cov.info coverage.info diff --git a/BUILD.bazel b/BUILD.bazel index 5272ff401e..315a82cffd 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -32,7 +32,7 @@ cc_library( "highs/presolve/*.cpp", "highs/qpsolver/*.cpp", "highs/simplex/*.cpp", - "highs/test/*.cpp", + "highs/test_kkt/*.cpp", "highs/util/*.cpp", ]), hdrs = glob([ diff --git a/CMakeLists.txt b/CMakeLists.txt index b06adaae35..2f3034250a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -716,7 +716,7 @@ if(NOT FAST_BUILD) ${PROJECT_SOURCE_DIR}/highs/presolve ${PROJECT_SOURCE_DIR}/highs/qpsolver ${PROJECT_SOURCE_DIR}/highs/simplex - ${PROJECT_SOURCE_DIR}/highs/test + ${PROJECT_SOURCE_DIR}/highs/test_kkt ${PROJECT_SOURCE_DIR}/highs/util) # explicitly switch on colored output for ninja diff --git a/cmake/sources-python.cmake b/cmake/sources-python.cmake index fb09c0c653..f07be58a3e 100644 --- a/cmake/sources-python.cmake +++ b/cmake/sources-python.cmake @@ -18,7 +18,7 @@ set(include_dirs_python $ $ $ - $ + $ $ $) @@ -266,8 +266,8 @@ set(highs_sources_python highs/simplex/HSimplexNlaFreeze.cpp highs/simplex/HSimplexNlaProductForm.cpp highs/simplex/HSimplexReport.cpp - highs/test/KktCh2.cpp - highs/test/DevKkt.cpp + highs/test_kkt/KktCh2.cpp + highs/test_kkt/DevKkt.cpp highs/util/HFactor.cpp highs/util/HFactorDebug.cpp highs/util/HFactorExtend.cpp @@ -410,8 +410,8 @@ set(highs_headers_python highs/simplex/SimplexConst.h highs/simplex/SimplexStruct.h highs/simplex/SimplexTimer.h - highs/test/DevKkt.h - highs/test/KktCh2.h + highs/test_kkt/DevKkt.h + highs/test_kkt/KktCh2.h highs/util/FactorTimer.h highs/util/HFactor.h highs/util/HFactorConst.h diff --git a/cmake/sources.cmake b/cmake/sources.cmake index cefffbe2ae..ba0ed384bd 100644 --- a/cmake/sources.cmake +++ b/cmake/sources.cmake @@ -18,7 +18,7 @@ set(include_dirs $ $ $ - $ + $ $ $) diff --git a/docs/HiGHS_CopyrightHeaderUpdateAll b/docs/HiGHS_CopyrightHeaderUpdateAll index f6981215ae..43b7c72171 100755 --- a/docs/HiGHS_CopyrightHeaderUpdateAll +++ b/docs/HiGHS_CopyrightHeaderUpdateAll @@ -16,8 +16,8 @@ ./HiGHS_CopyrightHeader.pl ../highs/presolve/*.h ./HiGHS_CopyrightHeader.pl ../highs/simplex/*.h ./HiGHS_CopyrightHeader.pl ../highs/simplex/*.cpp -./HiGHS_CopyrightHeader.pl ../highs/test/*.h -./HiGHS_CopyrightHeader.pl ../highs/test/*.cpp +./HiGHS_CopyrightHeader.pl ../highs/test_kkt/*.h +./HiGHS_CopyrightHeader.pl ../highs/test_kkt/*.cpp ./HiGHS_CopyrightHeader.pl ../highs/util/*.h ./HiGHS_CopyrightHeader.pl ../highs/util/*.cpp ./HiGHS_CopyrightHeader.pl ../app/RunHighs.cpp diff --git a/highs/test_kkt/DevKkt.cpp b/highs/test_kkt/DevKkt.cpp new file mode 100644 index 0000000000..00d76de4c5 --- /dev/null +++ b/highs/test_kkt/DevKkt.cpp @@ -0,0 +1,469 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* */ +/* This file is part of the HiGHS linear optimization suite */ +/* */ +/* Available as open-source under the MIT License */ +/* */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/**@file + * @brief + */ +#include "test_kkt/DevKkt.h" + +#include +#include +#include + +#include "util/HighsCDouble.h" + +namespace presolve { +namespace dev_kkt_check { + +constexpr int dev_print = 1; +constexpr double tol = 1e-07; + +KktInfo initInfo() { + KktInfo info; + info.rules[KktCondition::kColBounds] = + KktConditionDetails(KktCondition::kColBounds); + info.rules[KktCondition::kPrimalFeasibility] = + KktConditionDetails(KktCondition::kPrimalFeasibility); + info.rules[KktCondition::kDualFeasibility] = + KktConditionDetails(KktCondition::kDualFeasibility); + info.rules[KktCondition::kComplementarySlackness] = + KktConditionDetails(KktCondition::kComplementarySlackness); + info.rules[KktCondition::kStationarityOfLagrangian] = + KktConditionDetails(KktCondition::kStationarityOfLagrangian); + info.rules[KktCondition::kBasicFeasibleSolution] = + KktConditionDetails(KktCondition::kBasicFeasibleSolution); + return info; +} + +void checkPrimalBounds(const State& state, KktConditionDetails& details) { + details.type = KktCondition::kColBounds; + details.checked = 0; + details.violated = 0; + details.max_violation = 0.0; + details.sum_violation_2 = 0.0; + + for (int i = 0; i < state.numCol; i++) { + if (state.flagCol[i]) { + details.checked++; + double infeas = 0; + + if ((state.colLower[i] - state.colValue[i] > tol) || + (state.colValue[i] - state.colUpper[i] > tol)) { + if (state.colLower[i] - state.colValue[i] > tol) + infeas = state.colLower[i] - state.colValue[i]; + else + infeas = state.colValue[i] - state.colUpper[i]; + + if (dev_print == 1) + std::cout << "Variable " << i + << " infeasible: lb=" << state.colLower[i] + << ", value=" << state.colValue[i] + << ", ub=" << state.colUpper[i] << std::endl; + + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } +} + +void checkPrimalFeasMatrix(const State& state, KktConditionDetails& details) { + details.type = KktCondition::kPrimalFeasibility; + details.checked = 0; + details.violated = 0; + details.max_violation = 0.0; + details.sum_violation_2 = 0.0; + + for (int i = 0; i < state.numRow; i++) { + if (state.flagRow[i]) { + details.checked++; + double rowV = state.rowValue[i]; + + if (state.rowLower[i] < rowV && rowV < state.rowUpper[i]) continue; + double infeas = 0; + + if (((rowV - state.rowLower[i]) < 0) && + (fabs(rowV - state.rowLower[i]) > tol)) { + infeas = state.rowLower[i] - rowV; + if (dev_print == 1) + std::cout << "Row " << i << " infeasible: Row value=" << rowV + << " L=" << state.rowLower[i] + << " U=" << state.rowUpper[i] << std::endl; + } + + if (((rowV - state.rowUpper[i]) > 0) && + (fabs(rowV - state.rowUpper[i]) > tol)) { + infeas = rowV - state.rowUpper[i]; + if (dev_print == 1) + std::cout << "Row " << i << " infeasible: Row value=" << rowV + << " L=" << state.rowLower[i] + << " U=" << state.rowUpper[i] << std::endl; + } + if (infeas > 0) { + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } + + if (details.violated == 0) { + if (dev_print == 1) std::cout << "Primal feasible.\n"; + } else { + if (dev_print == 1) std::cout << "KKT check error: Primal infeasible.\n"; + } +} + +void checkDualFeasibility(const State& state, KktConditionDetails& details) { + details.type = KktCondition::kPrimalFeasibility; + details.checked = 0; + details.violated = 0; + details.max_violation = 0.0; + details.sum_violation_2 = 0.0; + + // check values of z_j are dual feasible + for (int i = 0; i < state.numCol; i++) { + if (state.flagCol[i]) { + details.checked++; + double infeas = 0; + // j not in L or U + if (state.colLower[i] <= -kHighsInf && state.colUpper[i] >= kHighsInf) { + if (fabs(state.colDual[i]) > tol) { + if (dev_print == 1) + std::cout << "Dual feasibility fail: l=-inf, x[" << i + << "]=" << state.colValue[i] << ", u=inf, z[" << i + << "]=" << state.colDual[i] << std::endl; + infeas = fabs(state.colDual[i]); + } + } + // j in L: x=l and l tol) { + if (dev_print == 1) + std::cout << "Dual feasibility fail: l[" << i + << "]=" << state.colLower[i] << " = x[" << i + << "]=" << state.colValue[i] << ", z[" << i + << "]=" << state.colDual[i] << std::endl; + infeas = fabs(state.colDual[i]); + } + } + // j in U: x=u and l tol) { + if (dev_print == 1) + std::cout << "Dual feasibility fail: x[" << i + << "]=" << state.colValue[i] << "=u[" << i << "], z[" << i + << "]=" << state.colDual[i] << std::endl; + infeas = fabs(state.colDual[i]); + } + } + + if (infeas > 0) { + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } + + // check values of y_i are dual feasible + for (int i = 0; i < state.numRow; i++) { + if (state.flagRow[i]) { + details.checked++; + + double rowV = state.rowValue[i]; + + // L = Ax = U can be any sign + if (fabs(state.rowLower[i] - rowV) < tol && + fabs(state.rowUpper[i] - rowV) < tol) + continue; + + double infeas = 0; + // L = Ax < U + if (fabs(state.rowLower[i] - rowV) < tol && rowV < state.rowUpper[i]) { + if (state.rowDual[i] < -tol) { + if (dev_print == 1) + std::cout << "Dual feasibility fail for row " << i + << ": L= " << state.rowLower[i] << ", Ax=" << rowV + << ", U=" << state.rowUpper[i] + << ", y=" << state.rowDual[i] << std::endl; + infeas = -state.rowDual[i]; + } + } + // L < Ax = U + else if (state.rowLower[i] < rowV && + fabs(rowV - state.rowUpper[i]) < tol) { + if (state.rowDual[i] > tol) { + if (dev_print == 1) + std::cout << "Dual feasibility fail for row " << i + << ": L= " << state.rowLower[i] << ", Ax=" << rowV + << ", U=" << state.rowUpper[i] + << ", y=" << state.rowDual[i] << std::endl; + infeas = state.rowDual[i]; + } + } + // L < Ax < U + else if ((state.rowLower[i] < (rowV + tol)) && + (rowV < (state.rowUpper[i] + tol))) { + if (fabs(state.rowDual[i]) > tol) { + if (dev_print == 1) + std::cout << "Dual feasibility fail for row " << i + << ": L= " << state.rowLower[i] << ", Ax=" << rowV + << ", U=" << state.rowUpper[i] + << ", y=" << state.rowDual[i] << std::endl; + infeas = std::abs(state.rowDual[i]); + } + } + if (infeas > 0) { + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } + + if (details.violated == 0) { + if (dev_print == 1) std::cout << "Dual feasible.\n"; + } else { + if (dev_print == 1) + std::cout << "KKT check error: Dual feasibility fail.\n"; + } +} + +void checkComplementarySlackness(const State& state, + KktConditionDetails& details) { + details.type = KktCondition::kComplementarySlackness; + details.checked = 0; + details.violated = 0; + details.max_violation = 0.0; + details.sum_violation_2 = 0.0; + + for (int i = 0; i < state.numCol; i++) { + if (state.flagCol[i]) { + double infeas = 0; + details.checked++; + if (state.colLower[i] > -kHighsInf && + fabs(state.colValue[i] - state.colLower[i]) > tol) { + if (fabs(state.colDual[i]) > tol && + fabs(state.colValue[i] - state.colUpper[i]) > tol) { + if (dev_print) + // clang-format off + std::cout << "Comp. slackness fail: " + << "l[" << i << "]=" << state.colLower[i] << ", x[" << i + << "]=" << state.colValue[i] << ", z[" << i + << "]=" << state.colDual[i] << std::endl; + // clang-format on + infeas = fabs(state.colDual[i]); + } + } + if (state.colUpper[i] < kHighsInf && + fabs(state.colUpper[i] - state.colValue[i]) > tol) { + if (fabs(state.colDual[i]) > tol && + fabs(state.colValue[i] - state.colLower[i]) > tol) { + if (dev_print == 1) + std::cout << "Comp. slackness fail: x[" << i + << "]=" << state.colValue[i] << ", u[" << i + << "]=" << state.colUpper[i] << ", z[" << i + << "]=" << state.colDual[i] << std::endl; + infeas = fabs(state.colDual[i]); + } + } + + if (infeas > 0) { + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } + + if (details.violated == 0) { + if (dev_print == 1) std::cout << "Complementary Slackness.\n"; + } else { + if (dev_print == 1) std::cout << "KKT check error: Comp slackness fail.\n"; + } +} + +void checkStationarityOfLagrangian(const State& state, + KktConditionDetails& details) { + details.type = KktCondition::kStationarityOfLagrangian; + details.checked = 0; + details.violated = 0; + details.max_violation = 0.0; + details.sum_violation_2 = 0.0; + + // A'y + c - z = 0 + for (int j = 0; j < state.numCol; j++) { + if (state.flagCol[j]) { + details.checked++; + double infeas = 0; + + HighsCDouble lagrV = HighsCDouble(state.colCost[j]) - state.colDual[j]; + for (int k = state.Astart[j]; k < state.Aend[j]; k++) { + const int row = state.Aindex[k]; + assert(row >= 0 && row < state.numRow); + if (state.flagRow[row]) + lagrV = lagrV - state.rowDual[row] * state.Avalue[k]; + } + + if (fabs(double(lagrV)) > tol) { + if (dev_print == 1) + std::cout << "Column " << j + << " fails stationary of Lagrangian: dL/dx" << j << " = " + << double(lagrV) << ", rather than zero." << std::endl; + infeas = fabs(double(lagrV)); + } + + if (infeas > 0) { + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } + + if (details.violated == 0) { + if (dev_print == 1) std::cout << "Stationarity of Lagrangian.\n"; + } else { + if (dev_print == 1) + std::cout << "KKT check error: Lagrangian is not stationary.\n"; + } +} + +void checkBasicFeasibleSolution(const State& state, + KktConditionDetails& details) { + // Go over cols and check that the duals of basic values are zero. + assert((int)state.col_status.size() == state.numCol); + assert((int)state.colDual.size() == state.numCol); + for (int j = 0; j < state.numCol; j++) { + if (state.flagCol[j]) { + details.checked++; + double infeas = 0; + if (state.col_status[j] == HighsBasisStatus::kBasic && + fabs(state.colDual[j]) > tol) { + if (dev_print == 1) + std::cout << "Col " << j << " is basic but has nonzero dual " + << state.colDual[j] << "." << std::endl; + infeas = fabs(state.colDual[j]); + } + + if (infeas > 0) { + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } + + // Go over rows and check that the duals of basic values are zero. + assert((int)state.row_status.size() == state.numRow); + assert((int)state.rowDual.size() == state.numRow); + for (int i = 0; i < state.numRow; i++) { + if (state.flagRow[i]) { + details.checked++; + double infeas = 0; + if (state.row_status[i] == HighsBasisStatus::kBasic && + fabs(state.rowDual[i]) > tol) { + if (dev_print == 1) + std::cout << "Row " << i << " is basic but has nonzero dual: " + << fabs(state.rowDual[i]) << std::endl; + infeas = fabs(state.rowDual[i]); + } + if (infeas > 0) { + details.violated++; + details.sum_violation_2 += infeas * infeas; + + if (details.max_violation < infeas) details.max_violation = infeas; + } + } + } + + if (details.violated == 0) { + if (dev_print == 1) std::cout << "BFS." << std::endl; + } else { + if (dev_print == 1) + std::cout << "BFS X Violated: " << details.violated << std::endl; + } + + // check number of basic rows during postsolve. + int current_n_rows = 0; + int current_n_rows_basic = 0; + int current_n_cols_basic = 0; + + for (int i = 0; i < state.numRow; i++) { + if (state.flagRow[i]) current_n_rows++; + + if (state.flagRow[i] && state.row_status[i] == HighsBasisStatus::kBasic) + current_n_rows_basic++; + } + + for (int i = 0; i < state.numCol; i++) { + if (state.flagCol[i] && state.col_status[i] == HighsBasisStatus::kBasic) + current_n_cols_basic++; + } + + bool holds = current_n_cols_basic + current_n_rows_basic == current_n_rows; + if (!holds) { + details.violated = -1; + std::cout << "BFS X Violated WRONG basis count: " + << current_n_cols_basic + current_n_rows_basic << " " + << current_n_rows << std::endl; + } + // assert(current_n_cols_basic + current_n_rows_basic == current_n_rows); +} + +bool checkKkt(const State& state, KktInfo& info) { + if (state.numCol == 0) { + std::cout << "KKT warning: empty problem" << std::endl; + return true; + } + + std::cout << std::endl; + + checkPrimalBounds(state, info.rules[KktCondition::kColBounds]); + checkPrimalFeasMatrix(state, info.rules[KktCondition::kPrimalFeasibility]); + checkDualFeasibility(state, info.rules[KktCondition::kDualFeasibility]); + checkComplementarySlackness( + state, info.rules[KktCondition::kComplementarySlackness]); + checkStationarityOfLagrangian( + state, info.rules[KktCondition::kStationarityOfLagrangian]); + checkBasicFeasibleSolution(state, + info.rules[KktCondition::kBasicFeasibleSolution]); + + assert(info.rules.size() == 6); + + info.pass_col_bounds = info.rules[KktCondition::kColBounds].violated == 0; + info.pass_primal_feas_matrix = + info.rules[KktCondition::kPrimalFeasibility].violated == 0; + info.pass_dual_feas = + info.rules[KktCondition::kDualFeasibility].violated == 0; + info.pass_comp_slackness = + info.rules[KktCondition::kComplementarySlackness].violated == 0; + info.pass_st_of_L = + info.rules[KktCondition::kStationarityOfLagrangian].violated == 0; + info.pass_bfs = + info.rules[KktCondition::kBasicFeasibleSolution].violated == 0; + + if (info.pass_primal_feas_matrix && info.pass_col_bounds && + info.pass_dual_feas && info.pass_comp_slackness && info.pass_st_of_L) + return true; + + return false; +} + +} // namespace dev_kkt_check +} // namespace presolve diff --git a/highs/test_kkt/DevKkt.h b/highs/test_kkt/DevKkt.h new file mode 100644 index 0000000000..4b96570d74 --- /dev/null +++ b/highs/test_kkt/DevKkt.h @@ -0,0 +1,143 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* */ +/* This file is part of the HiGHS linear optimization suite */ +/* */ +/* Available as open-source under the MIT License */ +/* */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/**@file test/DevKkt.h + * @brief + */ +#ifndef TEST_KKT_DEV_KKT_H_ +#define TEST_KKT_DEV_KKT_H_ + +#include +#include + +#include "lp_data/HConst.h" + +namespace presolve { +namespace dev_kkt_check { + +struct State { + State( + const HighsInt numCol_, const HighsInt numRow_, + const std::vector& Astart_, const std::vector& Aend_, + const std::vector& Aindex_, const std::vector& Avalue_, + const std::vector& ARstart_, + const std::vector& ARindex_, + const std::vector& ARvalue_, const std::vector& colCost_, + const std::vector& colLower_, + const std::vector& colUpper_, + const std::vector& rowLower_, + const std::vector& rowUpper_, + const std::vector& flagCol_, + const std::vector& flagRow_, + const std::vector& colValue_, const std::vector& colDual_, + const std::vector& rowValue_, const std::vector& rowDual_, + const std::vector& col_status_, + const std::vector& row_status_) + : numCol(numCol_), + numRow(numRow_), + Astart(Astart_), + Aend(Aend_), + Aindex(Aindex_), + Avalue(Avalue_), + ARstart(ARstart_), + ARindex(ARindex_), + ARvalue(ARvalue_), + colCost(colCost_), + colLower(colLower_), + colUpper(colUpper_), + rowLower(rowLower_), + rowUpper(rowUpper_), + flagCol(flagCol_), + flagRow(flagRow_), + colValue(colValue_), + colDual(colDual_), + rowValue(rowValue_), + rowDual(rowDual_), + col_status(col_status_), + row_status(row_status_) {} + + const HighsInt numCol; + const HighsInt numRow; + + const std::vector& Astart; + const std::vector& Aend; + const std::vector& Aindex; + const std::vector& Avalue; + + const std::vector& ARstart; + const std::vector& ARindex; + const std::vector& ARvalue; + + const std::vector& colCost; + const std::vector& colLower; + const std::vector& colUpper; + const std::vector& rowLower; + const std::vector& rowUpper; + + const std::vector& flagCol; + const std::vector& flagRow; + + // solution + const std::vector& colValue; + const std::vector& colDual; + const std::vector& rowValue; + const std::vector& rowDual; + + // basis + const std::vector& col_status; + const std::vector& row_status; +}; + +enum class KktCondition { + kColBounds, + kPrimalFeasibility, + kDualFeasibility, + kComplementarySlackness, + kStationarityOfLagrangian, + kBasicFeasibleSolution, + kUnset, +}; + +struct KktConditionDetails { + KktConditionDetails() {} + KktConditionDetails(KktCondition type_) : type(type_) {} + + KktCondition type = KktCondition::kUnset; + double max_violation = 0.0; + double sum_violation_2 = 0.0; + HighsInt checked = 0; + HighsInt violated = 0; +}; + +struct KktInfo { + std::map rules; + bool pass_col_bounds = false; + bool pass_primal_feas_matrix = false; + bool pass_dual_feas = false; + bool pass_st_of_L = false; + bool pass_comp_slackness = false; + bool pass_bfs = false; +}; + +KktInfo initInfo(); + +bool checkKkt(const State& state, KktInfo& info); + +void checkPrimalBounds(const State& state, KktConditionDetails& details); +void checkPrimalFeasMatrix(const State& state, KktConditionDetails& details); +void checkDualFeasibility(const State& state, KktConditionDetails& details); +void checkComplementarySlackness(const State& state, + KktConditionDetails& details); +void checkStationarityOfLagrangian(const State& state, + KktConditionDetails& details); +void checkBasicFeasibleSolution(const State& state, + KktConditionDetails& details); + +} // namespace dev_kkt_check +} // namespace presolve + +#endif /* TEST_KKTCHSTEP_H_ */ diff --git a/highs/test_kkt/KktCh2.cpp b/highs/test_kkt/KktCh2.cpp new file mode 100644 index 0000000000..070d1c9123 --- /dev/null +++ b/highs/test_kkt/KktCh2.cpp @@ -0,0 +1,305 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* */ +/* This file is part of the HiGHS linear optimization suite */ +/* */ +/* Available as open-source under the MIT License */ +/* */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/**@file test/KktChStep.cpp + * @brief + */ +#include "test_kkt/KktCh2.h" + +#include +#include + +#include "test_kkt/DevKkt.h" + +using std::cout; +using std::endl; +using std::get; +using std::pair; +using std::setw; +using std::vector; + +namespace presolve { + +namespace dev_kkt_check { + +void KktChStep::setBoundsCostRHS(const vector& colUpper_, + const vector& colLower_, + const vector& cost, + const vector& rowLower_, + const vector& rowUpper_) { + RcolLower = colLower_; + RcolUpper = colUpper_; + RrowLower = rowLower_; + RrowUpper = rowUpper_; + RcolCost = cost; +} + +void KktChStep::addCost(HighsInt col, double value) { RcolCost[col] = value; } + +/* +1 SING_ROW +17 DOUBLETON_EQUATION + +171 DOUBLETON_EQUATION_ROW_BOUNDS_UPDATE +173 DOUBLETON_EQUATION_X_ZERO_INITIALLY +172 DOUBLETON_EQUATION_NEW_X_NONZERO +174 DOUBLETON_EQUATION_NEW_X_ZERO_AR_UPDATE +175 DOUBLETON_EQUATION_NEW_X_ZERO_A_UPDATE + +7 FIXED_COL +0 EMPTY_ROW +6 EMPTY_COL +9 DOMINATED_COLS +10 WEAKLY_DOMINATED_COLS +4 FREE_SING_COL +5 SING_COL_DOUBLETON_INEQ +19 SING_COL_DOUBLETON_INEQ_SECOND_SING_COL +8 IMPLIED_FREE_SING_COL +3 FORCING_ROW +2 FORCING_ROW_VARIABLE +16 REDUNDANT_ROW + +*/ +void KktChStep::addChange(int type, HighsInt row, HighsInt col, double valC, + double dualC, double dualR) { + // when updating fill new values for b, c, bounds in Rb RcolCost RcolUpper, + // RcolLower + vector> upd; + + switch (type) { + case 171: // new bounds from doubleton equation, retrieve old ones + upd = rLowers.top(); + rLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowLower[ind] = get<1>(upd[i]); + } + upd = rUppers.top(); + rUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowUpper[ind] = get<1>(upd[i]); + } + break; + case 1: // row singleton + upd = cLowers.top(); + cLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolLower[ind] = get<1>(upd[i]); + } + upd = cUppers.top(); + cUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolUpper[ind] = get<1>(upd[i]); + } + upd = costs.top(); + costs.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolCost[ind] = get<1>(upd[i]); + } + break; + case 2: // each variable at forcing row: rowDual is cost here + RcolCost[col] = dualR; + break; + case 22: // + upd = rLowers.top(); + rLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowLower[ind] = get<1>(upd[i]); + } + upd = rUppers.top(); + rUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowUpper[ind] = get<1>(upd[i]); + } + break; + case 3: // the row that is forcing + if (valC != 0) { + upd = rLowers.top(); + rLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowLower[ind] = get<1>(upd[i]); + } + upd = rUppers.top(); + rUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowUpper[ind] = get<1>(upd[i]); + } + } + break; + case 4: // implied free column singleton (also from duplicate row) + upd = costs.top(); + costs.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolCost[ind] = get<1>(upd[i]); + } + break; + case 5: // doubleton eq with singleton col + upd = cLowers.top(); + cLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolLower[ind] = get<1>(upd[i]); + } + upd = cUppers.top(); + cUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolUpper[ind] = get<1>(upd[i]); + } + upd = costs.top(); + costs.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolCost[ind] = get<1>(upd[i]); + } + break; + case 17: { // doubleton equation + upd = cLowers.top(); + cLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolLower[ind] = get<1>(upd[i]); + } + upd = cUppers.top(); + cUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolUpper[ind] = get<1>(upd[i]); + } + upd = costs.top(); + costs.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolCost[ind] = get<1>(upd[i]); + } + break; + } + case 6: // empty column, dominated column or weakly dominated + if (valC != 0) { + upd = rLowers.top(); + rLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowLower[ind] = get<1>(upd[i]); + } + upd = rUppers.top(); + rUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowUpper[ind] = get<1>(upd[i]); + } + } + break; + case 7: // fixed variable + if (valC != 0) { + upd = rLowers.top(); + rLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowLower[ind] = get<1>(upd[i]); + } + upd = rUppers.top(); + rUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowUpper[ind] = get<1>(upd[i]); + } + } + break; + case 11: // empty row from duplicate rows + upd = rLowers.top(); + rLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowLower[ind] = get<1>(upd[i]); + } + upd = rUppers.top(); + rUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RrowUpper[ind] = get<1>(upd[i]); + } + break; + case 12: // doubleton eq from duplicate rows; + upd = cLowers.top(); + cLowers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolLower[ind] = get<1>(upd[i]); + } + upd = cUppers.top(); + cUppers.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolUpper[ind] = get<1>(upd[i]); + } + upd = costs.top(); + costs.pop(); + for (size_t i = 0; i < upd.size(); i++) { + HighsInt ind = get<0>(upd[i]); + RcolCost[ind] = get<1>(upd[i]); + } + break; + case 121: // + break; /* + case 14: //two duplicate columns by one + colValue[col] = valC; + colDual[col] = dualC; + RcolLower = cLowers.top(); cLowers.pop(); + RcolUpper = cUppers.top(); cUppers.pop(); + break; + case 15: //sing variable on initEq + flagRow[row] = true; + rowDual[row] = dualR; + break;*/ + } +} + +dev_kkt_check::State KktChStep::initState( + const HighsInt numCol_, const HighsInt numRow_, + const std::vector& Astart_, const std::vector& Aend_, + const std::vector& Aindex_, const std::vector& Avalue_, + const std::vector& ARstart_, + const std::vector& ARindex_, const std::vector& ARvalue_, + const std::vector& flagCol_, + const std::vector& flagRow_, const std::vector& colValue_, + const std::vector& colDual_, const std::vector& rowValue_, + const std::vector& rowDual_, + const std::vector& col_status_, + const std::vector& row_status_) { + // check row value + + std::vector rowValue(numRow_, 0); + for (int row = 0; row < numRow_; row++) { + if (flagRow_[row]) { + for (int k = ARstart_[row]; k < ARstart_[row + 1]; k++) { + const int col = ARindex_[k]; + if (flagCol_[col]) rowValue[row] += ARvalue_[k] * colValue_[col]; + } + assert(rowValue_[row] == rowValue[row]); + } + } + + return dev_kkt_check::State(numCol_, numRow_, Astart_, Aend_, Aindex_, + Avalue_, ARstart_, ARindex_, ARvalue_, RcolCost, + RcolLower, RcolUpper, RrowLower, RrowUpper, + flagCol_, flagRow_, colValue_, colDual_, + rowValue_, rowDual_, col_status_, row_status_); +} + +} // namespace dev_kkt_check + +} // namespace presolve diff --git a/highs/test_kkt/KktCh2.h b/highs/test_kkt/KktCh2.h new file mode 100644 index 0000000000..6950cff4ee --- /dev/null +++ b/highs/test_kkt/KktCh2.h @@ -0,0 +1,79 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* */ +/* This file is part of the HiGHS linear optimization suite */ +/* */ +/* Available as open-source under the MIT License */ +/* */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/**@file test/KktChStep.h + * @brief + */ +#ifndef TEST_KKTCH2_H_ +#define TEST_KKTCH2_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include "lp_data/HConst.h" +#include "test_kkt/DevKkt.h" +#include "util/HighsInt.h" + +namespace presolve { + +namespace dev_kkt_check { + +class KktCheck; + +class KktChStep { + public: + KktChStep() {} + virtual ~KktChStep() {} + + std::vector RcolCost; + std::vector RcolLower; + std::vector RcolUpper; + std::vector RrowLower; + std::vector RrowUpper; + + int print = 1; + + std::stack > > rLowers; + std::stack > > rUppers; + std::stack > > cLowers; + std::stack > > cUppers; + std::stack > > costs; + + // full matrix + void setBoundsCostRHS(const std::vector& colUpper_, + const std::vector& colLower_, + const std::vector& cost, + const std::vector& rowLower_, + const std::vector& rowUpper_); + void addChange(int type, HighsInt row, HighsInt col, double valC, + double dualC, double dualR); + void addCost(HighsInt col, double value); + + dev_kkt_check::State initState( + const HighsInt numCol_, const HighsInt numRow_, + const std::vector& Astart_, const std::vector& Aend_, + const std::vector& Aindex_, const std::vector& Avalue_, + const std::vector& ARstart_, + const std::vector& ARindex_, + const std::vector& ARvalue_, + const std::vector& flagCol_, + const std::vector& flagRow_, + const std::vector& colValue_, const std::vector& colDual_, + const std::vector& rowValue_, const std::vector& rowDual_, + const std::vector& col_status_, + const std::vector& row_status_); +}; + +} // namespace dev_kkt_check + +} // namespace presolve +#endif /* TEST_KKTCHSTEP_H_ */ From 1e9536826be0c8e02c518e829343183e4b11dd65 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 10:39:29 +0300 Subject: [PATCH 16/22] more test_kkt rename --- BUILD.bazel | 2 +- cmake/sources.cmake | 8 ++++---- highs/io/HMpsFF.h | 2 +- highs/meson.build | 4 ++-- highs/presolve/HPresolve.cpp | 2 +- highs/test_kkt/DevKkt.h | 2 +- highs/test_kkt/KktCh2.cpp | 2 +- highs/test_kkt/KktCh2.h | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 315a82cffd..16c1fea2b4 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -61,7 +61,7 @@ cc_library( # "highs/presolve", # "highs/qpsolver", # "highs/simplex", - # "highs/test", + # "highs/test_kkt", # "highs/util", "bazel-bin", ], diff --git a/cmake/sources.cmake b/cmake/sources.cmake index ba0ed384bd..55dd9abebf 100644 --- a/cmake/sources.cmake +++ b/cmake/sources.cmake @@ -268,8 +268,8 @@ set(highs_sources simplex/HSimplexNlaFreeze.cpp simplex/HSimplexNlaProductForm.cpp simplex/HSimplexReport.cpp - test/KktCh2.cpp - test/DevKkt.cpp + test_kkt/KktCh2.cpp + test_kkt/DevKkt.cpp util/HFactor.cpp util/HFactorDebug.cpp util/HFactorExtend.cpp @@ -415,8 +415,8 @@ set(highs_headers simplex/SimplexConst.h simplex/SimplexStruct.h simplex/SimplexTimer.h - test/DevKkt.h - test/KktCh2.h + test_kkt/DevKkt.h + test_kkt/KktCh2.h util/FactorTimer.h util/HFactor.h util/HFactorConst.h diff --git a/highs/io/HMpsFF.h b/highs/io/HMpsFF.h index fcb118177a..590139d3f0 100644 --- a/highs/io/HMpsFF.h +++ b/highs/io/HMpsFF.h @@ -164,7 +164,7 @@ class HMpsFF { enum class Boundtype { kLe, kEq, kGe }; //, kFr }; - // see https://docs.mosek.com/latest/capi/mps-format.html#csection-optional + // see https://docs.mosek.com/latest_kkt/capi/mps-format.html#csection-optional enum class ConeType { kZero, kQuad, kRQuad, kPExp, kPPow, kDExp, kDPow }; std::string objective_name; diff --git a/highs/meson.build b/highs/meson.build index a62595f6d5..ce7ddac8c5 100644 --- a/highs/meson.build +++ b/highs/meson.build @@ -284,8 +284,8 @@ _srcs = [ 'simplex/HSimplexNlaProductForm.cpp', 'simplex/HSimplexReport.cpp', 'simplex/HighsSimplexAnalysis.cpp', - 'test/DevKkt.cpp', - 'test/KktCh2.cpp', + 'test_kkt/DevKkt.cpp', + 'test_kkt/KktCh2.cpp', 'util/HFactor.cpp', 'util/HFactorDebug.cpp', 'util/HFactorExtend.cpp', diff --git a/highs/presolve/HPresolve.cpp b/highs/presolve/HPresolve.cpp index a438d121bd..b817f066e3 100644 --- a/highs/presolve/HPresolve.cpp +++ b/highs/presolve/HPresolve.cpp @@ -25,7 +25,7 @@ #include "mip/HighsObjectiveFunction.h" #include "mip/MipTimer.h" #include "presolve/HighsPostsolveStack.h" -#include "test/DevKkt.h" +#include "test_kkt/DevKkt.h" #include "util/HFactor.h" #include "util/HighsCDouble.h" #include "util/HighsIntegers.h" diff --git a/highs/test_kkt/DevKkt.h b/highs/test_kkt/DevKkt.h index 4b96570d74..e74d3a22c3 100644 --- a/highs/test_kkt/DevKkt.h +++ b/highs/test_kkt/DevKkt.h @@ -5,7 +5,7 @@ /* Available as open-source under the MIT License */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/**@file test/DevKkt.h +/**@file test_kkt/DevKkt.h * @brief */ #ifndef TEST_KKT_DEV_KKT_H_ diff --git a/highs/test_kkt/KktCh2.cpp b/highs/test_kkt/KktCh2.cpp index 070d1c9123..239d32fe99 100644 --- a/highs/test_kkt/KktCh2.cpp +++ b/highs/test_kkt/KktCh2.cpp @@ -5,7 +5,7 @@ /* Available as open-source under the MIT License */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/**@file test/KktChStep.cpp +/**@file test_kkt/KktChStep.cpp * @brief */ #include "test_kkt/KktCh2.h" diff --git a/highs/test_kkt/KktCh2.h b/highs/test_kkt/KktCh2.h index 6950cff4ee..c4be01bc4a 100644 --- a/highs/test_kkt/KktCh2.h +++ b/highs/test_kkt/KktCh2.h @@ -5,7 +5,7 @@ /* Available as open-source under the MIT License */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/**@file test/KktChStep.h +/**@file test_kkt/KktChStep.h * @brief */ #ifndef TEST_KKTCH2_H_ From 953a4283b46bdbbf0f095638b80714d30ccfba2d Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 13:42:18 +0300 Subject: [PATCH 17/22] add fastlink to link options --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f3034250a..093150a921 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -468,7 +468,7 @@ if(MSVC) add_compile_options("$<$:/Z7>") if (NOT CUPDLP_GPU) - add_compile_options("$<$:/DEBUG:FASTLINK>") + add_link_options("$<$:/DEBUG:FASTLINK>") endif() if(STDCALL) From a886ae5720257b0d77972977bf061908b35e5604 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 13:43:32 +0300 Subject: [PATCH 18/22] links opts --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 093150a921..861219f4e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,10 +466,7 @@ if(MSVC) # add_link_options("/DEBUG:FASTLINK") add_compile_options("$<$:/Z7>") - - if (NOT CUPDLP_GPU) - add_link_options("$<$:/DEBUG:FASTLINK>") - endif() + add_link_options("$<$:/DEBUG:FASTLINK>") if(STDCALL) # /Gz - stdcall calling convention From 17d829305ca5f5250b2c6da373d01e18cf9afc8d Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 12:05:21 +0300 Subject: [PATCH 19/22] fastlink only to highs --- CMakeLists.txt | 1 - cmake/cpp-highs.cmake | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 861219f4e5..2cb2a8ea0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,7 +466,6 @@ if(MSVC) # add_link_options("/DEBUG:FASTLINK") add_compile_options("$<$:/Z7>") - add_link_options("$<$:/DEBUG:FASTLINK>") if(STDCALL) # /Gz - stdcall calling convention diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index 40d2d5991c..5976a79717 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -39,6 +39,10 @@ set_target_properties(highs PROPERTIES COMPATIBLE_INTERFACE_STRING ${PROJECT_NAME}_MAJOR_VERSION ) +if(MSVC) + target_link_options(highs PRIVATE "$<$:/DEBUG:FASTLINK>") +endif() + ################### ## Install rules ## ################### @@ -76,7 +80,7 @@ if (CUPDLP_GPU) # Add library targets to the build-tree export set export(TARGETS cudalin NAMESPACE ${PROJECT_NAMESPACE}:: - FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake") + APPEND FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake") endif() endif() From cdaf8106c3004f945a6578266944409d87e301c9 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 12:34:45 +0300 Subject: [PATCH 20/22] fastlink as before --- CMakeLists.txt | 5 +++++ cmake/cpp-highs.cmake | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cb2a8ea0c..bcb507e94d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -467,6 +467,11 @@ if(MSVC) add_compile_options("$<$:/Z7>") + if (NOT CUPDLP_GPU) + add_compile_options("$<$:/DEBUG:FASTLINK>") + endif() + + if(STDCALL) # /Gz - stdcall calling convention add_definitions(/Gz) diff --git a/cmake/cpp-highs.cmake b/cmake/cpp-highs.cmake index 5976a79717..bff8b6abaf 100644 --- a/cmake/cpp-highs.cmake +++ b/cmake/cpp-highs.cmake @@ -39,10 +39,6 @@ set_target_properties(highs PROPERTIES COMPATIBLE_INTERFACE_STRING ${PROJECT_NAME}_MAJOR_VERSION ) -if(MSVC) - target_link_options(highs PRIVATE "$<$:/DEBUG:FASTLINK>") -endif() - ################### ## Install rules ## ################### From 59ea897524ef206c90404c6ba92d86dff9f8c5b7 Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 12:36:58 +0300 Subject: [PATCH 21/22] commas around fastlink --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcb507e94d..ddfd7bb7be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,11 +466,7 @@ if(MSVC) # add_link_options("/DEBUG:FASTLINK") add_compile_options("$<$:/Z7>") - - if (NOT CUPDLP_GPU) - add_compile_options("$<$:/DEBUG:FASTLINK>") - endif() - + add_link_options("$<$:\"/DEBUG:FASTLINK\">") if(STDCALL) # /Gz - stdcall calling convention From 9b8de43c566f5e875656d3f8b19e1562337603de Mon Sep 17 00:00:00 2001 From: Ivet Galabova Date: Tue, 8 Apr 2025 12:50:31 +0300 Subject: [PATCH 22/22] commas around fastlink do not work --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ddfd7bb7be..861219f4e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,7 +466,7 @@ if(MSVC) # add_link_options("/DEBUG:FASTLINK") add_compile_options("$<$:/Z7>") - add_link_options("$<$:\"/DEBUG:FASTLINK\">") + add_link_options("$<$:/DEBUG:FASTLINK>") if(STDCALL) # /Gz - stdcall calling convention