in reply to Re^4: GLPK integration
in thread GLPK integration
Out of curiosity: What would be a use case to solve a linear program in MathProg format within a Perl program?
I have a simple mathprog program which is run on hundreds of data items of the same form (a 3-vector). The data is entered by the user into the webserver and then results are html'ed and served through the webserver. The choice I have is to shell out to pglsol as many times as data items. Or shell out once with a shell script (this can be parallelised with gnu-parallel!) containing all the glpsol commands. I understand that transforming my MathProg to vectors/matrices your glpk() understands is the way to go. Just 1) I am experimenting still with the subject-to clauses and it is easier to do that in high-level MathProg, and 2) it's way more appealing for novices to write MathProg (or copy paste one) than filling out those cryptically-named vectors/matrices. BTW, for my use-case, all 1500 data items (i.e. running the same MathProg for 1500 different data items) are solved in less than a second, so speed is not an issue.
glpsol has a function which reads a MathProg from a filehandle. I tried to convert it to using a string. But I did not persist much.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: GLPK integration
by jo37 (Curate) on Jan 19, 2026 at 19:31 UTC | |
by bliako (Abbot) on Jan 23, 2026 at 17:25 UTC |