Monitoring API

SNOPT.SnoptMajorLog — Type
SnoptMajorLog

State of the solve at the end of a major iteration, passed to snlog. SNOPT ignores the return value of snlog; use snstop to stop the solve. The arrays are copies; most values refer to SNOPT's scaled problem. See Monitor and stop a solve.

Fields

  • iteration, major_iter, minor_iter: total minor iterations, current major iteration, and minor iterations in it.
  • n_superbasics, n_swaps: number of superbasic variables and of basis changes.
  • objective: objective value, including objective_add and a linear objective row.
  • merit: merit function, the objective plus a penalty on the constraint violation.
  • f_objective, f_merit: nonlinear parts of the objective and of the merit function.
  • primal_infeasibility, dual_infeasibility: constraint violation and error in the optimality conditions.
  • max_violation, relative_violation: largest constraint violation, absolute and relative.
  • step, penalty_norm: length of the last step and norm of the penalty parameters.
  • condition_hessian: estimated condition number of the reduced Hessian.
  • objective_scale, objective_add: scale factor and constant of the objective.
  • minimize: 1 to minimize, -1 to maximize.
  • kt_conditions: two flags, true when the primal and the dual Karush–Kuhn–Tucker conditions hold.
  • n, nb, nncon, nnobj: number of variables, of variables plus slack variables, of nonlinear constraints and of nonlinear objective variables.
  • x, hs: variables followed by slack variables, and their basis states; length nb.
  • fcon, fx, ycon: nonlinear constraint values as SNOPT passes them (fCon and Fx), and their multipliers; length nncon.
source
SNOPT.SnoptStopEvent — Type
SnoptStopEvent

State of the solve at the end of one major iteration, passed to the snstop function.

This type has all the fields of SnoptMajorLog and the fields below. Return false from snstop to stop the solve; the result then has the status SnoptStatus.StopInMonitor. See Monitor and stop a solve.

Fields

  • m: number of constraint rows.
  • max_superbasics: largest allowed number of superbasic variables.
  • negcon: number of nonlinear Jacobian entries.
  • gobj: objective gradient, length nnobj.
  • gcon: nonlinear Jacobian entries, length negcon.
  • pi: multipliers of the rows, length m.
  • rc: reduced costs of the variables and slack variables, length nb.
  • rg: reduced gradient, length max_superbasics.
  • bl, bu: scaled lower and upper bounds, length nb.
source
SNOPT.snopt_no_progress — Function
snopt_no_progress(event) -> true

Return true for every event, so the solve never stops.

Pass it as callback or snstop where a function that never stops the solve is needed. The default value nothing of these keywords has the same effect and is faster, because SNOPT.jl then does not create the event.

source