help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] MathProg, glpk and C language


From: Michael Hennebry
Subject: Re: [Help-glpk] MathProg, glpk and C language
Date: Wed, 4 Oct 2017 11:40:47 -0500 (CDT)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

On Wed, 4 Oct 2017, john tass wrote:

One possible way I suppose that is to use the API's of Glpk inside that
function, using #include "glpk.h". But this way has the following drawback:
in order to declare a structural variable of my model, say X1, I have to
write something like glp_set_col_name(lp, 1, "x1"); That means that I
declare the X1 variable by a hard-code. But my model is quite large, having
hundreds of variables. In addition, I do not know in advance the exact
number of them since they should be created dynamically. As you understand

GLPK does not require you to name your variables at all.
Using GLPK's API, I only named variables if I wanted GLPK to print.
Even then, I generated the names with the program.
How else with a variable number of names?

With MathProg, my program would have trouble reading the solution.
What column was X[7]?
What name did X[7] have?
At the time, and maybe still,
how GLPK's MathProg generated names was not documented.

--
Michael   address@hidden
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
                                                             --  someeecards



reply via email to

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