backtracking.py

A few different backtracking line search subsolvers.

BoundsEnforceLS - Only checks bounds and enforces them by one of three methods. ArmijoGoldsteinLS – Like above, but terminates with the ArmijoGoldsteinLS condition.

class openmdao.solvers.linesearch.backtracking.ArmijoGoldsteinLS(**kwargs)[source]

Bases: openmdao.solvers.solver.NonlinearSolver

Backtracking line search that terminates using the Armijo-Goldstein condition..

SOLVER = 'LS: AG'
__init__(self, **kwargs)[source]

Initialize all attributes.

Parameters
**kwargsdict

Options dictionary.

add_recorder(self, recorder)

Add a recorder to the solver’s RecordingManager.

Parameters
recorder<CaseRecorder>

A recorder instance to be added to RecManager.

cleanup(self)

Clean up resources prior to exit.

record_iteration(self, **kwargs)

Record an iteration of the current Solver.

Parameters
**kwargsdict

Keyword arguments (used for abs and rel error).

solve(self)

Run the solver.

class openmdao.solvers.linesearch.backtracking.BoundsEnforceLS(**kwargs)[source]

Bases: openmdao.solvers.solver.NonlinearSolver

Bounds enforcement only.

Not so much a linesearch; just check the bounds and if they are violated, then pull back to a non-violating point and evaluate.

SOLVER = 'LS: BCHK'
__init__(self, **kwargs)[source]

Initialize all attributes.

Parameters
**kwargsdict

Options dictionary.

add_recorder(self, recorder)

Add a recorder to the solver’s RecordingManager.

Parameters
recorder<CaseRecorder>

A recorder instance to be added to RecManager.

cleanup(self)

Clean up resources prior to exit.

record_iteration(self, **kwargs)

Record an iteration of the current Solver.

Parameters
**kwargsdict

Keyword arguments (used for abs and rel error).

solve(self)

Run the solver.