nag_opt_handle_set_get_real (e04rxc) adds an additional means of communication to functions within the NAG optimization modelling suite. It allows you to either read or write a piece of information in the handle in the form of a real array. The item is identified by
cmdstr and the direction of the communication is set by
ioflag.
The functionality is limited in this release of the NAG C Library to the retrieval of the approximate solution within the monitoring step of
nag_opt_handle_solve_lp_ipm (e04mtc) or its final solution.
None.
Not applicable.
None.
This example demonstrates how to use
nag_opt_handle_set_get_real (e04rxc) to extract the current approximation of the solution when the monitoring function
monit is called during the solve by
nag_opt_handle_solve_lp_ipm (e04mtc).
We solve the following linear programming problem:
subject to the bounds
and the general constraints
During the monitoring step of
nag_opt_handle_solve_lp_ipm (e04mtc), if the three convergence measures are below an acceptable threshold, the approximate solution is extracted with
nag_opt_handle_set_get_real (e04rxc) and printed on the standard output.