9
$\begingroup$

What is the default method used by FindMinimum with constraints?

The documentation says:

"Currently, the only method available for constrained optimization is the interior point algorithm"

However, a random example gives different results for the Method -> Automatic and Method -> "InteriorPoints":

Reap[
  FindMinimum[
    {x^2 + y^2, 
     (x - 1)^2 + 2 (y - 1)^2 > 5}, 
    {{x, 4}, {y, 4}}, 
    Method -> Automatic,
    StepMonitor :> Sow[{x^2 + y^2, x, y}]
  ]
]

Reap[
  FindMinimum[
    {x^2 + y^2, 
     (x - 1)^2 + 2 (y - 1)^2 > 5}, 
    {{x, 4}, {y, 4}}, 
    Method -> "InteriorPoint", 
    StepMonitor :> Sow[{x^2 + y^2, x, y}]
  ]
]

The above code yields the same final solution but the steps taken are different for each, which suggests that the interior points method is not actually the default one in this case.

The same question has been asked here and here

So what is the exact method being used when Method -> Automatic is specified?

$\endgroup$

1 Answer 1

8
$\begingroup$
SystemOptions["FindMinimumOptions"]
{"FindMinimumOptions" -> 
   {"DefaultInteriorPointMethod" -> "IPOPT", 
    "TreatQuadraticProgramming" -> 0}}
Reap[FindMinimum[{x^2 + y^2, (x - 1)^2 + 2 (y - 1)^2 > 5}, {{x, 4}, {y, 4}}, 
       Method -> "IPOPT", StepMonitor :> Sow[{x^2 + y^2, x, y}]]] == 
 Reap[FindMinimum[{x^2 + y^2, (x - 1)^2 + 2 (y - 1)^2 > 5}, {{x,   4}, {y, 4}}, 
       Method -> Automatic, StepMonitor :> Sow[{x^2 + y^2, x, y}]]]
True

We can also use "IPOPT" as the value for "Method" suboption of the option Method:

Reap[FindMinimum[{x^2 + y^2, (x - 1)^2 + 2 (y - 1)^2 > 5}, {{x, 4}, {y, 4}}, 
   Method -> Automatic, StepMonitor :> Sow[{x^2 + y^2, x, y}]]] == 
 Reap[FindMinimum[{x^2 + y^2, (x - 1)^2 + 2 (y - 1)^2 > 5}, {{x, 4}, {y, 4}}, 
   Method -> {Automatic, "Method" -> "IPOPT"}, StepMonitor :> Sow[{x^2 + y^2, x, y}]]]
True

Using the option setting Method -> {Automatic, "Method" -> "NonlinearInteriorPoint"} gives the same result as Method -> "InteriorPoint":

Reap[FindMinimum[{x^2 + y^2, (x - 1)^2 + 2 (y - 1)^2 > 5}, {{x, 4}, {y, 4}}, 
    Method -> "InteriorPoint", StepMonitor :> Sow[{x^2 + y^2, x, y}]]] == 
 Reap[FindMinimum[{x^2 + y^2, (x - 1)^2 + 2 (y - 1)^2 > 5}, {{x, 4}, {y, 4}}, 
    Method -> {Automatic, "Method" -> "NonlinearInteriorPoint"}, 
   StepMonitor :> Sow[{x^2 + y^2, x, y}]]]
 True
$\endgroup$
2
  • $\begingroup$ @kglr.....Great! thank you.... Can I understand IPOPT and NonlinearInteriorPoint as just variants of the Interior point implementation? Where can I learn about the difference between both these options? $\endgroup$
    – VarunM
    Jan 29, 2021 at 12:02
  • 1
    $\begingroup$ @VarunM, for IPOPT see the tutorial Optimizing With IPOPT and the guide IPOPTLink. For "NonlinearInteriorPoint" I don't know of any reference. $\endgroup$
    – kglr
    Jan 29, 2021 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.