fmincon performance with linear vs non linear constraints

6 visualizaciones (últimos 30 días)
Krishna Nunna
Krishna Nunna el 14 de Sept. de 2022
Respondida: Dinesh el 7 de Jun. de 2023
I am currently running fmincon interior point with linear inqeuality, equality and non-linear inequality constraints. I am specifying both objective gradient and constraint gradient. I am wondering if there is any benefit with regard to speed up if I specify the linear inequality constraint as a non-linear inequality constraint along with the corresponding gradient.
  1 comentario
William Rose
William Rose el 14 de Sept. de 2022
@Krishna Nunna, I don;t know . I suspect it will be as fast to just try it and find out, compared to getting a deifnitive answer on Matlab Answers. (I realize computing a gradient analytically can be time consuming, but for a linear function it should not be too hard.) I predict that the linear inequaliy constraint will be faster since it can be implemented as a matrix operation internally, with possible one-step solution, whereas nonlinear inequality constraint will certainly require an approximation process for solution. Good luck.

Iniciar sesión para comentar.

Respuesta aceptada

Dinesh
Dinesh el 7 de Jun. de 2023
Hi Krishna!
In general, specifying a linear inequality constraint as a non-linear inequality constraint with corresponding gradient may not lead to a significant speedup in fmincon interior point algorithm. This is because fmincon interior point algorithm is specifically designed to handle linear inequality constraints efficiently.
The benefit of specifying non-linear constraints (and their gradients) may arise in cases where the constraints themselves are non-linear in nature. In such cases, providing the non-linear gradient can help fmincon to converge faster.
However, if you are uncertain about the linearity of your inequality constraint, or if you suspect that there may be some non-linearity, it is worth trying both linear and non-linear formulations of the constraint to see if there is any significant difference in the performance and convergence rate of fmincon.
Hope this helps,
Thank you!

Más respuestas (0)

Categorías

Más información sobre Linear Least Squares en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by