# Local Optimization With Multiple Starting Points

**URL:** <https://community.wolfram.com/t/local-optimization-with-multiple-starting-points/9418>\
**Category:** Ideas\
**Tags:** optimization\
**Created:** [October 12, 2016, 1:41pm UTC](https://community.wolfram.com/t/local-optimization-with-multiple-starting-points/9418 "2016-10-12T13:41:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [October 12, 2016, 1:41pm UTC](https://community.wolfram.com/t/local-optimization-with-multiple-starting-points/9418/1 "2016-10-12T13:41:53Z")

</div>

Using Version 11’s link to Ipopt, one can write a local minimization function which can take mulitple starting points and bounds on the variables and also return the Lagrange multipliers for the constraints and the variable bounds and the maximum constraint violation, as shown below

```
In[5]:= imin[
 x^2 - y^2, {Cos[x - y] >= 0.5}, {{x, -5, {.2, 1}, 
   5}, {y, -5, {-4, -1}, 5}}]

Out[5]= {{-24.9443, {x -> 0.235988, y -> -5.}, 
  "conslagmult" -> {0 <= -0.5 + 
       Cos[x - y] <= \[Infinity] -> -0.54499}, 
  "bndlagmult" -> {x -> {4.78912*10^-10, 5.25626*10^-10}, 
    y -> {10.472, 2.50587*10^-10}}, "maxconsviol" -> 4.84126*10^-8, 
  "Solve_Succeeded"}, {-9.37535, {x -> -3.9528, y -> -5.}, 
  "conslagmult" -> {0 <= -0.5 + 
       Cos[x - y] <= \[Infinity] -> -9.12861}, 
  "bndlagmult" -> {x -> {2.39404*10^-9, 2.79887*10^-10}, 
    y -> {2.0944, 2.50574*10^-10}}, "maxconsviol" -> 0, 
  "Solve_Succeeded"}}

```

Here are the corresponding results from FindMinimum

```
In[6]:= FindMinimum[{x^2 - y^2, 
  Cos[x - y] >= 0.5, -5 <= x <= 5, -5 <= y <= 5}, {{x, .2}, {y, -4}}]

Out[6]= {-24.9443, {x -> 0.235988, y -> -5.}}

In[7]:= FindMinimum[{x^2 - y^2, 
  Cos[x - y] >= 0.5, -5 <= x <= 5, -5 <= y <= 5}, {{x, 1}, {y, -1}}]

Out[7]= {-9.37535, {x -> -3.9528, y -> -5.}}

```

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [October 12, 2016, 2:35pm UTC](https://community.wolfram.com/t/local-optimization-with-multiple-starting-points/9418/2 "2016-10-12T14:35:54Z")

</div>

Thanks for sharing! Does FindMinimum also call (internally) Ipopt functionality? or is that completely different?

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [October 12, 2016, 2:52pm UTC](https://community.wolfram.com/t/local-optimization-with-multiple-starting-points/9418/3 "2016-10-12T14:52:11Z")

</div>

Method → “IPOPT” is an option for FindMinimum. I suspect it is the default for constrained problems.
