Skip to main content

A thin set of pybind11 wrappers to HiGHS

Project description

HiGHS - Linear optimization software

Build Status Conan Center PyPi PyPi

About HiGHS

HiGHS is a high performance serial and parallel solver for large scale sparse linear optimization problems of the form

$$ \min \quad \dfrac{1}{2}x^TQx + c^Tx \qquad \textrm{s.t.}~ \quad L \leq Ax \leq U; \quad l \leq x \leq u $$

where Q must be positive semi-definite and, if Q is zero, there may be a requirement that some of the variables take integer values. Thus HiGHS can solve linear programming (LP) problems, convex quadratic programming (QP) problems, and mixed integer programming (MIP) problems. It is mainly written in C++, but also has some C. It has been developed and tested on various Linux, MacOS and Windows installations. No third-party dependencies are required.

HiGHS has primal and dual revised simplex solvers, originally written by Qi Huangfu and further developed by Julian Hall. It also has an interior point solver for LP written by Lukas Schork, an active set solver for QP written by Michael Feldmeier, and a MIP solver written by Leona Gottwald. Other features have been added by Julian Hall and Ivet Galabova, who manages the software engineering of HiGHS and interfaces to C, C#, FORTRAN, Julia and Python.

Find out more about HiGHS at https://www.highs.dev.

Although HiGHS is freely available under the MIT license, we would be pleased to learn about users' experience and give advice via email sent to highsopt@gmail.com.

Documentation

Documentation is available at https://ergo-code.github.io/HiGHS/.

Installation

Build from source using CMake

HiGHS uses CMake as build system, and requires at least version 3.15. To generate build files in a new subdirectory called 'build', run:

    cmake -S . -B build
    cmake --build build

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

    ctest

HiGHS can read MPS files and (CPLEX) LP files, and the following command solves the model in ml.mps

    highs ml.mps

HiGHS is installed using the command

    cmake --install build

with the optional setting of --prefix <prefix>, or the cmake option CMAKE_INSTALL_PREFIX if it is to be installed anywhere other than the default location.

As an alternative, HiGHS can be installed using the meson build interface:

meson setup bbdir -Dwith_tests=True
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.

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/.

We are happy to give a reasonable level of support via email sent to highsopt@gmail.com.

Python

The python package highspy is a thin wrapper around HiGHS and is available on PyPi. It can be easily installed via pip by running

$ pip install highspy

Alternatively, highspy can be built from source. Download the HiGHS source code and run

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.

The Google Colab Example Notebook also demonstrates how to call highspy.

Reference

If you use HiGHS in an academic context, please acknowledge this and cite the following article.

Parallelizing the dual revised simplex method Q. Huangfu and J. A. J. Hall Mathematical Programming Computation, 10 (1), 119-142, 2018. DOI: 10.1007/s12532-017-0130-5

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

highspy-1.7.1.dev1.tar.gz (1.3 MB view hashes)

Uploaded Source

Built Distributions

highspy-1.7.1.dev1-cp312-cp312-win_amd64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

highspy-1.7.1.dev1-cp312-cp312-win32.whl (1.4 MB view hashes)

Uploaded CPython 3.12 Windows x86

highspy-1.7.1.dev1-cp312-cp312-musllinux_1_1_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

highspy-1.7.1.dev1-cp312-cp312-musllinux_1_1_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ i686

highspy-1.7.1.dev1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

highspy-1.7.1.dev1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (2.2 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686

highspy-1.7.1.dev1-cp312-cp312-macosx_11_0_arm64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

highspy-1.7.1.dev1-cp312-cp312-macosx_10_9_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

highspy-1.7.1.dev1-cp311-cp311-win_amd64.whl (1.7 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

highspy-1.7.1.dev1-cp311-cp311-win32.whl (1.5 MB view hashes)

Uploaded CPython 3.11 Windows x86

highspy-1.7.1.dev1-cp311-cp311-musllinux_1_1_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

highspy-1.7.1.dev1-cp311-cp311-musllinux_1_1_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

highspy-1.7.1.dev1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

highspy-1.7.1.dev1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (2.2 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

highspy-1.7.1.dev1-cp311-cp311-macosx_11_0_arm64.whl (1.7 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

highspy-1.7.1.dev1-cp311-cp311-macosx_10_9_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

highspy-1.7.1.dev1-cp310-cp310-win_amd64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

highspy-1.7.1.dev1-cp310-cp310-win32.whl (1.4 MB view hashes)

Uploaded CPython 3.10 Windows x86

highspy-1.7.1.dev1-cp310-cp310-musllinux_1_1_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

highspy-1.7.1.dev1-cp310-cp310-musllinux_1_1_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

highspy-1.7.1.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

highspy-1.7.1.dev1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (2.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

highspy-1.7.1.dev1-cp310-cp310-macosx_11_0_arm64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

highspy-1.7.1.dev1-cp310-cp310-macosx_10_9_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

highspy-1.7.1.dev1-cp39-cp39-win_amd64.whl (1.7 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

highspy-1.7.1.dev1-cp39-cp39-win32.whl (1.4 MB view hashes)

Uploaded CPython 3.9 Windows x86

highspy-1.7.1.dev1-cp39-cp39-musllinux_1_1_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

highspy-1.7.1.dev1-cp39-cp39-musllinux_1_1_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

highspy-1.7.1.dev1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

highspy-1.7.1.dev1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (2.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

highspy-1.7.1.dev1-cp39-cp39-macosx_11_0_arm64.whl (1.7 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

highspy-1.7.1.dev1-cp39-cp39-macosx_10_9_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

highspy-1.7.1.dev1-cp38-cp38-win_amd64.whl (1.7 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

highspy-1.7.1.dev1-cp38-cp38-win32.whl (1.5 MB view hashes)

Uploaded CPython 3.8 Windows x86

highspy-1.7.1.dev1-cp38-cp38-musllinux_1_1_x86_64.whl (2.6 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

highspy-1.7.1.dev1-cp38-cp38-musllinux_1_1_i686.whl (2.7 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

highspy-1.7.1.dev1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

highspy-1.7.1.dev1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (2.2 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

highspy-1.7.1.dev1-cp38-cp38-macosx_11_0_arm64.whl (1.7 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

highspy-1.7.1.dev1-cp38-cp38-macosx_10_9_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page