Using optimization Toolbox without Objective functions, only set of points
古いコメントを表示
I have 4 or 5 input parameters and 1 or 2 output parameters and these inputs and outputs are only points and there is no function, e.g. 3 inputs and 2 outputs, like 10,6,26 inputs and 0.11 , 0.16 as two outputs and in total I have 10 of these set of points (each set has 3 inputs and 2 outputs) and also a simple constraint for each parameter like (a < x1,x2,x3 < b) and now I want to find a combination of these 3 inputs that the sum of my outputs would be less than 0.1, and I want to use e.g. Genetic Algorithm, so it is a possibility that I have several answers or sets of 3 inputs, and that is ok (acceptable) in my case. and Basiclly it is an improvement instead of optimization.
2 件のコメント
omid rastkhiz paydar
2021 年 2 月 16 日
Walter Roberson
2021 年 2 月 16 日
If you want to minimize stress, and stress is returned by that 10*log10 calculation, then do that 10*log10 calculation and return that.
回答 (1 件)
in total I have 10 of these set of points
You are minimizing over a small, finite set of things. Just use min().
11 件のコメント
omid rastkhiz paydar
2021 年 2 月 15 日
omid rastkhiz paydar
2021 年 2 月 15 日
Steven Lord
2021 年 2 月 15 日
You do have an objective function. It's the function that accepts the parameters from the Optimization Toolbox routine, passes those parameters to ANSYS, tells ANSYS to perform whatever calculations are necessary to generate the value you're trying to optimize for those parameter values, and returns the result from ANSYS to the Optimization Toolbox routine.
It's not a function like this:
function y = myobjective(x)
y = 2*x.^2 + 3*x - 4;
end
but it's a function like:
function y = checkGuess(x)
y = input("Perform the experiment for parameter value " + x + ...
" and enter the result of that experiment here.");
end
omid rastkhiz paydar
2021 年 2 月 16 日
Walter Roberson
2021 年 2 月 16 日
You accept inputs, you make a call to ANSYS, you get outputs. Now, given a set of outputs from ANSYS, how would you measure how "good" the result is? Take the magnitude of the largest eigenvalue of one of the results, for example?
omid rastkhiz paydar
2021 年 2 月 16 日
Walter Roberson
2021 年 2 月 16 日
Is summing the error appropriate? Or should you minimize the sum of squares of the error?
omid rastkhiz paydar
2021 年 2 月 16 日
Walter Roberson
2021 年 2 月 16 日
Sum of squares of errors is a scalar that can be returned, and that effectively is the objective function.
Objective functions do not need to be mathematical formulas.
(However, the minimizers might not work correctly if whatever is calculated is not continuous in the parameters.)
If the call to ANSYS is "expensive" then you should have a look at surrogate optimization.
Pedro Pesante Castro
2021 年 5 月 30 日
Hi guys,
Omid, how goes your work? can you provide your code file? I'm very interested in this topic.
カテゴリ
ヘルプ センター および File Exchange で Direct Search についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!