On 08-02-2012 12:12, Andrew Makhorin wrote:
-------- Forwarded Message --------
From: Sebastian Kranz<address@hidden>
To: address@hidden
Subject: Can MathProg Translator generate C or C++ code snippet?
Date: Wed, 08 Feb 2012 10:57:02 +0100
Dear Developers,
I find the possibility of GLPK to read and process
MathProg models extremely helpful. Thanks a lot for
creating the translator!
In my view, MathProg is usually a much more convenient
form to specify a linear program than directly filling the
constraint matrix with numbers. However, I have an
application that has to solve the same model many times
with different specifications of the sets and the
parameters of the MathProg model. In this application,
creating every time a new instance via the MathProg
translator seems rather slow in terms of computing speed.
I wondered whether it would be possible to add a function
to the MathProg translator that can create from the
internal model representation of a given MathProg model
some C code snippet. The snippet would be a C (or C++)
function that takes sets and parameters as vector input
and returns the constraint matrix, bounds and objective
coefficients of the linear program as output. I could
imagine that this could be quite useful, since one could
specify the logic of the problem in the convenient
MathProg form, but still can embed in the application fast
code to generate the linear programs.
Usually the slow part of the process is not generating the model but
solving it - specially for integer programs.
As a GLPK user I'm much more interested in improvements in the
robustness of the liner programming solver and in the algorithms for
integer programming than some speedup in generating the model.
GLPK is still one of the slowest solvers:
http://plato.asu.edu/ftp/milpc.html
There is a long way to go for improving the solver code.
Cheers,
Haroldo
However, I have no clue whether that is possible or hard
it would be to create such a snippet generator.
Best wishes,
Sebastian
_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk