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

It is exactly like this case @Chaitanya Sanghavi
I have two contraint variables, lets call them d -diameter and Youngs modulus - E. (d, E are constraint within certain limits)
I want to minimize the stress- "S" induced in the structure depending on "d" and "E".I do not have a direct relationship of S with "d" and "E". I have a big computational model with many functions and scripts. For a specific set of d and E it returns me S.
function [S] = optimize(d,E)
...
...
... FEM model (quite big)....
...
S = 10log10(Incident Load (d,E)/Transmitted Load(d,E));
% Incident Load depends on d,E but this relationship is not known and too complicated to know.
% Transmitted Load depends on d,E but this relationship is not known and too complicated to know.
end
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개)

Matt J
Matt J 2021년 2월 15일
편집: Matt J 2021년 2월 15일
in total I have 10 of these set of points
You are minimizing over a small, finite set of things. Just use min().

댓글 수: 11

What do you mean exactly? min() of what? I meant if you have 10 set of inputs (10 of (x1,x2,x3)) the final results (Optimum point or points) shouldn't be necessarily combination of these numbers, it could be any number for each parameter, and I am not sure if I undersand your answer correctly,
Matt J
Matt J 2021년 2월 15일
편집: Matt J 2021년 2월 15일
Do you know the relationship between inputs and outputs in terms of the unknown parameters? It sounded like you just had a list of 10 possible input/output data combinations.
Actually, I need to make a connection between MATLAB and ANSYS, which works with FEM, and the results I am using is an output of ANSYS, so you can have 10,20 or even more samples of set of inputs, however you don't have a objective function, and just numbers as your output.
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
Yes, exactly, however, I don't know anything about what is happening inside the ANSYS, so that's why I said I don't have a objective function, anyway, do you have any idea how I should do this, since now I am working on how I should make a link between ANSYS and MATLAB, so that is why I said I only have set of numbers as an input, because I am doing it manually ( reading from ANSYS, and giving it to MATLAB).
Thanks to both @Steven Lord, @Matt J
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?
After I got the output from ANSYS, I calculate the difference between these ANSYS ouputs and experiments results, Like, Error(1)= Output_ANSYS(1,1) - experiment(1,1) , Error(2)= Output_ANSYS(2,1) - experiment(2,1), and try to minimize the error, like sum(error)<0.4
Is summing the error appropriate? Or should you minimize the sum of squares of the error?
you are right, however, I just said it in the easiest way of possible, since this is not a part of my issue now. you can do this by checking the value of variance of the outputs. my problem is, how to optimize it with unknown objective function.
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.
Hi guys,
Omid, how goes your work? can you provide your code file? I'm very interested in this topic.

댓글을 달려면 로그인하십시오.

카테고리

제품

릴리스

R2019b

태그

질문:

2021년 2월 15일

댓글:

2021년 5월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by