Some of the interfaces listed on this page are not officially supported by the HiGHS development team and are contributed by the community.
HiGHS can be used via AMPL, see the AMPL Documentation.
Here are observations on calling HiGHS from C#:
- The file
highs_csharp_api.cscontains all the PInvoke you need. Copy it into your C# project.
- Make sure, that the native HiGHS library (
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
MSVCRuntimeis 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.csand 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.
To include in the build, switch the Fortran CMake parameter on:
cmake -DFORTRAN=ON ..
- Alternatively, HiGHS also has a native Node.js interface.
- An R interface is available through the