lukpank / go-glpk Goto Github PK
View Code? Open in Web Editor NEWGo bindings for GLPK (GNU Linear Programming Kit)
License: GNU General Public License v3.0
Go bindings for GLPK (GNU Linear Programming Kit)
License: GNU General Public License v3.0
I have succeeded in installing and building your go-glpk package, linking to libglpk.a
This static library is recompiled afresh using gcc and recent glpk version 4-64, and the check was successful: "OPTIMAL LP SOLUTION FOUND" on examples\plan.mps and examples\murtagh.mps and
Unfortunately, the (very thorough) test_glpk didn't succeed:
$ go test
glp_free: ptr = 0000000000982D10; invalid pointer
Error detected in file ..\src\env\alloc.c at line 59
exit status 3
FAIL github.com/lukpank/go-glpk/glpk 13.750s
I probably have to ask glpk specialists...
If I try a normal go build .
or go test ./...
command I get the error below:
fatal error: glpk.h: No such file or directory #include <glpk.h> #2
I have glpk
installed on my machine:
$ glpk
GLPSOL--GLPK LP/MIP Solver 5.0
No input problem file specified; try glpk --help
In addition to that I tried downloading the source code of the library and overriding the path to the glpk.h
file but I get a different error:
$ CGO_ENABLED=1 CGO_CFLAGS="-I/path/to/glpk-5.0/src/" go build .
/usr/local/go/pkg/tool/darwin_arm64/link: running clang failed: exit status 1
ld: library not found for -lglpk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have no idea how to proceed. Has anyone had success with using this library on M1 Mac?
Can't figure out a solution.
Hi,
I'm running go-glpk but it generates a lot of noise to the stdout when solving. Is there a way to disable this?
Thanks
When I read in the LP below with the ReadLP method, I get as result x_1 = 2, x_2 = 0, x_3 = 2, x_4 = 0 which is clearly wrong when looking at the LP.
\* Problem: Unknown *\
Maximize
obj: 0 x_1
Subject To
r_1: + x_2 + x_1 = 2
r_2: - x_2 = 0
r_3: + x_4 + x_3 = 2
r_4: - x_3 = 0
r_5: + x_3 + x_1 <= 10
r_6: + x_4 + x_2 <= 8
End
When I don't read in the LP but create a Prob datastructure it seems to work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.