# How to put bounds on Nelder-Mead in Optim?

**URL:** <https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [March 29, 2021, 6:44pm UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183 "2021-03-29T18:44:41Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![zxjroger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zxjroger/32/11826_2.png) [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Post date:** [April 2, 2021, 9:25pm UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183/21 "2021-04-02T21:25:39Z")

</div>

Not sure if this will ring a bell. There are many problems similar to the [assignment problem](https://en.wikipedia.org/wiki/Assignment_problem) nested in my objective function. These problems are formulated as linear programming problems. And the solutions are the indices of certain elements in a matrix, which make the objective function non-differentiable.

---

<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, 2021, 5:37am UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183/22 "2021-04-03T05:37:47Z")

</div>

A smooth and differentiable relaxation of the assignment problem is to solve an entropically regularize optimal-transport problem.

> **[af21d0c97db2e27e13572cbf59eb343d-Paper.pdf](https://proceedings.neurips.cc/paper/2013/file/af21d0c97db2e27e13572cbf59eb343d-Paper.pdf)**
>
> 360.42 KB

Edit: chapter 4 in the book below is perhaps a better reference for this

> **[The Book - Computational Optimal Transport](https://optimaltransport.github.io/book/)**
>
> Computational Optimal Transport

---

<div class="post-metadata">

**Author:** ![zxjroger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zxjroger/32/11826_2.png) [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Post date:** [April 3, 2021, 8:51pm UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183/23 "2021-04-03T20:51:45Z")

</div>

Hi Fredrik, thank you so much! Let me take a look. (I guess this may improve the speed of solving my linear programming problem. But since I need the matrix index as an intermediate output in my objective function, this may not solve the issue.)

---

<div class="post-metadata">

**Author:** ![martinmestre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martinmestre/32/215857_2.png) [@martinmestre](https://discourse.julialang.org/u/martinmestre)\
**Post date:** [May 25, 2022, 11:08am UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183/24 "2022-05-25T11:08:25Z")

</div>

Hi @stevengj, could you suggest the best 2-3 derivative free algorithms from NLopt.jl according to your tests?  
Thank you!

---

<div class="post-metadata">

**Author:** ![IljaK91](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iljak91/32/44301_2.png) [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Post date:** [May 25, 2022, 12:55pm UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183/25 "2022-05-25T12:55:31Z")

</div>

And whether they are available for JuMP as well 🙂 Any up-to-date source would be welcomed.

---

<div class="post-metadata">

**Author:** ![JosephPollacco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josephpollacco/32/51404_2.png) [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)\
**Post date:** [February 2, 2024, 6:03am UTC](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183/26 "2024-02-02T06:03:29Z")

</div>

Hi bboptimize now provdes initial guess [https://github.com/robertfeldt/BlackBoxOptim.jl](https://blackbox-optimization) which is great

[Previous page](https://discourse.julialang.org/t/how-to-put-bounds-on-nelder-mead-in-optim/58183.md?page=1)
