3

I am using SLSQP through OpenMDAO to solve an optimization problem. The optimization is working adequately; the SLSQP output at the end reads:

Optimization terminated successfully.    (Exit mode 0)
            Current function value: [-0.07475851]
            Iterations: 44
            Function evaluations: 87
            Gradient evaluations: 44
Optimization Complete

I am now trying to post-process the results and examine the convergence of the optimization throughout iterations. When I access the iterations through the sqlite dictionary via

db = sqlitedict.SqliteDict('opt_record.sqlite','iterations')
db.keys()

then I see 87 records. So the "iterations" here are really referring to the function evaluations. Obviously this can give an idea of convergence as well, but is there any way to truly access the iteration information, either through some output mechanism or by back-calculating which function evaluations refer to the end of an iteration?

aherrema
  • 77
  • 7

1 Answers1

1

in SLSQP you can get function calls from one of two ways:

  1. iterations, or Major iterations
  2. line search's

Both of those things get recorded by the case recorder, and there isn't any way for OpenMDAO to distinguish between them. You can filter them out though, becasuse major iterations will always come just before a derivative calculation. So cases that don't have any derivatives most likely came from the line-searches.

Justin Gray
  • 5,605
  • 1
  • 11
  • 16
  • Could you please explain these methods in detail? – Rua Goa Nov 18 '20 at 20:33
  • Major iterations involve the solution of the quadratic sub problem in the SQP method (https://en.wikipedia.org/wiki/Sequential_quadratic_programming). This step computes a search direction. Once the search direction is known, you perform a line search along that direction, where look for a point that is good enough to perform the next major iteration on. Line searches are typically done without any gradients. There are often 2 or more evaluations done in a line search. – Justin Gray Nov 20 '20 at 12:40