# Does someone have experience in Augmented Lagrangian in julia?

**URL:** <https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872>\
**Category:** Optimization (Mathematical)\
**Created:** [April 1, 2020, 8:47pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872 "2020-04-01T20:47:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markus\_Hauschel](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Markus\_Hauschel](https://discourse.julialang.org/u/Markus_Hauschel)\
**Post date:** [April 1, 2020, 8:47pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/1 "2020-04-01T20:47:08Z")

</div>

It seems that most of the posts, I can find, are old. My code is currently in R and I think about porting to Julia. Does it work well?

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [April 1, 2020, 8:59pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/2 "2020-04-01T20:59:03Z")

</div>

This question is very vague, are you talking about some particular optimization framework in julia?  
Augmented Lagrangian is a very general method that can be applied to more or less any constrained problem. Possibly, you don’t even have to port your code, you might be able to use a constrained solver already existing in one of the julia offerings for constrained optimization.

---

<div class="post-metadata">

**Author:** ![Markus\_Hauschel](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Markus\_Hauschel](https://discourse.julialang.org/u/Markus_Hauschel)\
**Post date:** [April 1, 2020, 9:12pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/3 "2020-04-01T21:12:57Z")

</div>

In the past I used Nlopt for basic optimization problems, why this would be my prefered choice right now. I left it open because I’d like to hear experience from others in julia. The porting is no problem, that’s done within a couple of hours or maybe even minutes depending on what to port. I have a nonlinear function which is to be minimized with inequality constraints. Unfortunately I’m not (yet?) as deep in optimization as I’d like to be to specify the proper question.

---

<div class="post-metadata">

**Author:** ![abelsiqueira](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abelsiqueira/32/47269_2.png) [@abelsiqueira](https://discourse.julialang.org/u/abelsiqueira)\
**Post date:** [April 1, 2020, 11:58pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/4 "2020-04-01T23:58:02Z")

</div>

I have a student working on Augmented Lagrangian as part of her Master’s: [GitHub - JuliaSmoothOptimizers/Percival.jl: Implementation of a Augmented Lagrangian method](https://github.com/CiDAMO/AugLag.jl). It is not released, and will eventually be part of JuliaSmoothOptimizers, althought it may take a couple of months before she finishes it.

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [April 2, 2020, 1:05am UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/5 "2020-04-02T01:05:30Z")

</div>

Theres also a Julia interface to NLopt [GitHub - JuliaOpt/NLopt.jl: Package to call the NLopt nonlinear-optimization library from the Julia language](https://github.com/JuliaOpt/NLopt.jl)  
so the porting should be very straightforward if you make use of that

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [April 3, 2020, 1:00pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/6 "2020-04-03T13:00:18Z")

</div>

Out of curiosity, Why Augmented Lagrangian and not ADMM?

---

<div class="post-metadata">

**Author:** ![Markus\_Hauschel](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Markus\_Hauschel](https://discourse.julialang.org/u/Markus_Hauschel)\
**Post date:** [April 3, 2020, 1:18pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/7 "2020-04-03T13:18:07Z")

</div>

The code looks great so far!

---

<div class="post-metadata">

**Author:** ![Markus\_Hauschel](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Markus\_Hauschel](https://discourse.julialang.org/u/Markus_Hauschel)\
**Post date:** [April 3, 2020, 1:19pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/8 "2020-04-03T13:19:10Z")

</div>

I was using that in the past for Optimizations without constraints ! The API is really great. Thanks!

---

<div class="post-metadata">

**Author:** ![Markus\_Hauschel](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Markus\_Hauschel](https://discourse.julialang.org/u/Markus_Hauschel)\
**Post date:** [April 3, 2020, 1:22pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/9 "2020-04-03T13:22:51Z")

</div>

I am not sure about Augmented Lagrangian and I was not aware of ADMM, why would you prefer ADMM? Which package would you use? ProximalOperators, COSMO or another one?

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [April 3, 2020, 1:33pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/10 "2020-04-03T13:33:58Z")

</div>

Is ADMM really applicable for general constrained problems the way the augmented Lagrangian method is?

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [April 3, 2020, 1:55pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/11 "2020-04-03T13:55:06Z")

</div>

I would say it is.  
ADMM, if we remove the Convex Context (Which then have a nice structure with Proximal Operator), is just the idea of splitting the variables in ALM.

Since I think there are many ADMM implementations, and if not, it is usually few lines to code, I thought it might be a good thing to search for.

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [April 3, 2020, 2:06pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/12 "2020-04-03T14:06:39Z")

</div>

Well, you must be able to perform both prox operations efficiently also. Sure you can probably run the algorithm, but if you remove the convexity and the efficient prox there is not much left of the attractiveness of ADMM

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [April 3, 2020, 2:23pm UTC](https://discourse.julialang.org/t/does-someone-have-experience-in-augmented-lagrangian-in-julia/36872/13 "2020-04-03T14:23:10Z")

</div>

Unless each sub problem, due to splitting, is much easier to solve.  
Which in the context of Image Processing / Signal Processing is in many cases.

Moreover, ADMM has much better convergence properties even in the Non Convex cases.

See - [Wotao Yin (UCLA Math) - Non Convex ADMM: Convergence and Applications](https://www.math.ucla.edu/~wotaoyin/summer2016/9_nonconvex_ADMM).

Specifically:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/1/7162e99df1ccba4a51ec3b3b9700f92ccb7f648d.png)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/1/e1c1825520727e8f91bcffa5886859beca65d7b5.png)

Anyhow, just pointed that ADMM might be also an alternative as a special case of ALM.
