- 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
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
VINAYAK LUHA
el 14 de Sept. de 2023
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 comentarios
Ver también
Categorías
Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!