# TaoALMM
Augmented Lagrangian multiplier method for solving nonlinear optimization problems with general constraints. 
## Options Database Keys

- ***-tao_almm_mu_init <real>       -*** initial penalty parameter (default: 10.)
- ***-tao_almm_mu_factor <real>     -*** increase factor for the penalty parameter (default: 100.)
- ***-tao_almm_mu_max <real>        -*** maximum safeguard for penalty parameter updates (default: 1.e20)
- ***-tao_almm_mu_power_good <real> -*** exponential for penalty parameter when multiplier update is accepted (default: 0.9)
- ***-tao_almm_mu_power_bad <real>  -*** exponential for penalty parameter when multiplier update is rejected (default: 0.1)
- ***-tao_almm_ye_min <real>        -*** minimum safeguard for equality multiplier updates (default: -1.e20)
- ***-tao_almm_ye_max <real>        -*** maximum safeguard for equality multiplier updates (default: 1.e20)
- ***-tao_almm_yi_min <real>        -*** minimum safeguard for inequality multiplier updates (default: -1.e20)
- ***-tao_almm_yi_max <real>        -*** maximum safeguard for inequality multiplier updates (default: 1.e20)
- ***-tao_almm_type <classic,phr>   -*** change formulation of the augmented Lagrangian merit function for the subproblem (default: classic)





## Notes
This method converts a constrained problem into a sequence of unconstrained problems via the augmented
Lagrangian merit function. Bound constraints are pushed down to the subproblem without any modifications.

Two formulations are offered for the subproblem: canonical Hestenes-Powell augmented Lagrangian with slack
variables for inequality constraints, and a slack-less Powell-Hestenes-Rockafellar (PHR) formulation utilizing a
pointwise max() penalty on inequality constraints. The canonical augmented Lagrangian formulation typically
converges faster for most problems. However, PHR may be desirable for problems featuring a large number
of inequality constraints because it avoids inflating the size of the subproblem with slack variables.

The subproblem is solved using a nested first-order TAO solver. The user can retrieve a pointer to
the subsolver via TaoALMMGetSubsolver() or pass command line arguments to it using the
"-tao_almm_subsolver_" prefix. Currently, TaoALMM does not support second-order methods for the
subproblem. It is also highly recommended that the subsolver chosen by the user utilize a trust-region
strategy for globalization (default: TAOBQNKTR) especially if the outer problem features bound constraints.

```none
  while unconverged
    solve argmin_x L(x) s.t. l <= x <= u
    if ||c|| <= y_tol
      if ||c|| <= c_tol && ||Lgrad|| <= g_tol:
        problem converged, return solution
      else
        constraints sufficiently improved
        update multipliers and tighten tolerances
      endif
    else
      constraints did not improve
      update penalty and loosen tolerances
    endif
  endwhile
```



## See Also
 `TaoALMMGetType()`, `TaoALMMSetType()`, `TaoALMMSetSubsolver()`, `TaoALMMGetSubsolver()`,
`TaoALMMGetMultipliers()`, `TaoALMMSetMultipliers()`, `TaoALMMGetPrimalIS()`, `TaoALMMGetDualIS()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/impls/almm/almm.c.html#TaoALMM">src/tao/constrained/impls/almm/almm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/constrained/impls/almm/almm.c)


[Index of all Tao routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
