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 [email protected] "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 _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
