fmincon performance with linear vs non linear constraints

5 views (last 30 days)
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 Comment
William Rose
William Rose on 14 Sep 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.

Sign in to comment.

Accepted Answer

Dinesh
Dinesh on 7 Jun 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!

More Answers (0)

Tags

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!