int TaoSolveApplication(TAO_APPLICATION, TAO_SOLVER);will apply the solver to the application that has been created by the user.
To see parameters and performance statistics for the solver, the
routine
int TaoView(TAO_SOLVER);can be used. This routine will display to standard output the number of function evaluations need by the solver and other information specific to the solver.
The progress of the optimization solver can be monitored with the runtime option -tao_monitor. Although monitoring routines can be customized, the default monitoring routine will print out several relevant statistics to the screen.
The user also has access to information about the current solution.
The current iteration number, objective function value, gradient
norm, infeasibility norm, and step length
can be retrieved with the command
int TaoGetSolutionStatus(TAO_SOLVER tao, int* iterate, double* f, double* gnorm, double *cnorm, double *xdiff, TaoTerminateReason *reason)The last argument returns a code that indicates the reason that the solver terminated. Positive numbers indicate that a solution has been found, while negative numbers indicate a failure. A list of reasons can be found in the manual page for TaoGetTerminationReason().
The user set vectors containing the solution and gradient before solving the problem, but pointers to these vectors can also be retrieved with the commands TaoGetSolution() and TaoGetGradient(). Dual variables and other relevant information are also available. This information can be obtained during user-defined routines such as a function evaluation and customized monitoring routine, or after the solver has terminated.