フィルターのクリア

fmincon stopped, Converged to an infeasible point.

7 ビュー (過去 30 日間)
NIKET shah
NIKET shah 2018 年 6 月 28 日
コメント済み: NIKET shah 2018 年 6 月 30 日
Converged to an infeasible point.
fmincon stopped because the size of the current step is less than the default value of the step size tolerance but constraints are not satisfied to within the default value of the constraint tolerance.
if someone knows that this error is all about.. please guide me. Thank you.

採用された回答

Walter Roberson
Walter Roberson 2018 年 6 月 29 日
Your constraints cannot be met.
Your cost function does not even use x(527) or x(528). The lower bounds and upper bounds for those are both 0, which forces the values to be 0. But maybe they are used in the constraints? Yes, they are used in row 43 of the constraints, as are a number of other variables. beq(43) = 0, so the sum of a number of values must be 0. Can any of the values be negative?
lb(find(Aeq(43,:)))
shows all zeros, and the only way for a sum of non-negative values to be zero is if they are all zero, so all of those variables must be zero.
But let's check... are there other variables whose lower and upper bounds are the same? Yes, it turns out there are. So we proceed to
Nx = length(x0);
X = sym('x', [1, Nx], 'real');
ident = lb == ub;
X(ident) = lb(ident);
eqcon = Aeq*X.' - beq;
Each entry in eqcon must be 0 for the constraints to be met, by definition of equality constraints. So examine it. It starts out plausible,
x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13 + x14 + x15 + x16 + x17 + x18 + x19 + x20 + x21 + x22 + x23 + x24 - 33/25
x42 + x43 + x44 + x45 + x46 + x47 + x48 - 13/10
but then the third entry has
149/50
which cannot possibly be equal to zero. There are other rows that cannot be satisfied, such as 13/5 or 36/25 -- twelve in total.
What does the third constraint say?
mask = find(Aeq(3,:))
Aeq(3,mask)
beq(3)
lb(mask)
ub(mask)
mask =
60 61 62
ans =
1 1 1
ans =
1.49
ans =
1.49 1.49 1.49
ans =
1.49 1.49 1.49
This tells us that 1*x(60) + 1*x(61) + 1*x(62) == 1.49 and that x(60), x(61) and x(62) all have lower bounds of 1.49 and upperbounds of 1.49 and so all three values must be exactly 1.49 . But row 3 of Aeq with entry 3 of beq tells that the sum of the three must be 1.49. With the values having to be exactly 1.49 each, their sum must be 3*1.49 and that can never equal merely 1.49.
If you have R2017b or later, I recommend that you rewrite everything in terms of the new Problem Based optimization system, see https://www.mathworks.com/help/optim/ug/optim.problemdef.optimizationproblem.optimproblem.html and https://www.mathworks.com/help/optim/ug/optimization-expressions.html
  9 件のコメント
Walter Roberson
Walter Roberson 2018 年 6 月 30 日
Using the same strategy as I showed above, we can show that Aeq(2,:) cannot be satisfied with your revised code.
Aeq(2,:) is 1 for the 7 locations 42, 43, 44, 45, 46, 47, 48 . lb() for those variables is the same as ub() for those variables, so those variables must each be exactly the bound, which is 0.2167. With there being seven of those 0.2167 being added, the sum is going to be 1.5169 . The sum of those values is required to be beq(2) = 1.3, which is just a small bit less than 6 * 0.2167 .
I guess that you are trying to express that 6 of the values must be 0.2167 and that the 7th must be 0, but as we discussed above you cannot do that with linear constraints.
NIKET shah
NIKET shah 2018 年 6 月 30 日
thank you..

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by