PrintResult

From TomWiki
Jump to navigationJump to search

Purpose

Prints the result of an optimization.

Calling Syntax

PrintResult(Result, PriLev)

Inputs

Input Description
Result Result structure from optimization.
PriLev Printing level: (default 3)
0 Silent.
1 Problem number and name.

Function value at the solution and at start.

Known optimal function value (if given).

2 As PriLev =1 and:

Optimal point x and starting point x 0.

Number of evaluations of the function, gradient etc.

Lagrange multipliers, both returned and TOMLAB estimate.

Distance from start to solution.

The residual, gradient and projected gradient. (*)

ExitFlag and Inform.

(*) The calculation and output of these fields is controlled by

Result.Prob.PrintLM.

3 As PriLev =2 and:

Jacobian, Hessian or Quasi-Newton Hessian approximation.

Global Parameters Used

To avoid too many variables, constraints and residuals in the output, three global variables are limiting the number printed:

Parameters Description
MAX_x Maximum number of variables
MAX_c Maximum number of constraints
MAX_r Maximum number of residuals in least squares problems
Example: To increase the number of variables printed by PrintResult to 50, do
global MAX_x 
MAX_x  =  50; 
PrintResult(Result);