Interfaces
There are HiGHS interfaces for C, C#, FORTRAN, Julia and Python in HiGHS/interfaces
, with example driver files in HiGHS/examples
.
Fortran
The interface is in highs_fortran_api.f90
. To include in the build, switch the Fortran CMake parameter on:
cmake -DFORTRAN=ON ..
C#
Here are observations on calling HiGHS from C#:
- The file
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. E.g. if HiGHS was build using
Visual C++
make sure that theMSVCRuntime
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 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.
Modelling
There are interfaces to several popular modelling languages:
- AMPL
- HiGHS can be used via AMPL, see the AMPL Documentation.
- GAMS
- The interface is available at GAMSlinks, including pre-build libraries.
- JuMP
- HiGHS is the default solver in JuMP, see the JuMP Documentation.
Other
Javascript
HiGHS can be used from javascript directly inside a web browser thanks to highs-js. See the demo and the npm package.
Alternatively, HiGHS also has a native Node.js interface.
R
- An R interface is available through the
highs
R package.
- An R interface is available through the
Rust
- HiGHS can be used from rust through the
highs
crate. The rust linear programming modeler good_lp supports HiGHS.
- HiGHS can be used from rust through the
Note, that some of the interfaces listed on this page are not officially supported by the HiGHS development team and are contributed by the community.