FMINCON Linear Constraint Strictly Greater/Less Than
12 次查看(过去 30 天)
显示 更早的评论
Hi all, I need some help to correctly build two linear constraints to be used in FMINCON (SQP algorithm).
My system has 4 parameters to be estimated: , and .
It also have to consider 4 static values:, , and , whose values are in the range and are such that:
The required constraints are defined as follows:
Now, let's suppose for simplicity that:
And that the constraints become:
So far, I tried to write my A and b FMINCON input arguments as follows:
A = [
-0.5 -0.5 0.0 0.0;
0.0 0.0 0.5 0.5;
];
b = zeros(2,1);
Is that correct? How can I ensure that the inequality constraints do not include 0?
0 个评论
回答(1 个)
John D'Errico
2020-5-26
You cannot easily do so. fmincon assumes that the constraints do allow the bounds as possibilities. In fact, fmincon allows the constraints to be exceeded by TolCon, which is surely a worse scenario in your opinion. And trying to set TolCon to be zero is an artifice that will never leave you happy, because this involves systems of equations, and there is always that little bit of least significant bit crapola that happens, then amplified by the local condition number of the problem.
What can you do? Well, you can add in a fudge factor. Suppose TolCon was 1e-5 (the default). Then you will want an exaggerated set of constraints, of the form
A*X <= b - k*TolCon
where k is some constant larger than 1.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!