help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] GLPK GUROBI wrapper


From: Matteo Salani
Subject: [Help-glpk] GLPK GUROBI wrapper
Date: Wed, 23 Feb 2011 16:44:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10

Hi,

I don't know whether this can be of any help to anybody
but I wrote a GLPK -> GUROBI -> GLPK  kind of wrapper
which uses GLPK to parse a MathProg model with data files, generates an mps file, solve it with Gurobi,
and uses the post solve features of GLPK.

motivations:
- with somewhat complex models, GLPK is not effective as GUROBI.
- MathProg is wonderful for fast prototyping and post solve features.
- AMPL is too expensive :).

compiling:

assume you have glpk and gurobi properly installed and GUROBI is a env variable where gurobi is

#: gcc -std=c99 -O2 -o wrapper_GLPK_GUROBI -I$GUROBI/include/ wrapper_gurobi.c -L$GUROBI/lib/ -lm -lgurobi40 -lpthread -lglpk

usage:

#: ./wrapper_GLPK_GUROBI -m mod8.m -d mod8.d
#: ./wrapper_GLPK_GUROBI -m mod8.m -d mod8.d --glpk_out
#: ./wrapper_GLPK_GUROBI -m mod8.m -d mod8.d --glpk_out --grb_out

most of the glpsol options can be passed via command line (I am now addressing with the -y option)
and most of the parameters can be set via command line too.

Enjoy,
Matteo

--
*Matteo Salani*
IDSIA
Galleria 2
6928 Manno-Lugano Switzerland
Web: http://www.idsia.ch/~salani <http://www.idsia.ch/%7Esalani>
Email: address@hidden <mailto:address@hidden>
Phone: +41 58 666 66 71

Attachment: wrapper_gurobi.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]