help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: Can MathProg Translator generate C or C++ code sni


From: Harley Mackenzie
Subject: Re: [Help-glpk] [Fwd: Can MathProg Translator generate C or C++ code snippet?]
Date: Thu, 09 Feb 2012 10:27:03 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111229 Thunderbird/9.0

This certainly would be technically feasible and a very useful addition to the GLPK program, however, it would take a lot of time to develop and would require someone who has a lot of motivation to implement.

The benefit for all users would be that you could develop the model in MathProg and, once debugged and refined, generate a C++ program for repeated runs and to allow greater output flexibility and control of the running of the program.

Another alternative would be to output the model in some simple to load representation of the matrix elements (JSON, XML, binary?) so that it could then be loaded quickly into a C/C++ GLPK program.

Anyone interested in this sub-project?

Regards,

Harley

On 02/09/2012 12:23 AM, Haroldo Gambini Santos wrote:
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



--
------------------------------------------------------------------
     Dr. Harley Mackenzie         ABN:   36 348 783 012

     HARD Software                Web:   www.hardsoftware.com
     PO BOX 8004                  Tel:   +61 3 5222 3435
     Newtown 3220, Australia      Email: address@hidden
------------------------------------------------------------------



reply via email to

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