Problem with linprob exit criteria?
2 次查看(过去 30 天)
显示 更早的评论
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
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.
采纳的回答
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:
- You are running lsqlin's default algorithm ('interior-point')
- You are running the "dense" version of said algorithm: either the C matrix is full or you're setting the LinearSolver specifically (see below)
- 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.
% Default options - Algorithm is 'interior-point'
options = optimoptions('lsqlin');
% Set to "sparse" version
options.LinearSolver = 'sparse';
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!