diff --git a/.github/workflows/build-nuget-package.yml b/.github/workflows/build-nuget-package.yml index c364661248..d2292eafe1 100644 --- a/.github/workflows/build-nuget-package.yml +++ b/.github/workflows/build-nuget-package.yml @@ -185,7 +185,7 @@ jobs: - name: Dotnet pack working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native - run: dotnet pack -c Release /p:Version=1.7.0 + run: dotnet pack -c Release /p:Version=1.7.1 - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 09a7b555dd..74cf31979d 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -1,6 +1,7 @@ name: build-wheels on: [push] +# on: [pull_request] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -12,7 +13,7 @@ jobs: runs-on: ${{ matrix.buildplat[0] }} strategy: # Ensure that a wheel builder finishes even if another fails - fail-fast: true + fail-fast: false matrix: # From NumPy # Github Actions doesn't support pairing matrix values together, let's improvise diff --git a/.github/workflows/cmake-linux-cpp.yml b/.github/workflows/cmake-linux-cpp.yml new file mode 100644 index 0000000000..4f3f48e78b --- /dev/null +++ b/.github/workflows/cmake-linux-cpp.yml @@ -0,0 +1,101 @@ +name: cmake-linux-cpp + +on: [push, pull_request] + +jobs: + release: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE + + - name: Build + working-directory: ${{runner.workspace}}/build + run: cmake --build . --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure + + release_all_tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake All + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DALL_TESTS=ON + + - name: Build All + working-directory: ${{runner.workspace}}/build + run: cmake --build . --parallel + + - name: Test All + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure + + debug: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure + + debug_all_tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake All + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DALL_TESTS=ON + + - name: Build All + working-directory: ${{runner.workspace}}/build + run: cmake --build . --parallel + + - name: Test All + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure diff --git a/.github/workflows/cmake-macos-cpp.yml b/.github/workflows/cmake-macos-cpp.yml new file mode 100644 index 0000000000..d44c26a9a4 --- /dev/null +++ b/.github/workflows/cmake-macos-cpp.yml @@ -0,0 +1,101 @@ +name: cmake-macos-cpp + +on: [push, pull_request] + +jobs: + release: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE + + - name: Build + working-directory: ${{runner.workspace}}/build + run: cmake --build . --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure + + release_all_tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake All + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DALL_TESTS=ON + + - name: Build All + working-directory: ${{runner.workspace}}/build + run: cmake --build . --parallel + + - name: Test All + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure + + debug: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure + + debug_all_tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake All + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DALL_TESTS=ON + + - name: Build All + working-directory: ${{runner.workspace}}/build + run: cmake --build . --parallel + + - name: Test All + working-directory: ${{runner.workspace}}/build + run: ctest --parallel --timeout 300 --output-on-failure diff --git a/.github/workflows/cmake-windows-cpp.yml b/.github/workflows/cmake-windows-cpp.yml new file mode 100644 index 0000000000..5fadce34e6 --- /dev/null +++ b/.github/workflows/cmake-windows-cpp.yml @@ -0,0 +1,100 @@ +name: cmake-windows-cpp + +on: [push, pull_request] + +jobs: + release: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config Release --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build + shell: bash + run: ctest --timeout 300 --output-on-failure -C Release + + release_all_tests: + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake All + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DALL_TESTS=ON + + - name: Build All + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --parallel --config Release + + - name: Test All + working-directory: ${{runner.workspace}}/build + shell: bash + run: ctest --parallel --timeout 300 --output-on-failure -C Release + + debug: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config Debug --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build + shell: bash + run: ctest --output-on-failure -C Debug + + debug_all_tests: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DALL_TESTS=ON + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config Debug --parallel + + - name: Test + working-directory: ${{runner.workspace}}/build + shell: bash + run: ctest --output-on-failure -C Debug diff --git a/.github/workflows/test-csharp.yml b/.github/workflows/test-csharp-win.yml similarity index 98% rename from .github/workflows/test-csharp.yml rename to .github/workflows/test-csharp-win.yml index 60853c2ca5..f55059ed60 100644 --- a/.github/workflows/test-csharp.yml +++ b/.github/workflows/test-csharp-win.yml @@ -1,4 +1,4 @@ -name: test-csharp +name: test-csharp-win on: [push, pull_request] diff --git a/.github/workflows/test-fortran.yml b/.github/workflows/test-fortran-ubuntu.yml similarity index 55% rename from .github/workflows/test-fortran.yml rename to .github/workflows/test-fortran-ubuntu.yml index 360818f466..937f51b12c 100644 --- a/.github/workflows/test-fortran.yml +++ b/.github/workflows/test-fortran-ubuntu.yml @@ -4,11 +4,27 @@ on: [push, pull_request] jobs: fast_build_release: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + toolchain: + - {compiler: gcc, version: 13} + # - {compiler: intel, version: '2023.2'} + # - {compiler: nvidia-hpc, version: '23.11'} + include: + - os: ubuntu-latest + toolchain: {compiler: gcc, version: 12} steps: - uses: actions/checkout@v4 + - uses: fortran-lang/setup-fortran@v1 + id: setup-fortran + with: + compiler: ${{ matrix.toolchain.compiler }} + version: ${{ matrix.toolchain.version }} + - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build diff --git a/.github/workflows/test-nuget-macos.yml b/.github/workflows/test-nuget-macos.yml new file mode 100644 index 0000000000..a3db17fd04 --- /dev/null +++ b/.github/workflows/test-nuget-macos.yml @@ -0,0 +1,101 @@ +name: test-nuget-macos + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + # macos 12 is Intel + build_macos_12: + runs-on: macos-12 + # strategy: + # matrix: + # python: [3.11] + steps: + - uses: actions/checkout@v4 + - name: Build HiGHS + run: | + cmake -E make_directory ${{runner.workspace}}/build + cmake -E make_directory ${{runner.workspace}}/nugets + cmake -E make_directory ${{runner.workspace}}/test_nuget + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCSHARP=ON -DBUILD_DOTNET=ON + + - name: Build + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config Release --parallel + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0.x' + + - name: Dotnet pack + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet pack -c Release /p:Version=1.7.1 + + - name: Add local feed + run: dotnet nuget add source ${{runner.workspace}}/nugets + + - name: Dotnet push to local feed + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet nuget push ./bin/Release/*.nupkg -s ${{runner.workspace}}/nugets + + - name: Create new project and test + shell: bash + working-directory: ${{runner.workspace}}/test_nuget + run: | + dotnet new console + rm Program.cs + cp $GITHUB_WORKSPACE/examples/call_highs_from_csharp.cs . + dotnet add package Highs.Native -s ${{runner.workspace}}/nugets + dotnet run + + + + # macos 14 is M1 (beta) + build_macos_14: + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + - name: Build HiGHS + run: | + cmake -E make_directory ${{runner.workspace}}/build + cmake -E make_directory ${{runner.workspace}}/nugets + cmake -E make_directory ${{runner.workspace}}/test_nuget + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCSHARP=ON -DBUILD_DOTNET=ON + + - name: Build + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config Release --parallel + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0.x' + + - name: Dotnet pack + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet pack -c Release /p:Version=1.7.1 + + - name: Add local feed + run: dotnet nuget add source ${{runner.workspace}}/nugets + + - name: Dotnet push to local feed + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet nuget push ./bin/Release/*.nupkg -s ${{runner.workspace}}/nugets + + - name: Create new project and test + shell: bash + working-directory: ${{runner.workspace}}/test_nuget + run: | + dotnet new console + rm Program.cs + cp $GITHUB_WORKSPACE/examples/call_highs_from_csharp.cs . + dotnet add package Highs.Native -s ${{runner.workspace}}/nugets + dotnet run diff --git a/.github/workflows/test-nuget-package.yml b/.github/workflows/test-nuget-package.yml index 45ea7072d6..14af252834 100644 --- a/.github/workflows/test-nuget-package.yml +++ b/.github/workflows/test-nuget-package.yml @@ -35,7 +35,7 @@ jobs: - name: Dotnet pack working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native - run: dotnet pack -c Release /p:Version=1.7.0 + run: dotnet pack -c Release /p:Version=1.7.1 - name: Add local feed run: dotnet nuget add source ${{runner.workspace}}/nugets @@ -81,7 +81,7 @@ jobs: - name: Dotnet pack working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native - run: dotnet pack -c Release /p:Version=1.7.0 + run: dotnet pack -c Release /p:Version=1.7.1 - name: Add local feed run: dotnet nuget add source ${{runner.workspace}}/nugets @@ -124,7 +124,7 @@ jobs: - name: Dotnet pack working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native - run: dotnet pack -c Release /p:Version=1.7.0 + run: dotnet pack -c Release /p:Version=1.7.1 - name: Add local feed run: dotnet nuget add source ${{runner.workspace}}/nugets @@ -167,7 +167,7 @@ jobs: - name: Dotnet pack working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native - run: dotnet pack -c Release /p:Version=1.7.0 + run: dotnet pack -c Release /p:Version=1.7.1 - name: Add local feed run: dotnet nuget add source ${{runner.workspace}}/nugets @@ -212,7 +212,7 @@ jobs: - name: Dotnet pack working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native - run: dotnet pack -c Release /p:Version=1.7.0 + run: dotnet pack -c Release /p:Version=1.7.1 - name: Add local feed run: dotnet nuget add source -n name ${{runner.workspace}}\nugets @@ -228,5 +228,5 @@ jobs: dotnet new console rm Program.cs cp ${{runner.workspace}}\HiGHS\examples\call_highs_from_csharp.cs . - dotnet add package Highs.Native -v 1.7.0 -s ${{runner.workspace}}\nugets + dotnet add package Highs.Native -v 1.7.1 -s ${{runner.workspace}}\nugets dotnet run \ No newline at end of file diff --git a/.github/workflows/test-nuget-ubuntu.yml b/.github/workflows/test-nuget-ubuntu.yml new file mode 100644 index 0000000000..66261fce7d --- /dev/null +++ b/.github/workflows/test-nuget-ubuntu.yml @@ -0,0 +1,96 @@ +name: test-nuget-ubuntu + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build HiGHS + run: | + cmake -E make_directory ${{runner.workspace}}/build + cmake -E make_directory ${{runner.workspace}}/nugets + cmake -E make_directory ${{runner.workspace}}/test_nuget + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCSHARP=ON -DBUILD_DOTNET=ON + + - name: Build + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config Release --parallel + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0.x' + + - name: Dotnet pack + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet pack -c Release /p:Version=1.7.1 + + - name: Add local feed + run: dotnet nuget add source ${{runner.workspace}}/nugets + + - name: Dotnet push to local feed + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet nuget push ./bin/Release/*.nupkg -s ${{runner.workspace}}/nugets + + - name: Create new project and test + shell: bash + working-directory: ${{runner.workspace}}/test_nuget + run: | + dotnet new console + rm Program.cs + cp $GITHUB_WORKSPACE/examples/call_highs_from_csharp.cs . + dotnet add package Highs.Native -s ${{runner.workspace}}/nugets + dotnet run + + build_linux_8: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build HiGHS + run: | + cmake -E make_directory ${{runner.workspace}}/build + cmake -E make_directory ${{runner.workspace}}/nugets + cmake -E make_directory ${{runner.workspace}}/test_nuget + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCSHARP=ON -DBUILD_DOTNET=ON + + - name: Build + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config Release --parallel + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Dotnet pack + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet pack -c Release /p:Version=1.7.1 + + - name: Add local feed + run: dotnet nuget add source ${{runner.workspace}}/nugets + + - name: Dotnet push to local feed + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet nuget push ./bin/Release/*.nupkg -s ${{runner.workspace}}/nugets + + - name: Create new project and test + shell: bash + working-directory: ${{runner.workspace}}/test_nuget + run: | + dotnet new console + rm Program.cs + cp $GITHUB_WORKSPACE/examples/call_highs_from_csharp.cs . + dotnet add package Highs.Native -s ${{runner.workspace}}/nugets + dotnet run + + \ No newline at end of file diff --git a/.github/workflows/test-nuget-win.yml b/.github/workflows/test-nuget-win.yml new file mode 100644 index 0000000000..67aaa4d8fa --- /dev/null +++ b/.github/workflows/test-nuget-win.yml @@ -0,0 +1,53 @@ +name: test-nuget-win + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build_windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Build HiGHS Windows native + run: | + cmake -E make_directory ${{runner.workspace}}/build + cmake -E make_directory ${{runner.workspace}}/nugets + cmake -E make_directory ${{runner.workspace}}/test_nuget + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake $GITHUB_WORKSPACE -DCSHARP=ON -DBUILD_DOTNET=ON + + - name: Build + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config Release --parallel + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0.x' + + - name: Dotnet pack + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + run: dotnet pack -c Release /p:Version=1.7.1 + + - name: Add local feed + run: dotnet nuget add source -n name ${{runner.workspace}}\nugets + + - name: Dotnet push to local feed + working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native + shell: bash + run: dotnet nuget push ./bin/Release/*.nupkg -s name + + - name: Create new project and test + working-directory: ${{runner.workspace}}/test_nuget + run: | + dotnet new console + rm Program.cs + cp ${{runner.workspace}}\HiGHS\examples\call_highs_from_csharp.cs . + dotnet add package Highs.Native -v 1.7.1 -s ${{runner.workspace}}\nugets + dotnet run \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 163d6f91e7..68e24246eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,7 @@ option(BUILD_TESTING "Build Tests" ON) option(FORTRAN "Build Fortran interface" OFF) message(STATUS "Build Fortran: ${FORTRAN}") option(CSHARP "Build CSharp interface" OFF) +message(STATUS "Build CSharp: ${CSHARP}") if (FORTRAN OR CSHARP) set(BUILD_SHARED_LIBS ON) @@ -170,7 +171,7 @@ if (BUILD_CXX) check_type_size("int *" SIZEOF_INT_P LANGUAGE CXX) message(STATUS "Found int * size: ${SIZEOF_INT_P}") cmake_pop_check_state() - + # Use current CMAKE_C_FLAGS and CMAKE_CXX_FLAGS when checking for IPO support, # instead of defaults: https://cmake.org/cmake/help/latest/policy/CMP0138.html if(MSVC AND BUILD_SHARED_LIBS) diff --git a/MODULE.bazel b/MODULE.bazel index 6053f6d499..1dc4cb2e34 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,6 +1,6 @@ module( name = "highs", - version = "1.7.0", + version = "1.7.1", ) bazel_dep( diff --git a/README.md b/README.md index 22dc6318c2..559eae76a7 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,43 @@ # HiGHS - Linear optimization software -[![Build Status](https://github.com/ERGO-Code/HiGHS/workflows/build/badge.svg)](https://github.com/ERGO-Code/HiGHS/actions?query=workflow%3Abuild+branch%3Amaster) + + +[![Build Status][fast_build_svg]][fast_build_link] +[![Build Status][linux_build_svg]][linux_build_link] +[![Build Status][macos_build_svg]][macos_build_link] +[![Build Status][windows_build_svg]][windows_build_link] +\ [![Conan Center](https://img.shields.io/conan/v/highs)](https://conan.io/center/recipes/highs) +\ [![PyPi](https://img.shields.io/pypi/v/highspy.svg)](https://pypi.python.org/pypi/highspy) [![PyPi](https://img.shields.io/pypi/dm/highspy.svg)](https://pypi.python.org/pypi/highspy) - -- [HiGHS - Linear optimization software](#highs---linear-optimization-software) - - [About HiGHS](#about-highs) - - [Documentation](#documentation) - - [Installation](#installation) - - [Build from source using CMake](#build-from-source-using-cmake) - - [Precompiled binaries](#precompiled-binaries) - - [Interfaces](#interfaces) - - [Python](#python) - - [CSharp](#csharp) - - [Reference](#reference) +\ +[![NuGet version](https://img.shields.io/nuget/v/Highs.Native.svg)](https://www.nuget.org/packages/Highs.Native) +[![NuGet download](https://img.shields.io/nuget/dt/Highs.Native.svg)](https://www.nuget.org/packages/Highs.Native) + +[fast_build_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-fast.yml/badge.svg +[fast_build_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-fast.yml +[linux_build_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-linux.yml/badge.svg +[linux_build_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-linux.yml +[macos_build_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-macos.yml/badge.svg +[macos_build_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-macos.yml +[windows_build_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-windows.yml/badge.svg +[windows_build_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/build-windows.yml + +- [About HiGHS](#about-highs) +- [Documentation](#documentation) +- [Installation](#installation) + - [Build from source using CMake](#build-from-source-using-cmake) + - [Build with Meson*](#build-with-meson) + - [Build with Nix*](#build-with-nix) + - [Precompiled binaries](#precompiled-binaries) +- [Running HiGHS](#running-highs) +- [Interfaces](#interfaces) + - [Python](#python) + - [C](#c) + - [CSharp](#csharp) + - [Fortran](#fortran) +- [Reference](#reference) ## About HiGHS @@ -41,7 +64,7 @@ Documentation is available at https://ergo-code.github.io/HiGHS/. HiGHS uses CMake as build system, and requires at least version 3.15. To generate build files in a new subdirectory called 'build', run: -```sh +```shell cmake -S . -B build cmake --build build ``` @@ -49,24 +72,12 @@ This installs the executable `bin/highs` and the library `lib/highs`. To test whether the compilation was successful, change into the build directory and run -```sh +```shell ctest ``` +More details on building with CMake can be found in `HiGHS/cmake/README.md`. -HiGHS can read MPS files and (CPLEX) LP files, and the following command -solves the model in `ml.mps` - -```sh - highs ml.mps -``` -HiGHS is installed using the command - -```sh - cmake --install build -``` - -with the optional setting of `--prefix `, or the cmake option `CMAKE_INSTALL_PREFIX` if it is to be installed anywhere other than the default location. - +#### Build with Meson As an alternative, HiGHS can be installed using the `meson` build interface: ``` sh @@ -75,16 +86,7 @@ meson test -C bbdir ``` _The meson build files are provided by the community and are not officially supported by the HiGHS development team._ -### Precompiled binaries - -Precompiled static executables are available for a variety of platforms at -https://github.com/JuliaBinaryWrappers/HiGHSstatic_jll.jl/releases - -_These binaries are provided by the Julia community and are not officially supported by the HiGHS development team. If you have trouble using these libraries, please open a GitHub issue and tag `@odow` in your question._ - -See https://ergo-code.github.io/HiGHS/stable/installation/#Precompiled-Binaries. - -### Build with Nix +#### Build with Nix There is a nix flake that provides the `highs` binary: @@ -116,12 +118,62 @@ python >>> highspy.Highs() ``` - _The nix build files are provided by the community and are not officially supported by the HiGHS development team._ +### Precompiled binaries + +Precompiled static executables are available for a variety of platforms at +https://github.com/JuliaBinaryWrappers/HiGHSstatic_jll.jl/releases + +_These binaries are provided by the Julia community and are not officially supported by the HiGHS development team. If you have trouble using these libraries, please open a GitHub issue and tag `@odow` in your question._ + +See https://ergo-code.github.io/HiGHS/stable/installation/#Precompiled-Binaries. + +## Running HiGHS + +HiGHS can read MPS files and (CPLEX) LP files, and the following command +solves the model in `ml.mps` + +```shell + highs ml.mps +``` +#### Command line options + +When HiGHS is run from the command line, some fundamental option values may be +specified directly. Many more may be specified via a file. Formally, the usage +is: + +``` +$ bin/highs --help +HiGHS options +Usage: + bin/highs [OPTION...] [file] + + --model_file arg File of model to solve. + --read_solution_file arg File of solution to read. + --options_file arg File containing HiGHS options. + --presolve arg Presolve: "choose" by default - "on"/"off" + are alternatives. + --solver arg Solver: "choose" by default - "simplex"/"ipm" + are alternatives. + --parallel arg Parallel solve: "choose" by default - + "on"/"off" are alternatives. + --run_crossover arg Run crossover: "on" by default - + "choose"/"off" are alternatives. + --time_limit arg Run time limit (seconds - double). + --solution_file arg File for writing out model solution. + --write_model_file arg File for writing out model. + --random_seed arg Seed to initialize random number generation. + --ranging arg Compute cost, bound, RHS and basic solution + ranging. + --version Print version. + -h, --help Print help. +``` +For a full list of options, see the [options page](https://ergo-code.github.io/HiGHS/stable/options/definitions/) of the documentation website. + ## Interfaces -There are HiGHS interfaces for C, C#, FORTRAN, and Python in [HiGHS/src/interfaces](https://github.com/ERGO-Code/HiGHS/blob/master/src/interfaces), with example driver files in [HiGHS/examples](https://github.com/ERGO-Code/HiGHS/blob/master/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/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/. We are happy to give a reasonable level of support via email sent to highsopt@gmail.com. @@ -129,31 +181,34 @@ We are happy to give a reasonable level of support via email sent to highsopt@gm The python package `highspy` is a thin wrapper around HiGHS and is available on [PyPi](https://pypi.org/project/highspy/). It can be easily installed via `pip` by running -```sh +```shell $ pip install highspy ``` Alternatively, `highspy` can be built from source. Download the HiGHS source code and run -```sh +```shell pip install . ``` from the root directory. The HiGHS C++ library no longer needs to be separately installed. The python package `highspy` depends on the `numpy` package and `numpy` will be installed as well, if it is not already present. -The installation can be tested using the small example [call_highs_from_python_highspy.py](https://github.com/ERGO-Code/HiGHS/blob/master/examples/call_highs_from_python_highspy.py). +The installation can be tested using the small example `HiGHS/examples/call_highs_from_python_highspy.py`. 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 our documentation website https://ergo-code.github.io/HiGHS/. + ### CSharp The nuget package Highs.Native is on https://www.nuget.org, at https://www.nuget.org/packages/Highs.Native/. It can be added to your C# project with `dotnet` -```bash -dotnet add package Highs.Native --version 1.7.0 +```shell +dotnet add package Highs.Native --version 1.7.1 ``` The nuget package contains runtime libraries for @@ -167,6 +222,11 @@ The nuget package contains runtime libraries for 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 our documentation website https://ergo-code.github.io/HiGHS/. + + ## Reference If you use HiGHS in an academic context, please acknowledge this and cite the following article. diff --git a/Version.txt b/Version.txt index 36417c94ff..82cb5f3d45 100644 --- a/Version.txt +++ b/Version.txt @@ -1,4 +1,4 @@ HIGHS_MAJOR=1 HIGHS_MINOR=7 -HIGHS_PATCH=0 +HIGHS_PATCH=1 #PRE_RELEASE=YES diff --git a/cmake/README.md b/cmake/README.md new file mode 100644 index 0000000000..4cb04ac682 --- /dev/null +++ b/cmake/README.md @@ -0,0 +1,237 @@ +# HiGHS CMake Build Instructions + +| OS | C++ | Fortran | Python | CSharp Example | .NET | +|:-------- | :---: | :------: | :----: | :----: | :----: | +| Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_fortran_svg]][linux_fortran_link] | [![Status][linux_python_svg]][linux_python_link] | *(1)* | [![Status][linux_dotnet_svg]][linux_dotnet_link] | +| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | *(2)* | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] | +| Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | *(2)* | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_csharp_svg]][windows_csharp_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] | + +[linux_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-linux-cpp.yml/badge.svg +[linux_cpp_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-linux-cpp.yml +[macos_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-macos-cpp.yml/badge.svg +[macos_cpp_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-macos-cpp.yml +[windows_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-windows-cpp.yml/badge.svg +[windows_cpp_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-windows-cpp.yml + +[linux_python_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-python-ubuntu.yml/badge.svg +[linux_python_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-python-ubuntu.yml +[macos_python_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-python-macos.yml/badge.svg +[macos_python_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-python-macos.yml +[windows_python_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-python-win.yml/badge.svg +[windows_python_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-python-win.yml + +[windows_csharp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-csharp-win.yml/badge.svg +[windows_csharp_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-csharp-win.yml + +[linux_dotnet_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-nuget-ubuntu.yml/badge.svg +[linux_dotnet_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-nuget-ubuntu.yml +[macos_dotnet_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-nuget-macos.yml/badge.svg +[macos_dotnet_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-nuget-macos.yml +[windows_dotnet_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-nuget-win.yml/badge.svg +[windows_dotnet_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-nuget-win.yml + +[linux_fortran_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-fortran-ubuntu.yml/badge.svg +[linux_fortran_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-fortran-ubuntu.yml +[macos_fortran_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-fortran-macos.yml/badge.svg +[macos_fortran_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-fortran-macos.yml +[windows_fortran_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-fortran-win.yml/badge.svg +[windows_fortran_link]: https://github.com/ERGO-Code/HiGHS/actions/workflows/test-fortran-win.yml + +*(1)* CMake C# is currently only supported for Microsoft Visual Studio 11 2012 and + later. You can still build and run the HiGHS C# nuget package on Linux and MacOS with `dotnet`, see the workflows in the .NET column. It is only the CSharp example build with CMake that is not supported for Unix generators. + +*(2)* Not tested yet. + + +
+ +*Contents* + +- [HiGHS CMake Build Instructions](#highs-cmake-build-instructions) + - [Introduction](#introduction) + - [Requirement](#requirement) + - [Supported compilers](#supported-compilers) +- [Build](#build) + - [Install](#install) + - [Windows](#windows) +- [CMake Options](#cmake-options) +- [Integrating HiGHS in your CMake Project](#integrating-highs-in-your-cmake-project) + +## Introduction + +HiGHS can be built from source using CMake: . CMake works by generating native Makefiles or build projects that can be used in the compiler environment of your choice. + +HiGHS can be built as a standalone project or it could be incorporated into an existing CMake project. + +## Requirement +You'll need: + +* `CMake >= 3.15`. +* A C++11 compiler + +## Supported compilers + +Here is a list of the supported compilers: + +* Clang `clang` +* GNU `g++` +* Intel `icc` +* Microsoft `MSVC` + +# Build + +To build the C++ library and executable run + +``` bash +cd HiGHS +cmake -S. -B build +cmake --build build --parallel +``` + +This generates HiGHS in the `build` directory and creates the [executable](@ref Executable) `build/bin/highs`, or `build/bin/Release/highs.exe` on Windows. To perform a quick test to see whether the compilation was successful, run `ctest` from within the build folder. + +``` bash +ctest +``` + +On Windows, the configuration type must be specified: +``` bash +ctest -C Release +``` + +## Install + +The default installation location may need administrative +permissions. To install, after building and testing, run + +``` bash +cmake --install build +``` + +form the root directory. + +To install in a specified installation directory run CMake with the +`CMAKE_INSTALL_PREFIX` flag set: + +``` bash +cmake -S. -B build -DCMAKE_INSTALL_PREFIX=/path/to/highs_install +cmake --build build --parallel +cmake --install build +``` + +## Windows + +By default, CMake builds the debug version of the binaries. These are generated in a directory `Debug`. To build a release version, add the option `--config Release` + +```shell + cmake -S . -B build + cmake --build build --config Release +``` + +It is also possible to specify a specific Visual studio version to build with: +```shell + cmake -G "Visual Studio 17 2022" -S . -B build + cmake --build build +``` + +When building under Windows, some extra options are available. One is building a 32 bit version or a 64 bit version. The default build is 64 bit. To build 32 bit, the following commands can be used from the `HiGHS/` directory: + +```shell + cmake -A Win32 -S . -B buildWin32 + cmake --build buildWin32 +``` + +Another thing specific for windows is the calling convention, particularly important for the HiGHS dynamic library (dll). The default calling convention in windows is cdecl calling convention, however, dlls are most often compiled with stdcall. Most applications which expect stdcall, can't access dlls with cdecl and vice versa. To change the default calling convention from cdecl to stdcall the following option can be added +```shell + cmake -DSTDCALL=ON -S . -B build + cmake --build build +``` + + + + +# CMake Options + +There are several options that can be passed to CMake to modify how the code +is built.
+To set these options and parameters, use `-D=`. + +All CMake options are passed at configure time, i.e., by running
+`cmake -S. -B -DOPTION_ONE=ON -DOPTION_TWO=OFF ...`
+before running `cmake --build `
+ +For example, to generate build files in a new +subdirectory called 'build', run: + +```shell +cmake -S. -Bbuild +``` +and then build with: + +```shell +cmake --build build +``` + +Following is a list of available options: +| CMake Option | Default Value | Note | +|:-------------|:--------------|:-----| +| `CMAKE_BUILD_TYPE` | Release | see CMake documentation [here](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html) | +| `BUILD_SHARED_LIBS` | ON(*) | Build shared libraries (.so or .dyld). * OFF by default on Windows | +| `BUILD_CXX` | ON | Build C++ | +| `FORTRAN` | OFF | Build Fortran interface | +| `CSHARP` | OFF | Build CSharp wrapper | +| `BUILD_DOTNET` | OFF | Build .Net package | +| `PYTHON_BUILD_SETUP` | OFF | Build Python bindings. Called at `pip install` from pyproject.toml | +| `ZLIB` | ON | Use ZLIB if available | +| `ALL_TESTS` | OFF | Run unit tests and extended instance test set | + + + +HiGHS can be integrated into other CMake-based projects. + +# Integrating HiGHS in your CMake Project + +If you already have HiGHS installed on your system, you can use `find_package()` to include HiGHS in your C++ CMake project. + +``` +project(LOAD_HIGHS LANGUAGES CXX) + +set(HIGHS_DIR path_to_highs_install/lib/cmake/highs) + +find_package(HIGHS REQUIRED) + +add_executable(main main.cpp) +target_link_libraries(main highs::highs) +``` + +The line +``` +set(HIGHS_DIR path_to_highs_install/lib/cmake/highs) +``` +adds the HiGHS installation path to `HIGHS_DIR`. This is equivalent to building this project with +``` bash +cmake -DHIGHS_DIR=path_to_highs_install/lib/cmake/highs .. +``` + +Alternatively, if you wish to include the code of HiGHS within your project, FetchContent is also available as follows: + +``` +project(LOAD_HIGHS LANGUAGES CXX) + +include(FetchContent) + +FetchContent_Declare( + highs + GIT_REPOSITORY "https://github.com/ERGO-Code/HiGHS.git" + GIT_TAG "latest" +) + +FetchContent_MakeAvailable(highs) + +add_executable(main call_from_cpp.cc) +target_link_libraries(main highs::highs) +``` diff --git a/docs/README.md b/docs/README.md index 61426e0037..86464838fd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,7 +11,7 @@ To edit the documentation, checkout a branch and edit the Markdown files in the To build locally, [install Julia](https://julialang.org/downloads/), then (from the `docs` directory) run: -``` +``` bash $ julia make.jl ``` diff --git a/docs/make.jl b/docs/make.jl index 378d543907..132d36c4de 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -68,17 +68,18 @@ Documenter.makedocs( ], "Callbacks" => "callbacks.md", "Interfaces" => Any[ - "Python" => Any[ - "interfaces/python/index.md", - "interfaces/python/example-py.md", - ], "C++" => Any[ "interfaces/cpp/index.md", "The HiGHS library" => "interfaces/cpp/library.md", - "Linking" => "interfaces/cpp/link.md", "Examples" => "interfaces/cpp/examples.md", ], - "C" => "interfaces/c/index.md", + "C" => "interfaces/c_api.md", + "Fortran" => "interfaces/fortran.md", + "Python" => Any[ + "interfaces/python/index.md", + "interfaces/python/example-py.md", + ], + "CSharp" => "interfaces/csharp.md", "Julia" => "interfaces/julia/index.md", "Other" => "interfaces/other.md", ], diff --git a/docs/src/executable.md b/docs/src/executable.md index d18d46ab63..d9f1777555 100644 --- a/docs/src/executable.md +++ b/docs/src/executable.md @@ -6,7 +6,7 @@ For convenience, the executable is assumed to be `bin/highs`. The model given by the MPS file `model.mps` is solved by the command: -```bash +```shell $ bin/highs model.mps ``` @@ -19,7 +19,7 @@ When HiGHS is run from the command line, some fundamental option values may be specified directly. Many more may be specified via a file. Formally, the usage is: -```bash +```shell $ bin/highs --help HiGHS options Usage: diff --git a/docs/src/guide/index.md b/docs/src/guide/index.md index 3d93481564..bba05a2a6a 100644 --- a/docs/src/guide/index.md +++ b/docs/src/guide/index.md @@ -2,7 +2,7 @@ This guide describes the features of HiGHS that are available when it is called from [`Python`](@ref python-getting-started), [`C++`](@ref -cpp-getting-started), [`C`](@ref c-api) and [`Fortran`](@ref +cpp-getting-started), [`C`](@ref c-api), [`C#`](@ref csharp) and [`Fortran`](@ref fortran-api). It is written in three sections: [basic](@ref guide-basic), [further](@ref guide-further) and [advanced](@ref guide-advanced). diff --git a/docs/src/installation.md b/docs/src/installation.md index dd4c9b0d4d..e9a3e764d7 100644 --- a/docs/src/installation.md +++ b/docs/src/installation.md @@ -1,10 +1,14 @@ # Install HiGHS +## Compile from source + +HiGHS uses CMake as build system, and requires at least version +3.15. Details about building from source using cmake can be found in `HiGHS/cmake/README.md`. + ## Install via a package manager HiGHS can be installed using a package manager in the cases of -[`Julia`](@ref HiGHS.jl), [`Python`](@ref python-getting-started), and -[`Rust`](@ref Rust). +[`Julia`](@ref HiGHS.jl), [`Python`](@ref python-getting-started), [`CSharp`](@ref nuget) and [`Rust`](@ref Rust). ## Precompiled Binaries @@ -35,83 +39,3 @@ filename. * For Windows users: choose the file ending in `x86_64-w64-mingw32-cxx11.tar.gz` * For M1 macOS users: choose the file ending in `aarch64-apple-darwin.tar.gz` * For Intel macOS users: choose the file ending in `x86_64-apple-darwin.tar.gz` - -## Compile from source - -HiGHS uses CMake as build system, and requires at least version -3.15. After extracting HiGHS from -[GitHub](https://github.com/ERGO-Code/HiGHS), setup a build folder and -call CMake as follows: - -```bash -$ mkdir build -$ cd build -$ cmake .. -``` - -Then compile the code using: - -```bashs -$ cmake --build . -``` - -To test whether the compilation was successful, run - -```bash -$ ctest -``` - -HiGHS is installed using the command - -```bash -$ cmake --install . -``` - -This installs the library in `lib/`, as well as all header files in `include/highs/`. For a custom -installation in `install_folder` run - -```bash -$ cmake -DCMAKE_INSTALL_PREFIX=install_folder . -``` - -and then - -```bash -$ cmake --install . -``` - -To use the library from a CMake project use - -`find_package(HiGHS)` - -and add the correct path to HIGHS_DIR. - -## Windows - -By default, CMake builds the debug version of the binaries. These are generated in a directory `Debug`. To build a release version, add the option `--config Release` - -```bash - cmake -S . -B build - cmake --build build --config Release -``` - -It is also possible to specify a specific Visual studio version to build with: -```bash - cmake -G "Visual Studio 17 2022" -S . -B build - cmake --build build -``` - -When building under Windows, some extra options are available. One is building a 32 bit version or a 64 bit version. The default build is 64 bit. To build 32 bit, the following commands can be used from the `HiGHS/` directory: - -```bash - cmake -A Win32 -S . -DFAST_BUILD=OFF -B buildWin32 - cmake --build buildWin32 -``` - -Another thing specific for windows is the calling convention, particularly important for the HiGHS dynamic library (dll). The default calling convention in windows is cdecl calling convention, however, dlls are most often compiled with stdcall. Most applications which expect stdcall, can't access dlls with cdecl and vice versa. To change the default calling convention from cdecl to stdcall the following option can be added -```bash - cmake -DSTDCALL=ON -S . -DFAST_BUILD=OFF -B build - cmake --build build -``` -An extra note. With the legacy `-DFAST_BUILD=OFF`, under windows the build dll is called `highs.dll` however the exe expects `libhighs.dll` so a manual copy of `highs.dll` to `libhighs.dll` is needed. Of course all above options can be combined with each other. - diff --git a/docs/src/interfaces/c/index.md b/docs/src/interfaces/c_api.md similarity index 100% rename from docs/src/interfaces/c/index.md rename to docs/src/interfaces/c_api.md diff --git a/docs/src/interfaces/cpp/index.md b/docs/src/interfaces/cpp/index.md index f6151d2c56..23c43dd6d3 100644 --- a/docs/src/interfaces/cpp/index.md +++ b/docs/src/interfaces/cpp/index.md @@ -8,6 +8,7 @@ git clone https://github.com/ERGO-Code/HiGHS.git ### Building HiGHS from source code + HiGHS uses CMake (minimum version 3.15) as a build system, and can use the following compilers - Clang ` clang ` @@ -15,43 +16,14 @@ HiGHS uses CMake (minimum version 3.15) as a build system, and can use the follo - Intel ` icc ` - Microsoft ` MSVC ` -The simplest setup is to create a build folder (within the folder into -which HiGHS has been downloaded) and then build HiGHS within it. The -name of the build folder is arbitrary but, assuming it is HiGHS/build, -the full sequence of commands required is as follows - -``` bash -cd HiGHS -mkdir build -cd build -cmake -DFAST_BUILD=ON .. -cmake --build . -``` - -This creates the [executable](@ref Executable) `build/bin/highs`. - -### Test build - -To perform a quick test to see whether the compilation was successful, run `ctest` from within the build folder. - -``` bash -ctest -``` - -### Install +Instructions for building HiGHS from source code are in `HiGHS/cmake/README.md`. -The default installation location may need administrative -permissions. To install, after building and testing, run +The simplest setup is to build HiGHS in a build directory within the root direcory. The +name of the build folder is arbitrary but, assuming it is `build`, +the sequence of commands is as follows ``` bash -cmake --install . -``` - -To install in a specified installation directory run CMake with the -`CMAKE_INSTALL_PREFIX` flag set: - -``` bash -cmake -DFAST_BUILD=ON -DCMAKE_INSTALL_PREFIX=/path/to/highs_install .. -cmake --build . -cmake --install . -``` +cd HiGHS +cmake -S. -B build +cmake --build build --parallel +``` \ No newline at end of file diff --git a/docs/src/interfaces/cpp/library.md b/docs/src/interfaces/cpp/library.md index 53869789a3..27f8615300 100644 --- a/docs/src/interfaces/cpp/library.md +++ b/docs/src/interfaces/cpp/library.md @@ -5,22 +5,22 @@ The HiGHS library is defined in the [`src/Highs.h`](https://github.com/ERGO-Code Models in HiGHS are defined as an instance of the `HighsModel` class. This consists of one instance of the `HighsLp` class, and one instance of the `HighsHessian` class. Communication of models to and from HiGHS is possible via instances of the `HighsLp` or `HighsModel` class. In the C and other interfaces, communication of models is via scalar values and addresses of arrays. In C++, the neatest way of passing a model to HiGHS is to create an instance of the `HighsModel` class, populate its data, and call -``` +``` cpp Highs::passModel(const HighsModel& model) ``` or create and populate an instance of the `HighsLp` class, and call -``` +``` cpp Highs::passModel(const HighsLp& lp) ``` For reading models from a file, use -``` +``` cpp Highs::readModel(const std::string& filename) ``` Below is an example of building a `HighsModel` -``` +``` cpp // Create and populate a HighsModel instance for the LP // Min f = x_0 + x_1 + 3 @@ -56,7 +56,7 @@ Below is an example of building a `HighsModel` ## Solve model -``` +``` cpp // Create a Highs instance Highs highs; HighsStatus return_status; @@ -79,7 +79,7 @@ Below is an example of building a `HighsModel` Solution information: -``` +``` cpp const HighsInfo& info = highs.getInfo(); cout << "Simplex iteration count: " << info.simplex_iteration_count << endl; cout << "Objective function value: " << info.objective_function_value << endl; @@ -91,7 +91,7 @@ Solution information: ## Integrality variables To indicate that variables must take integer values use the `HighsLp::integrality` vector. -``` +``` cpp model.lp_.integrality_.resize(lp.num_col_); for (int col=0; col < lp.num_col_; col++) model.lp_.integrality_[col] = HighsVarType::kInteger; diff --git a/docs/src/interfaces/cpp/link.md b/docs/src/interfaces/cpp/link.md deleted file mode 100755 index d2414789a9..0000000000 --- a/docs/src/interfaces/cpp/link.md +++ /dev/null @@ -1,59 +0,0 @@ -## Using HiGHS from another CMake Project - -There are several ways the HiGHS library can be used within another C++ project. - -Firstly, make sure that HiGHS is installed locally with the correct CMake flags: - -``` bash -cd HiGHS -mkdir build -cd build -cmake -DFAST_BUILD=ON -DCMAKE_INSTALL_PREFIX=/path_to_highs_install/ .. -cmake --build . -cmake --install . -``` - -This installs HiGHS in `/path_to_highs_install/`. - -Suppose another C++ CMake project has executable code in some file `main.cpp`, which includes `Highs.h`. To use the HiGHS library, edit the `CMakeLists.txt` as follows: - -``` -project(LOAD_HIGHS LANGUAGES CXX) - -set(HIGHS_DIR path_to_highs_install/lib/cmake/highs) - -find_package(HIGHS REQUIRED) -find_package(Threads REQUIRED) - -add_executable(main main.cpp) -target_link_libraries(main highs::highs) -``` - -The line -``` -set(HIGHS_DIR path_to_highs_install/lib/cmake/highs) -``` -adds the HiGHS installation path to `HIGHS_DIR`. This is equivalent to building this project with -``` -cmake -DHIGHS_DIR=path_to_highs_install/lib/cmake/highs .. -``` - -Alternatively, if you wish to include the code of HiGHS within your project, FetchContent is also available as follows: - -``` -project(LOAD_HIGHS LANGUAGES CXX) - -include(FetchContent) - -FetchContent_Declare( - highs - GIT_REPOSITORY "https://github.com/ERGO-Code/HiGHS.git" - GIT_TAG "bazel" -) -set(FAST_BUILD ON CACHE INTERNAL "Fast Build") - -FetchContent_MakeAvailable(highs) - -add_executable(main call_from_cpp.cc) -target_link_libraries(main highs::highs) -``` diff --git a/docs/src/interfaces/csharp.md b/docs/src/interfaces/csharp.md new file mode 100644 index 0000000000..431e256350 --- /dev/null +++ b/docs/src/interfaces/csharp.md @@ -0,0 +1,55 @@ +#### [CSharp](@id csharp) + +#### Build from source + +There is a C# example code in `examples/call_highs_from_csharp.cs`. From the HiGHS root directory, run + +``` bash +cmake -S. -Bbuild -DCSHARP=ON +``` + +If a CSharp compiler is available, this builds the example using cmake and generates a binary in the build directory (`build/bin/csharpexample`). + +#### [NuGet](@id nuget) + +The nuget package Highs.Native is on https://www.nuget.org, at https://www.nuget.org/packages/Highs.Native/. + +It can be added to your C# project with `dotnet` + +```shell +dotnet add package Highs.Native --version 1.7.1 +``` + +The nuget package contains runtime libraries for + +* `win-x64` +* `win-x32` +* `linux-x64` +* `linux-arm64` +* `macos-x64` +* `macos-arm64` + +Details for building locally can be found in `nuget/README.md`. + +#### C# API + +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. + * 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 + should work in most cases. You can use msbuild for that. On linux, installing + HiGHS system wide should work. + * Make sure that all dependencies of the HiGHS library can be found, too. For + example, if HiGHS was build using `Visual C++` make sure that the + `MSVCRuntime` is installed on the machine you want to run your application + on. + * Depending on the name of your HiGHS library, it might be necessary to change + the constant "highslibname". See [document](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/cross-platform) + on writing cross platform P/Invoke code if necessary. + * Call the Methods in `highs_csharp_api.cs` and have fun with HiGHS. + +This is the normal way to call plain old C from C# with the great simplification +that you don't have to write the PInvoke declarations yourself. + diff --git a/docs/src/interfaces/fortran.md b/docs/src/interfaces/fortran.md new file mode 100644 index 0000000000..8d5786b46a --- /dev/null +++ b/docs/src/interfaces/fortran.md @@ -0,0 +1,11 @@ + +#### [Fortran](@id fortran-api) + +The interface is in +`HiGHS/src/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: +``` bash +cmake -DFORTRAN=ON .. +``` \ No newline at end of file diff --git a/docs/src/interfaces/other.md b/docs/src/interfaces/other.md index fd4bfdbf59..89bc34afe2 100644 --- a/docs/src/interfaces/other.md +++ b/docs/src/interfaces/other.md @@ -8,39 +8,6 @@ HiGHS can be used via AMPL, see the [AMPL Documentation](https://dev.ampl.com/solvers/highs/index.html). -## C# - -Here are observations on calling HiGHS from C#: - - * The file [`highs_csharp_api.cs`](https://github.com/ERGO-Code/HiGHS/blob/master/src/interfaces/highs_csharp_api.cs) - contains all the PInvoke you need. Copy it into your C# project. - * 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 - should work in most cases. You can use msbuild for that. On linux, installing - HiGHS system wide should work. - * Make sure that all dependencies of the HiGHS library can be found, too. For - example, if HiGHS was build using `Visual C++` make sure that the - `MSVCRuntime` is installed on the machine you want to run your application - on. - * Depending on the name of your HiGHS library, it might be necessary to change - the constant "highslibname". See [document](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/cross-platform) - on writing cross platform P/Invoke code if necessary. - * Call the Methods in `highs_csharp_api.cs` and have fun with HiGHS. - -This is the normal way to call plain old C from C# with the great simplification -that you don't have to write the PInvoke declarations yourself. - -## [Fortran](@id fortran-api) - -The interface is in -[`highs_fortran_api.f90`](https://github.com/ERGO-Code/HiGHS/blob/master/src/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: -``` -cmake -DFORTRAN=ON .. -``` ## GAMS diff --git a/docs/src/interfaces/python/index.md b/docs/src/interfaces/python/index.md index 82851f2e4b..991b2cae32 100644 --- a/docs/src/interfaces/python/index.md +++ b/docs/src/interfaces/python/index.md @@ -6,7 +6,7 @@ HiGHS is available as `highspy` on [PyPi](https://pypi.org/project/highspy/). If `highspy` is not already installed, run: -```bash +```shell $ pip install highspy ``` diff --git a/docs/src/options/intro.md b/docs/src/options/intro.md index 7396072a87..ff33cae234 100644 --- a/docs/src/options/intro.md +++ b/docs/src/options/intro.md @@ -15,15 +15,15 @@ options file. A sample options file, giving documentation of all the options is written to the console by the command: -```bash +```shell $ bin/highs --options_file="" ``` ## Option methods -To set the value of option `name`, call: +The following code illustrates how to access the HiGHS options in Python. To set the value of option `name`, call: -``` +``` python status = h.setOptionValue(name, value) ``` @@ -32,13 +32,13 @@ explicit value. To get the value of option `name`, call: -``` +``` python [status, value] = h.getOptionValue(name) ``` To get the type of option `name`, call: -``` +``` python [status, type] = h.getOptionType(name) ``` diff --git a/meson.build b/meson.build index 01193cc941..b9e89e85b4 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('highs', 'cpp', 'c', - version : '1.7.0', + version : '1.7.1', meson_version: '>= 1.1.0', default_options : ['warning_level=1', 'cpp_std=c++17', diff --git a/nuget/HowToAlternative.md b/nuget/HowToAlternative.md index 7912918bed..afa5272948 100644 --- a/nuget/HowToAlternative.md +++ b/nuget/HowToAlternative.md @@ -27,7 +27,7 @@ In order to check if the runtimes are contained in the nuget package, one can op ## nuget structure for native libraries The nuget package is required to look like this for the native libraries -``` +``` bash package/ |-- lib/ | |-- netstandard2.0/ @@ -35,13 +35,13 @@ package/ |-- runtimes/ | |-- linux-x64/ | | |-- native/ -| | |-- [linux-x64 native libraries] +| | ! [linux-x64 native libraries] | |-- linux-arm64/ | | |-- native/ -| | |-- [linux-arm64 native libraries] +| | ! [linux-arm64 native libraries] | |-- win-x64/ | | |-- native/ -| | |-- [win-x64 native libraries] +| | ! [win-x64 native libraries] ``` ## Examples for the builds diff --git a/nuget/README.md b/nuget/README.md index 9f7cd71d99..a9383b2c16 100644 --- a/nuget/README.md +++ b/nuget/README.md @@ -6,8 +6,8 @@ The nuget package Highs.Native is on https://www.nuget.org, at https://www.nuget It can be added to your C# project with `dotnet` -```bash -dotnet add package Highs.Native --version 1.7.0 +```shell +dotnet add package Highs.Native --version 1.7.1 ``` The nuget package contains runtime libraries for @@ -29,7 +29,7 @@ cmake -S. -Bbuild -DCSHARP=ON -DBUILD_DOTNET=ON Then, from `build/dotnet/Highs.Native`, run -```bash +```shell dotnet pack -c Release /p:Version=$version ``` diff --git a/pyproject.toml b/pyproject.toml index 9d7bbc63c4..371c8e5e9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "scikit_build_core.build" [project] name = "highspy" -version = "1.7.1.dev2" +version = "1.7.1" description = "A thin set of pybind11 wrappers to HiGHS" authors = [{ name = "HiGHS developers", email = "highsopt@gmail.com" }] readme = "README.md" diff --git a/src/interfaces/highs_python_api.py b/src/interfaces/highs_python_api.py deleted file mode 100644 index c174bdc794..0000000000 --- a/src/interfaces/highs_python_api.py +++ /dev/null @@ -1,197 +0,0 @@ -import ctypes -import os -from ctypes.util import find_library - -highslib = ctypes.cdll.LoadLibrary(ctypes.util.find_library("highs")) - -# highs lib folder must be in "LD_LIBRARY_PATH" environment variable -# ============ -# Highs_lpCall -highslib.Highs_lpCall.argtypes = (ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int, - ctypes.c_int, ctypes.c_double, -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int)) -highslib.Highs_lpCall.restype = ctypes.c_int - -def Highs_lpCall(col_cost, col_lower, col_upper, row_lower, row_upper, a_start, a_index, a_value): - global highslib - n_col = len(col_cost) - n_row = len(row_lower) - n_nz = len(a_index) - a_format = 1 - sense = 1 - offset = 0 - - # In case a_start has the fictitious start of column n_col - a_start_length = len(a_start) - - dbl_array_type_col = ctypes.c_double * n_col - dbl_array_type_row = ctypes.c_double * n_row - int_array_type_a_start = ctypes.c_int * a_start_length - int_array_type_a_index = ctypes.c_int * n_nz - dbl_array_type_a_value = ctypes.c_double * n_nz - - int_array_type_col = ctypes.c_int * n_col - int_array_type_row = ctypes.c_int * n_row - - col_value = [0] * n_col - col_dual = [0] * n_col - - row_value = [0] * n_row - row_dual = [0] * n_row - - col_basis = [0] * n_col - row_basis = [0] * n_row - - model_status = ctypes.c_int(0) - - col_value = dbl_array_type_col(*col_value) - col_dual = dbl_array_type_col(*col_dual) - row_value = dbl_array_type_row(*row_value) - row_dual = dbl_array_type_row(*row_dual) - col_basis = int_array_type_col(*col_basis) - row_basis = int_array_type_row(*row_basis) - - return_status = highslib.Highs_lpCall( - ctypes.c_int(n_col), ctypes.c_int(n_row), ctypes.c_int(n_nz), ctypes.c_int(a_format), - ctypes.c_int(sense), ctypes.c_double(offset), - dbl_array_type_col(*col_cost), dbl_array_type_col(*col_lower), dbl_array_type_col(*col_upper), - dbl_array_type_row(*row_lower), dbl_array_type_row(*row_upper), - int_array_type_a_start(*a_start), int_array_type_a_index(*a_index), dbl_array_type_a_value(*a_value), - col_value, col_dual, - row_value, row_dual, - col_basis, row_basis, ctypes.byref(model_status)) - return return_status, model_status.value, list(col_value), list(col_dual), list(row_value), list(row_dual), list(col_basis), list(row_basis) - -# ============= -# Highs_mipCall -highslib.Highs_mipCall.argtypes = (ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int, - ctypes.c_int, ctypes.c_double, -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_int), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int)) -highslib.Highs_mipCall.restype = ctypes.c_int - -def Highs_mipCall(col_cost, col_lower, col_upper, row_lower, row_upper, a_start, a_index, a_value, integrality): - global highslib - n_col = len(col_cost) - n_row = len(row_lower) - n_nz = len(a_index) - a_format = 1 - sense = 1 - offset = 0 - - # In case a_start has the fictitious start of column n_col - a_start_length = len(a_start) - - dbl_array_type_col = ctypes.c_double * n_col - dbl_array_type_row = ctypes.c_double * n_row - int_array_type_a_start = ctypes.c_int * a_start_length - int_array_type_a_index = ctypes.c_int * n_nz - dbl_array_type_a_value = ctypes.c_double * n_nz - - int_array_type_col = ctypes.c_int * n_col - int_array_type_row = ctypes.c_int * n_row - - col_value = [0] * n_col - col_dual = [0] * n_col - - row_value = [0] * n_row - row_dual = [0] * n_row - - col_basis = [0] * n_col - row_basis = [0] * n_row - - model_status = ctypes.c_int(0) - - col_value = dbl_array_type_col(*col_value) - row_value = dbl_array_type_row(*row_value) - - return_status = highslib.Highs_mipCall( - ctypes.c_int(n_col), ctypes.c_int(n_row), ctypes.c_int(n_nz), ctypes.c_int(a_format), - ctypes.c_int(sense), ctypes.c_double(offset), - dbl_array_type_col(*col_cost), dbl_array_type_col(*col_lower), dbl_array_type_col(*col_upper), - dbl_array_type_row(*row_lower), dbl_array_type_row(*row_upper), - int_array_type_a_start(*a_start), int_array_type_a_index(*a_index), dbl_array_type_a_value(*a_value), - int_array_type_col(*integrality), - col_value, row_value, ctypes.byref(model_status)) - return return_status, model_status.value, list(col_value), list(row_value) - -# ============ -# Highs_qpCall -highslib.Highs_qpCall.argtypes = (ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_int, - ctypes.c_int, ctypes.c_int, ctypes.c_int, ctypes.c_double, -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), -ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int)) -highslib.Highs_call.restype = ctypes.c_int - -def Highs_qpCall(col_cost, col_lower, col_upper, row_lower, row_upper, a_start, a_index, a_value, q_start, q_index, q_value): - global highslib - n_col = len(col_cost) - n_row = len(row_lower) - n_nz = len(a_index) - q_n_nz = len(q_index) - a_format = 1 - q_format = 1 - sense = 1 - offset = 0 - - # In case a_start or q_start has the fictitious start of column n_col - a_start_length = len(a_start) - q_start_length = len(q_start) - - dbl_array_type_col = ctypes.c_double * n_col - dbl_array_type_row = ctypes.c_double * n_row - int_array_type_a_start = ctypes.c_int * a_start_length - int_array_type_a_index = ctypes.c_int * n_nz - dbl_array_type_a_value = ctypes.c_double * n_nz - - int_array_type_q_start = ctypes.c_int * q_start_length - int_array_type_q_index = ctypes.c_int * q_n_nz - dbl_array_type_q_value = ctypes.c_double * q_n_nz - - int_array_type_col = ctypes.c_int * n_col - int_array_type_row = ctypes.c_int * n_row - - col_value = [0] * n_col - col_dual = [0] * n_col - - row_value = [0] * n_row - row_dual = [0] * n_row - - col_basis = [0] * n_col - row_basis = [0] * n_row - - model_status = ctypes.c_int(0) - - col_value = dbl_array_type_col(*col_value) - col_dual = dbl_array_type_col(*col_dual) - row_value = dbl_array_type_row(*row_value) - row_dual = dbl_array_type_row(*row_dual) - col_basis = int_array_type_col(*col_basis) - row_basis = int_array_type_row(*row_basis) - - return_status = highslib.Highs_qpCall( - ctypes.c_int(n_col), ctypes.c_int(n_row), ctypes.c_int(n_nz), ctypes.c_int(q_n_nz), - ctypes.c_int(a_format), ctypes.c_int(q_format), - ctypes.c_int(sense), ctypes.c_double(offset), - dbl_array_type_col(*col_cost), dbl_array_type_col(*col_lower), dbl_array_type_col(*col_upper), - dbl_array_type_row(*row_lower), dbl_array_type_row(*row_upper), - int_array_type_a_start(*a_start), int_array_type_a_index(*a_index), dbl_array_type_a_value(*a_value), - int_array_type_q_start(*q_start), int_array_type_q_index(*q_index), dbl_array_type_q_value(*q_value), - col_value, col_dual, - row_value, row_dual, - col_basis, row_basis, ctypes.byref(model_status)) - return return_status, model_status.value, list(col_value), list(col_dual), list(row_value), list(row_dual), list(col_basis), list(row_basis) - diff --git a/tests/test_highspy.py b/tests/test_highspy.py index a7d9ae5aa9..6d3e790d92 100644 --- a/tests/test_highspy.py +++ b/tests/test_highspy.py @@ -105,10 +105,10 @@ def get_infeasible_model(self): def test_version(self): h = self.get_basic_model() - self.assertEqual(h.version(), "1.7.0") + self.assertEqual(h.version(), "1.7.1") self.assertEqual(h.versionMajor(), 1) self.assertEqual(h.versionMinor(), 7) - self.assertEqual(h.versionPatch(), 0) + self.assertEqual(h.versionPatch(), 1) def test_basics(self): h = self.get_basic_model()