Giter VIP home page Giter VIP logo

go-glpk's People

Contributors

lukpank avatar rhavar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-glpk's Issues

Fails go test_glpk suite!

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

I'm unable to use this library on an M1 Mac

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?

Disable log

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

ReadLP

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.