NLPDifferentiatorSettings#

class NLPDifferentiatorSettings(lin_solver=<factory>, check_LICQ=True, check_SC=True, track_residuals=True, check_rank=False, lstsq_fallback=False, active_set_tol=1e-06, set_lam_zero=False)[source]#

Bases: object

Settings for NLPDifferentiator.

Parameters:
  • lin_solver (str) –

  • check_LICQ (bool) –

  • check_SC (bool) –

  • track_residuals (bool) –

  • check_rank (bool) –

  • lstsq_fallback (bool) –

  • active_set_tol (float) –

  • set_lam_zero (bool) –

Methods#

Attributes#

active_set_tol#

NLPDifferentiatorSettings.active_set_tol: float = 1e-06#

Tolerance for the active set constraints.

check_LICQ#

NLPDifferentiatorSettings.check_LICQ: bool = True#

Check if the constraints are linearly independent at the given optimal solution. The result of this check is stored in NLPDifferentiatorStatus.

Warning

This feature is computationally demanding and should only be used for debugging purposes.

check_SC#

NLPDifferentiatorSettings.check_SC: bool = True#

Check if strict complementarity holds. The result of this check is stored in NLPDifferentiatorStatus.

check_rank#

NLPDifferentiatorSettings.check_rank: bool = False#

Check if the KKT matrix has full rank. The result of this check is stored in NLPDifferentiatorStatus.

Warning

This feature is computationally demanding and should only be used for debugging purposes.

lstsq_fallback#

NLPDifferentiatorSettings.lstsq_fallback: bool = False#

Fallback to least squares if the linear solver fails.

set_lam_zero#

NLPDifferentiatorSettings.set_lam_zero: bool = False#

Set the Lagrangen multipliers to exactly zero if they are below the tolerance.

track_residuals#

NLPDifferentiatorSettings.track_residuals: bool = True#

Compute the residuals of the KKT system.

lin_solver#

NLPDifferentiatorSettings.lin_solver: str#

Choose the linear solver for the KKT system. Can be 'casadi', 'scipy' or 'lstsq' (least squares).