Problem with linprob exit criteria?

2 ビュー (過去 30 日間)
John
John 2023 年 8 月 23 日
コメント済み: John 2023 年 9 月 5 日
I am gettting the following exit status using the "lsqlin" algorithm when solving a quadratic objective function and linear constraints:
"Optimization stopped because the relative changes in all elements of x are
less than options.StepTolerance = 1.000000e-10, but the relative maximum constraint
violation, 2.401393e-10, exceeds options.ConstraintTolerance = 1.000000e-06."
To me this does not make sense because 2.401393e-10 is less than options.ConstraintTolerance = 1.000000e-06. Is the magintude of the constraint function (in this case 2.401393e-10) supposed to be greater than the options.ConstraintTolerance? From my understanding/research of the options.ConstraintTolerance and other succesful solutions this does not seem to be the case.
Other details on the problem: The problem setup is very similar to another. It is intended to be the symmetric condition to another. The only differerence is a single constraint is inverted (accross the symmetric axis of the system). The other condition solved without issue. I have run similar problems without any issue in the past.
Ultimately my question boils down to: Is this a problem with the exit criteria or my understanding of the solver?
  4 件のコメント
Torsten
Torsten 2023 年 8 月 23 日
Ok, but you will understand that it's impossible for us to help if we cannot reproduce the contradictory message from the solver.
John
John 2023 年 8 月 23 日
編集済み: John 2023 年 8 月 23 日
I understand, it's frustrating from my end but I don't get to decide what I am allowed to share. I agree it is not possible to provide troubleshooting support without source data, and I am not necessarily looking for that. I was mostly looking for conceptual guidance or information about known bugs with the solver (and to be clear I am assuming there are no issues with the solver until explicitly told so by staff).
If you have any conceptual guidance (even something as simple as your assumptions about how options.ConstraintTolerance are not wrong) that would be helpful and appreciated. Just trying to reduce the number of things I need to investigate on my end.

サインインしてコメントする。

採用された回答

Steve Grikschat
Steve Grikschat 2023 年 8 月 28 日
Hi John,
It's hard for me to be sure without reproduction steps, but I think this is a bug with the exit criteria and reporting.
If you can, please send reproduction steps here or via a tech-support request so that we can properly diagnose and fix this.
Assumptions:
  1. You are running lsqlin's default algorithm ('interior-point')
  2. You are running the "dense" version of said algorithm: either the C matrix is full or you're setting the LinearSolver specifically (see below)
  3. Your release is past R2017a
The dense version of interior-point runs a few post processing steps after the main algorithm terminates. A primal feasibility check is performed where ConstraintTolerance is used as an absolute tolerance.
However, as stated in the message, a check using ConstraintTolerance as a relative tolerance is used to stop the iterations and it's those values reported in the message. Judging from the plots, the initial primal feasibility is quite large, which leads me to believe that the relative feasibility used internally may be skewed to look artificially small by the scale.
I don't think you can access the final parameters to verify that it is indeed infeasible in the absolute sense. Instead, you could try to work around the bug using the "sparse" method. It will change the path to a solution, but it should be stable and does not feature this post-processing step.
Set the LinearSolver option to 'sparse':
% Default options - Algorithm is 'interior-point'
options = optimoptions('lsqlin');
% Set to "sparse" version
options.LinearSolver = 'sparse';
  1 件のコメント
John
John 2023 年 9 月 5 日
Ok, I'll work on getting a support request put in.
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Least Squares についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by