fmincon performance with linear vs non linear constraints

조회 수: 6 (최근 30일)
Krishna Nunna
Krishna Nunna 2022년 9월 14일
답변: Dinesh 2023년 6월 7일
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
William Rose
William Rose 2022년 9월 14일
@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.

댓글을 달려면 로그인하십시오.

채택된 답변

Dinesh
Dinesh 2023년 6월 7일
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!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by