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 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 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:

Other

  • Javascript

  • R

  • Rust

    • HiGHS can be used from rust through the highs crate. The rust linear programming modeler good_lp supports HiGHS.

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.