Solver Log

TORA.SolverLogType

During optimization, a SolverLog is used to store convergence information.

A SolverLog can log the following:

  • x::Array{Float64,2}: the history of the decision variables for every iteration.
  • abs_feas_error::Array{Float64,1}: the absolute feasibility error evolution.
  • abs_opt_error::Array{Float64,1}: the absolute optimality error evolution.
  • obj_value::Array{Float64,1}: the evolution of the objective function value.
  • fc_evals::Array{Float64,1}: the evolution of the number of function evaluations.
  • ga_evals::Array{Float64,1}: the evolution of the number of gradient evaluations.
  • nStatus::Int: the solution status return code.

The actual values stored in a SolverLog depend on the implementation of the callback used by each solver for every new point. Using Ipopt, the callback is set with Ipopt.setIntermediateCallback. Using Knitro, the callback is set with KNITRO.KN_set_newpt_callback.

source
TORA.SolverLogMethod
SolverLog(N)

Create an empty NLP solver log.

Arguments

  • N::Int: the total number of decision variables of the NLP.

See also: update!

source

Index

Methods

Base.lengthMethod
length(log) -> Integer

Return the length of a SolverLog.

The length of a SolverLog is the same as the number of iterations taken to solve the problem.

source
TORA.update!Method
update!(log; <keyword arguments>)

Update a SolverLog object.

Keyword arguments

  • x=zeros(size(log.x, 1)): an intermediate iterate point.
  • abs_feas_error=0: the absolute feasibility error at the current point.
  • abs_opt_error=0: the absolute optimality error at the current point.
  • obj_value=0: the value of the objective function at the current point.
  • fc_evals=0: the number of function evaluations requested by the NLP solver so far.
  • ga_evals=0: the number of gradient evaluations requested by the NLP solver so far.
source