glpkmex icon indicating copy to clipboard operation
glpkmex copied to clipboard

Recompile binaries with the new support of GLPK 4.60

Open blegat opened this issue 9 years ago • 14 comments

@tholden has added support for GLPK 4.60, Windows binaries have been updated but this still needs to be done for Mac and Linux.

  • [x] Recompile for Linux 64 bits : glpkcc.mexa64
  • [ ] Recompile for Linux 32 bits : glpkcc.mexglx
  • [ ] Recompile for Mac OS 64 bits : glpkcc.mexmaci64

blegat avatar Jul 09 '16 11:07 blegat

The binary for linux 64 bits has been updated here: https://github.com/VinTz1/glpkmex.git

VinTz1 avatar Apr 11 '17 16:04 VinTz1

`>> mex -largeArrayDims -I/usr/local/include glpkcc.cpp /usr/local/lib/libglpk.a

Building with 'g++'. Warning: You are using gcc version '6.3.1-1)'. The version of gcc is not supported. The version currently supported with MEX is '4.9.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release. MEX completed successfully.

`>> glpktest1

LP problem Writing problem data to 'SimpleLP.mps'... 24 records were written GLPK Simplex Optimizer, v4.61

VinTz1 avatar Apr 11 '17 16:04 VinTz1

Maybe now the Readme should be updated

VinTz1 avatar Apr 12 '17 08:04 VinTz1

I would like to use glpkcc.mexw64 on matlab. But I need to use the optimization option of the glpk code. For example, when you change the right side equations with the function: glp_set_row_bnds(GLP, lin, GLP_FX, vl, 1.0e20). In this case, I will need to interface for glpk subfunctions. Can anybody help me, please?!

silvanflavio avatar Jun 09 '18 17:06 silvanflavio

glpkmex only support one shot optimization so you cannot modify the constraints. If you want to modify the constraint, I advise you to use the Julia wrapper. For a simple to use interface, you can use GLPK through JuMP which supports constraint modification.

blegat avatar Jun 09 '18 17:06 blegat

ok! Thanks. I'll check these.

silvanflavio avatar Jun 09 '18 20:06 silvanflavio

I was wondering about your answer. Is possible to program a function such the glpkcc.cpp, but with reoptimization option? And so create the mex file. Or, is the Matlab not support ? Whether not, why? Is it about the pointers?!

silvanflavio avatar Jun 10 '18 21:06 silvanflavio

I am not an expert in mex file but I don't see any reason why this wouldn't be possible

blegat avatar Jun 10 '18 22:06 blegat

I have a Windows MEX with the latest version - 4.65. I compiled it against the static library so it is a stand alone MEX with no need for the DLL.

Anyone interested in it in this package?

RoyiAvital avatar Apr 29 '20 17:04 RoyiAvital

Yes! Please share. Thanks!

tholden avatar Apr 30 '20 04:04 tholden

How do you want me to share it? Can I add a ZIP file here?

OK, it seems I can :-): See https://github.com/RoyiAvital/GLPKMEX.

RoyiAvital avatar Apr 30 '20 10:04 RoyiAvital

Thanks! Could you possibly share your build script too?

tholden avatar Apr 30 '20 13:04 tholden

Hi, I actually did it manually.

But you know what, I will create a MakeMex as a MATLAB Script and put it here.

RoyiAvital avatar Apr 30 '20 18:04 RoyiAvital

In order to be agile and independent I created https://github.com/RoyiAvital/GLPKMEX. The package doesn't require doing anything manually, it will download GLPK automatically, compile it and generate the independent MEX.

Currently works on Windows and Linux against GLPK 4.65. I intend to add macOS support as well.

I hope it will be useful to others.

RoyiAvital avatar May 01 '20 23:05 RoyiAvital