help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: glpk tuning]


From: Andrew Makhorin
Subject: Re: [Help-glpk] [Fwd: glpk tuning]
Date: Tue, 22 Sep 2015 07:01:38 +0300

> I would like to make use of glpk library in my C programme. I have made
> some tests of it in Octave and it works great, giving an expected
> results. However using "raw" glpk via C gives different, wrong, results.

Looks like you forgot to specify column (i.e. variable) bounds. On api
level all variables are fixed at zero by default.

> I suspect, that it's a matter of proper parametrisation of the library,
> but I am a novice and a real problem may be hiding somewhere else. I
> have tried to set the same defaults that glpk has in octave but it
> turned out to be a lot of fiddling around and the way to success seems
> vague. Can you provide me steps I should perform to make glpk work well
> in C as it does in Octave?
> 

To visualize your lp you may call the glp_write_lp routine which writes
the problem object to a text file in a human-readable format. For
details please see the glpk reference manual included in the
distribution tarball.

You also may write your lp in GNU MathProg (subset of AMPL) rather than
in C and then use glpsol to solve it.




reply via email to

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