diff --git a/BUILD.bazel b/BUILD.bazel index 71dde7020e..7ec36e4d9b 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -50,8 +50,8 @@ cuda_library( cc_library( name = "highs", srcs = ["highs/interfaces/highs_c_api.cpp"] + glob([ - "extern/filereaderlp/*.cpp", "highs/io/*.cpp", + "highs/io/filereaderlp/*.cpp", "highs/ipm/*.cpp", "highs/ipm/ipx/*.cc", "highs/ipm/basiclu/*.c", @@ -71,8 +71,8 @@ cc_library( "highs/mip/feasibilityjump.hh", ] + glob([ "**/*.h", + "highs/io/filereaderlp/*.hpp", "highs/qpsolver/*.hpp", - "extern/filereaderlp/*.hpp", "extern/zstr/*.hpp", ]), copts = select({ diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 84e1cfcfa0..f39abc7cc6 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -28,17 +28,6 @@ The upstream source code is available at: CLI11 is only used to parse command line input for the HiGHS executable, so does not affect the license status of the HiGHS library or language interfaces to it. -## filereaderlp - -The source code in `/extern/filereaderlp` is distributed under the [MIT license](https://opensource.org/license/MIT) -at `/extern/filereaderlp/LICENSE`. - -It was originally developed by Michael Feldmeier. - -The upstream source code is available at: - - * https://github.com/feldmeier/FilereaderLP - ## metis The source code in `/extern/metis` is distributed under the [Apache 2.0 license](https://opensource.org/license/apache-2-0) diff --git a/check/TestLPFileFormat.cpp b/check/TestLPFileFormat.cpp index 2870d074fa..9064b09cc3 100644 --- a/check/TestLPFileFormat.cpp +++ b/check/TestLPFileFormat.cpp @@ -1,7 +1,7 @@ #include "HCheckConfig.h" #include "Highs.h" #include "catch.hpp" -#include "filereaderlp/reader.hpp" +#include "io/filereaderlp/reader.hpp" const bool dev_run = false; diff --git a/cmake/sources-python.cmake b/cmake/sources-python.cmake index b89ee37586..c60b376130 100644 --- a/cmake/sources-python.cmake +++ b/cmake/sources-python.cmake @@ -1,11 +1,11 @@ set(include_dirs_python $ - $ $ $ $ $ $ + $ $ $ $ @@ -176,7 +176,6 @@ set(ipx_sources_python highs/ipm/ipx/utils.h) set(highs_sources_python - extern/filereaderlp/reader.cpp highs/interfaces/highs_c_api.cpp highs/io/Filereader.cpp highs/io/FilereaderEms.cpp @@ -186,6 +185,7 @@ set(highs_sources_python highs/io/HMpsFF.cpp highs/io/HMPSIO.cpp highs/io/LoadOptions.cpp + highs/io/filereaderlp/reader.cpp highs/ipm/IpxWrapper.cpp highs/lp_data/Highs.cpp highs/lp_data/HighsCallback.cpp @@ -286,10 +286,6 @@ set(highs_sources_python highs/util/stringutil.cpp) set(highs_headers_python - extern/filereaderlp/builder.hpp - extern/filereaderlp/def.hpp - extern/filereaderlp/model.hpp - extern/filereaderlp/reader.hpp extern/pdqsort/pdqsort.h highs/interfaces/highs_c_api.h highs/io/Filereader.h @@ -300,6 +296,10 @@ set(highs_headers_python highs/io/HMpsFF.h highs/io/HMPSIO.h highs/io/LoadOptions.h + highs/io/filereaderlp/builder.hpp + highs/io/filereaderlp/def.hpp + highs/io/filereaderlp/model.hpp + highs/io/filereaderlp/reader.hpp highs/ipm/IpxSolution.h highs/ipm/IpxWrapper.h highs/lp_data/HConst.h diff --git a/cmake/sources.cmake b/cmake/sources.cmake index 0167c8075d..4bedd7531e 100644 --- a/cmake/sources.cmake +++ b/cmake/sources.cmake @@ -1,11 +1,11 @@ set(include_dirs $ - $ $ $ $ $ $ + $ $ $ $ @@ -325,10 +325,9 @@ set(hipo_orderings_headers ../extern/rcm/rcm.h) # redefinition of 'kHighsInf' -set_source_files_properties (../extern/filereaderlp/reader.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) +set_source_files_properties (io/filereaderlp/reader.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) set(highs_sources - ../extern/filereaderlp/reader.cpp interfaces/highs_c_api.cpp io/Filereader.cpp io/FilereaderEms.cpp @@ -338,6 +337,7 @@ set(highs_sources io/HMpsFF.cpp io/HMPSIO.cpp io/LoadOptions.cpp + io/filereaderlp/reader.cpp ipm/IpxWrapper.cpp lp_data/Highs.cpp lp_data/HighsCallback.cpp @@ -440,10 +440,6 @@ set(highs_sources # add catch header? set(highs_headers - ../extern/filereaderlp/builder.hpp - ../extern/filereaderlp/def.hpp - ../extern/filereaderlp/model.hpp - ../extern/filereaderlp/reader.hpp ../extern/pdqsort/pdqsort.h ../extern/zstr/strict_fstream.hpp ../extern/zstr/zstr.hpp @@ -456,6 +452,10 @@ set(highs_headers io/HMpsFF.h io/HMPSIO.h io/LoadOptions.h + io/filereaderlp/builder.hpp + io/filereaderlp/def.hpp + io/filereaderlp/model.hpp + io/filereaderlp/reader.hpp ipm/IpxSolution.h ipm/IpxWrapper.h lp_data/HConst.h diff --git a/highs/io/FilereaderLp.cpp b/highs/io/FilereaderLp.cpp index e3ea283dc2..0989022616 100644 --- a/highs/io/FilereaderLp.cpp +++ b/highs/io/FilereaderLp.cpp @@ -16,7 +16,7 @@ #include #include -#include "../extern/filereaderlp/reader.hpp" +#include "io/filereaderlp/reader.hpp" #include "lp_data/HighsLpUtils.h" FilereaderRetcode FilereaderLp::readModelFromFile(const HighsOptions& options, @@ -290,7 +290,7 @@ FilereaderRetcode FilereaderLp::readModelFromFile(const HighsOptions& options, sum_num_zero > 1 ? "s" : ""); } catch (std::invalid_argument& ex) { - // lpassert in extern/filereaderlp/def.hpp throws + // lpassert in highs/io/filereaderlp/def.hpp throws // std::invalid_argument whatever the error. Hence, unless // something is done specially - here or elsewhere - // FilereaderRetcode::kParserError will be returned. diff --git a/extern/filereaderlp/LICENSE b/highs/io/filereaderlp/LICENSE similarity index 100% rename from extern/filereaderlp/LICENSE rename to highs/io/filereaderlp/LICENSE diff --git a/extern/filereaderlp/builder.hpp b/highs/io/filereaderlp/builder.hpp similarity index 94% rename from extern/filereaderlp/builder.hpp rename to highs/io/filereaderlp/builder.hpp index b0c5c541c8..8196514c0d 100644 --- a/extern/filereaderlp/builder.hpp +++ b/highs/io/filereaderlp/builder.hpp @@ -5,7 +5,7 @@ #include #include -#include "model.hpp" +#include "io/filereaderlp/model.hpp" struct Builder { std::unordered_map> variables; diff --git a/extern/filereaderlp/def.hpp b/highs/io/filereaderlp/def.hpp similarity index 100% rename from extern/filereaderlp/def.hpp rename to highs/io/filereaderlp/def.hpp diff --git a/extern/filereaderlp/model.hpp b/highs/io/filereaderlp/model.hpp similarity index 100% rename from extern/filereaderlp/model.hpp rename to highs/io/filereaderlp/model.hpp diff --git a/extern/filereaderlp/reader.cpp b/highs/io/filereaderlp/reader.cpp similarity index 99% rename from extern/filereaderlp/reader.cpp rename to highs/io/filereaderlp/reader.cpp index 724ac50521..dd85d4179b 100644 --- a/extern/filereaderlp/reader.cpp +++ b/highs/io/filereaderlp/reader.cpp @@ -1,4 +1,4 @@ -#include "reader.hpp" +#include "io/filereaderlp/reader.hpp" #include #include diff --git a/extern/filereaderlp/reader.hpp b/highs/io/filereaderlp/reader.hpp similarity index 78% rename from extern/filereaderlp/reader.hpp rename to highs/io/filereaderlp/reader.hpp index b86a954281..a6f7ed3ec9 100644 --- a/extern/filereaderlp/reader.hpp +++ b/highs/io/filereaderlp/reader.hpp @@ -3,7 +3,7 @@ #include -#include "model.hpp" +#include "io/filereaderlp/model.hpp" Model readinstance(std::string filename); diff --git a/highs/meson.build b/highs/meson.build index b442310708..815467d35d 100644 --- a/highs/meson.build +++ b/highs/meson.build @@ -193,7 +193,7 @@ _ipx_srcs = [ ] _srcs = [ - '../extern/filereaderlp/reader.cpp', + 'io/filereaderlp/reader.cpp', 'interfaces/highs_c_api.cpp', 'io/Filereader.cpp', 'io/FilereaderEms.cpp', diff --git a/meson.build b/meson.build index fb29be1878..d7a1450670 100644 --- a/meson.build +++ b/meson.build @@ -163,7 +163,6 @@ endif _incdirs += include_directories([ 'extern/', 'extern/pdqsort/', - 'extern/filereaderlp/', ]) # Optional arguments