Quadratic programming: 'The problem is infeasible' error due to negative boundary limits

8 ビュー (過去 30 日間)
Naser Khan
Naser Khan 2020 年 9 月 30 日
編集済み: Matt J 2020 年 10 月 8 日
Hi all,
I am working on an optimisation problem with both equality and inequality contstraints applied to a quadratic cost function. The cost function is essentially to minimise the power requirements from multiple power sources onboard an an electric vehicle. I am using the Optimization toolbox in Matlab 2018b version.
The issue arises when I am attempting to set a negative cycle (-ve power values) to one of the constraints which is lower than the maximum negative power value. Once I set this constraint value to something equal or greater than the maximum negative power value the issue disappears. However, this is undesirable in my optimisation problem. The same issue with is resolved using fmicon algorithm but the computation time is enormous. Also, I have tried using all the applicable solvers for Quadprog but to no avail.
I have attached part of my code relevant to the question without variable definitions. The issue in the code I suspect is to do with the 'Pbmin' variable which is used in constraint #4.
Thanks
  2 件のコメント
Matt J
Matt J 2020 年 9 月 30 日
I have attached part of my code relevant to the question without variable definitions.
Without variable defintiions, we can't run it...
Naser Khan
Naser Khan 2020 年 9 月 30 日
Hi Matt,
Please see the attached .m and .mat file to run the code.
The 'Pbmin' value is currently set to 6000 - higher than desired. However, when I lower this value to below 4207 (value from another required parameter) the solver gives me an error and does not provide any optimised values.
Could you advise what the issue is?
Many thanks,

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

採用された回答

Matt J
Matt J 2020 年 10 月 4 日
編集済み: Matt J 2020 年 10 月 4 日
I think your constraints are genuinely infeasible when Pbmin=4207. You claim that fmincon sees the problem as feasible, but that is not what I find, according to the following test.
X0 = zeros(2*N,1); %Initial guess
LB = [zeros(N,1);ones(N,1)*-Pbmin]; % P_fc > 0
UB = [4000*ones(N,1); Pbmax*ones(N,1)];
A= [zeros(N,N) (Ts/Q_bat)*tril(ones(N,N))];
b= ones(N,1)*(SoC_0 - SoC_min);
Aeq = [eye(N,N) eye(N,N)];
beq = Pv;
opts = optimoptions('fmincon','SpecifyObjectiveGradient',true,'Algorithm','sqp');
tic
[PS, fval1] = fmincon(@objfunc,X0,A,b,Aeq,beq,LB,UB,[],opts);
toc
function [fval,grad]=objfunc(x) %Objective is uniformly = 0. Doesn't matter for feasibility search
fval=0;
if nargout>1, grad=zeros( size(x) ); end
end
The result that I get from the above is
Converged to an infeasible point.
fmincon stopped because the size of the current step is less than
the value of the step size tolerance but constraints are not
satisfied to within the value of the constraint tolerance.
<stopping criteria details>
Elapsed time is 7.033446 seconds.
  2 件のコメント
Naser Khan
Naser Khan 2020 年 10 月 8 日
Hi there,
Thanks for your effort. With Pbmin = -6000 I see optimised results with Matlab providing me the message below;
Minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the optimality tolerance,
and constraints are satisfied to within the default value of the constraint tolerance.
However, this does not fulfil an essential objective of mine i.e. to limit the Pbmin value to below 2000. I am unsure why this is the case, Matlab is failing to provide me with an accurate troubleshooting method. Could it be that the solver is not capable enough? I am now considering to use a third party optimizer.
Thanks
Matt J
Matt J 2020 年 10 月 8 日
編集済み: Matt J 2020 年 10 月 8 日
The likely cause is an error in the constraint data that you have given to the solver. Matlab can't help you troubleshoot bad input data, unfortunately, because it has no way to know what data you really intended to provide it. There's nothing wrong with a second opinion if you want to try a third party optimizer, but if you get the same result, I hope you will come back here and Accept-click my answer.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by