Optimization: Function taking a variable value from out of the bounds

1 次查看(过去 30 天)
(Files attached)
x0 = abs([0.01, 1, 283.15, 8, 10]);
%options = optimset('PlotFcns',@optimplotfval);
fitnessfcn = @(x)Lobo(x(1), x(2), x(3), x(4), x(5));
nonlcon1 = @(x)nonlcon(x(1), x(2), x(3), x(4), x(5));
lb = abs([0.01, 1, 283.15, 8, 10]);
ub = abs([10, 18.3, 1473.15 ,20, 50]);
[X, fval] = fmincon(fitnessfcn, x0, [], [], [], [], lb, ub, nonlcon1);
I am getting imaginary values of intermediary equations in Lobo because d0 (diameter) is going below 0. Why is this happening? Also, the calculated value of MATLAB do not match the manually calculated value (calculator). e.g. F cannot be beyond 1 and when a calculator is applied to the same formula it comes around 0.1.
Result: F =
1.0087
1.0087
d0 =
-1.1697e+003
-1.1697e+003
h0 =
1.0303e+014 -7.4856e+013i
1.0303e+014 -7.4856e+013i
Tw =
314.2630
314.2630
Lf =
0.3670
0.3670
tf =
0.0025
0.0025
dbc =
0.0067
0.0067
cbt =
1.5030
1.5030
dtc =
1.5097
1.5097
ntubes =
1.5097
1.5097
Ar =
5.6371e+003
5.6371e+003
qr =
2.3992e+017 -1.7431e+017i
2.3992e+017 -1.7431e+017i
  8 个评论
Devdatt Thengdi
Devdatt Thengdi 2018-3-15
编辑:Devdatt Thengdi 2018-3-15
It is after some iterations. And how does this explain it? I mean I have set limits on the variables. I have set a nonlcon (on qr) so, there must some set of d0, L, Tg, nb, uo which qr lies between 32000:45000. What am I missing out on here? Is the program forcing values(d0) out of the bounds because there exists no qr (in the given range) for the given range of d0? Am I correct here?
Torsten
Torsten 2018-3-15
This might be the reason.
I suggest you make a pattern search:
Take a certain number of values for the variables d0, L, Tg, nb and uo between their respective lower and upper limits. Then calculate qr and qout for all combinations of these values and inspect whether you get feasible points for your problem.
Best wishes
Torsten.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by