[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] new APIs : some suggestions
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] new APIs : some suggestions |
Date: |
Fri, 22 Apr 2011 20:02:44 +0400 |
Hi Robbie,
> I have a few suggestions for new or reinstated GLPK
> APIs. Some were previously discussed in 2008, others
> are novel. My guess is that some would require just a
> few lines of code.
>
Thank you for your suggestions.
Based on the suggestions I think to add the following api routines:
glp_get_aij (glp_get_mat_val renamed) to retrieve a single constraint
coefficient (an element of the constraint matrix);
glp_set_aij (for symmetry);
glp_set_obj_row / glp_get_obj_row (glp_set_obj / glp_get_obj renamed);
similar to glp_set_mat_row / glp_set_mat_col.
Glp_get_class / glp_set_class are quite unclear. The point is that the
problem class mainly depends on the solver used, not on problem data.
For example, if you call glp_simplex, you solve lp even if some
variables are marked as integer.
As to glp_empty_prob, I think it is equivalent to existing api routine
glp_erase_prob. If you remove all rows and columns, there is no useful
internal information that would need to be retained.
> My application program makes a call to
> 'glp_term_out(GLP_OFF)' on start-up if the --silent
> command-line option has been set. However this call is
> only legal if a problem object has already been created
> -- although it need not persist.
I don't think so. To access the glpk environment glp_term_out calls
get_env_ptr, which, in turn, calls glp_init_env, if necessary (please
see src/glpenv03.c).
>
> Hence, the following (currently hypothetical) API might
> be useful:
>
> int glp_init_env() /* returns zero on success */
Exactly this api routine exists and is documented, including its
counter-part glp_free_env.
> ---------------------------------
> API request : glp_combine
> ---------------------------------
>
The purpose of this routine is unclear, because there may be many
different ways in which two or more problems can be combined.
Best regards,
Andrew Makhorin