Optimization of multiple functions for desired output

So I have combined many functions in a final function in order to pass the output of the first function to the input of the second etc.
function [c,n]=final(l,P,T1,T2,T3,N,I,p)
After the final function I have the output which I want to optimize.
Lets say in the end I have a variable A, B and C that the final function has calculated.
I have restriction for every input, and I want to optimize the inputs so I have a minimum value of A, B and C simultaneously.
Is this even possible in Matlab? Can anyone help me?

Antworten (1)

Alan Weiss
Alan Weiss am 8 Dez. 2020

0 Stimmen

I am not sure that I understand what you are trying to do. If you have three variables to minimize, well, either you are fortunate and all three are minimized at the same point, or you are not and then there is a tradeoff between minimizing one or the other. It is not a question of what MATLAB can do, it is a question of whether your problem is well-formulated.
If you want to see a tradeoff surface between the three outputs, use paretosearch from Global Optimization Toolbox. Set the PlotFcn option to 'psplotparetof'.
If I have misunderstood your problem, feel free to clarify.
Alan Weiss
MATLAB mathematical toolbox documentation

3 Kommentare

Well, first of all thank you very much for your quick response. We are doing an optimization of a chemical process so there is no connection between the A,B and C. I understand what you are saying, but is there any way to have a weighted optimization of the 3 variables? I mean that the A variable is more important than the B and more important than C.
Again thank you very much
Katerina
Sure, if you want to optimize a weighted sum of the variables, just make your function something like
function f = objfun(x)
% Do a lot of calculations here, get A, B, C
f = A + B/4 + C/10; % I just made up these weights
end
Alan Weiss
MATLAB mathematical toolbox documentation
Thank you very much for your guidance! I will look into this
Katerina

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 8 Dez. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by