- At each iteration, an approximation is made of the Hessian of the Lagrangian function using a quasi-Newton updating method. This is then used to generate a QP subproblem whose solution is used to form a search direction for a line search procedure. During its iterations, the SQP algorithm can attempt to take a step that fails. This means an objective function or nonlinear constraint function you supply returns a value of Inf, NaN, or a complex value.
- If the nonlinear constraints are not satisfied, and an attempted step causes the constraint violation to grow. The SQP algorithm attempts to obtain feasibility using a second-order approximation to the constraints. This second-order technique can lead to a feasible solution. However, this technique can slow the solution by requiring more evaluations of the nonlinear constraint functions, more large the constraints the more slow the iteration.
fmincon using SQP algorithm freezing when new iteration start
4 次查看(过去 30 天)
显示 更早的评论
Hello,
here is the short description of the problem that I encountered:
I try to solve a problem that contains both inequality and equality constraint with 'SQP' algorithm of fmincon with Matlab R2022a.
After the program started, the program sometimes freezing when the new iteration begin.
The inequality constraint matrix is about [ 7200 x 66 ] dimension and the equality constraint matrix is abount [ 30*1 ] dimension
I supposed the freezing occured during the new iteration start since I haved log some parameters when solving the object function and also displayed the output of the solver, it is like:
>
x = some_input
x = some_input
...
[ iteration 1 result ]
x = some_input
x = some_input
...
[ iteration 2 result ]
******* ==> starts freezing
>
If there is no freezing at all, matlab find the final solution with about ~1min. When the freezing happened, It didn't step at all after waiting for ~2 to 3 hours.
Also I supposed the freezing is related to the non-inequality constraint since when I remove it from the fmincon solver, there is no problem at all after ~1000 trials.
Does anyone has opinion for this kind of problem?
Any suggestion is welcomed, thanks!
0 个评论
回答(1 个)
VINAYAK LUHA
2023-9-14
Hi Jun Yang,
To the best of my understanding you wish to solve a non-linear optimization problem with “SQP” algorithm offered by “fmincon” function, however in some runs of the function the execution apparently freezes this may happen because of the followings -
The SQP algorithm involves solving a sequence of quadratic subproblems, which can be sensitive to numerical issues such as round-off errors, ill-conditioning, or numerical instability In such cases, it is advisable to try alternative optimization algorithms, adjust the algorithm parameters, or reformulate the problem to improve convergence.
Refer to the following documentation for a more detailed description of “fmincon sqp” -https://in.mathworks.com/help/optim/ug/constrained-nonlinear-optimization-algorithms.html#brnox01
Regards,
Vinayak Luha
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!