< GLPK

This page describes the utilization of callback functions.

Lazy constraints

The callback function is called with GLP_IROWGEN when the current relaxed subproblem has been solved to optimality. Now lazy constraints can be added using library functions glp_add_rows,glp_set_row_name, glp_set_row_bnds, and glp_set_mat_row.

As of GLPK 4.60 the following bug exists:
An optimal solution may be found by the rounding heuristic which does not result in a callback with GLP_IROWGEN. As a workaround set iocp->sr_round = GLP_OFF to switch of the rounding heuristic.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.