I'm using NMinimize
to find the minimum solution for a non-linear objective function. As I change the set of constraints, most of times NMinimize
cannot yield a solution, because there is none subject to the constraints that I'm using. Hence, I want to use a While
loop, which keeps going until NMinimize
ultimately returns a solution.
However, I don't know how to determine whether NMinimize
can yield a solution or not at each iteration of the While
loop. Any idea would be appreciated!
If NMinimize determines that the constraints cannot be satisfied, it returns {Infinity,{x->Indeterminate,\[Ellipsis]}}.
$\endgroup$