Optimization: Function taking a variable value from out of the bounds
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
(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 commentaires
Torsten
le 15 Mar 2018
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.
Réponses (0)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!