> I have a MathProg model on the one hand and want to supply its input > not using glp_mpl_read_data(), but programmatically on the other hand.
There is no way to provide model data other than specifying them in the data section, i.e. in a text file. > Also I want to fetch the results after calling the solver not via a > file, but programmatically. > How can I do this, which is the correct order of API routines to call? > Skimming through the examples I did not find similar code, but I may > have overlooked something, of course. > You can obtain solution components directly from the glp_prob object (built with glp_mpl_build_prob). For example, to retrieve the value of a column (variable) you can use glp_get_col_prim. Glp_mpl_build_prob provides symbolic names of rows and columns; for example, MathProg variable x[1,a] is assigned the name "x[1,a]". These names can be used to determine ordinal numbers of corresponding rows and columns (with routines glp_find_row and glp_find_col). If your model has a simple structure, I'd suggest build it with glpk api routines, i.e. not to use MathProg description at all. This is quite easy and would resolve most interface problems. _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
