[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] [What is the easiest way to use COIN LP as solver in GLP
From: |
nicolas.derhy |
Subject: |
Re: [Help-glpk] [What is the easiest way to use COIN LP as solver in GLPK ?] |
Date: |
Mon, 4 Jul 2011 17:27:11 +0200 |
I will have about 350 000 variables and 350 000 constraints.
For the moment, I only test with small samples but one of my colleague said
that the glpk solver has real difficulty when for big cases and advices me to
use Coin LP.
That’s why I wanted to know if I can solve gmpl models with Coin LP...
It is the first time I use Coin and although I am familiar with some modelers
(opl, mosel, gmpl) and some API (mosel, opl and a little glpk), I found it
difficult to find what I looked for due to the (too) large number of Coin
projects and the too few number of basic samples into these project.
But now, it is much clearer for me ! :)
-----Message d'origine-----
De : M B Pradeep Kumar [mailto:address@hidden
Envoyé : lundi 4 juillet 2011 16:56
À : Andrew Makhorin
Cc : address@hidden; Derhy Nicolas (GDF SUEZ SA)
Objet : Re: [Help-glpk] [What is the easiest way to use COIN LP as solver in
GLPK ?]
On Mon, 2011-07-04 at 18:20 +0400, Andrew Makhorin wrote:
> > I am using GLPK in C++ programs like :
> > glp_prob *lp = glp_create_prob();
> > glp_tran *tran = glp_mpl_alloc_wksp();
> >
> > glp_mpl_read_model(tran, "..\\MyModel.mod", 1);
> > glp_mpl_read_data(tran, "..\\MyModel.dat");
> > glp_mpl_generate(tran, NULL);
> > glp_mpl_build_prob(tran, lp);
> > glp_simplex(lp, NULL);
> > glp_mpl_postsolve(tran, lp, GLP_MIP);
> >
> > glp_create_index(lp);
> > int index = glp_find_col(lp, "MyVariable");
> > double optimalValue = glp_get_row_prim(lp, index);
> >
> > When using with big input data, the solving time becomes very important. So,
> > I would like to use another solver like CLP. For example, in the above
> > source, it would replace the ligne "glp_simplex(lp, NULL);" by the call of
> > the new solver.
> >
> > I found references for Symphony or Osi but I did not find clear examples
> > doing what I am looking for.
> > Maybe, someone have met this problem or you could have valuable advices or
> > suggestions that I could test...
>
> AFAIK, both Coin and Symphony allow using the glpk model translator.
>
> Another way is to output the mip data into a file, say, in free mps
> format, call an external solver, and load the solution back into the
> glpk problem object. To simplify the interface between glpk and the
> external solver you may use api routines glp_write_prob, glp_read_mip,
> and glp_write_mip described in the glpk reference manual.
>
> If the external solver has its own api, you also may write an interface
> module; see an example attached.
To add to this,
COIN has an interface called OSI which can interface between GLPK and
CLP (though this is a template class and may need some juggling).
A small question, how large is the LP ? Because most of them GLPK can
solve in my experience (especially LP s).
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk
--
Thank you
M B Pradeep Kumar
GDF SUEZ Mail Disclaimer: http://www.gdfsuez.com/disclaimer/disclaimer-fr.html