Skip to content
/ golp Public
forked from draffensperger/golp

Go bindings for LPSolve, a Mixed Integer Linear Programming (MILP) solver

License

Notifications You must be signed in to change notification settings

btoews/golp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Build Status

Golp is a Golang wrapper for the LPSolve linear (and integer) programming library.

Installation

To use golp, first you need to get the golp Go code:

go get https://github.com/draffensperger/golp

Then you will need to get LP solve itself. Golp is configured to dynamically link to LP solve and expects its files to be in the lib/lp_solve folder for your project.

You will need an LP Solve build suitable for your operating system, which you can download from SourceForge.

Here's how you could download and extract the LP Solve library for 64-bit Linux:

wget -qO- http://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.0/lp_solve_5.5.2.0_dev_ux64.tar.gz | tar xvz -C lib/lp_solve

With some configuration changes, it would be possible to statically link to LP Solve but that may have licensing implications for your project since LP Solve is LGPL licensed.

Usage

Not all LPSolve functions are supported, but it's currently possible to run a simple linear program using golp. See lp_test.go for an example. Note that the column indices are always zero based.

Example with real-valued variables

MIP (Mixed Integer Programming) example

Linking to LPSolve

Alternative Linear Programming Packages

Licenses and acknowledgments

The golp golang code itself is MIT licensed. However, LPSolve itself is licensed under the LGPL. The stringbuilder.c code is from breckinloggins/libuseful.

About

Go bindings for LPSolve, a Mixed Integer Linear Programming (MILP) solver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 75.4%
  • C 24.6%