Optimizing a parametrized geometry with genetic algorithm
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello,
My current working state is as follows: I build the geometry in Matlab, export it to Comsol where the FE-Calculation takes place and afterwards I can retrieve the results such as reaction force in Matlab.
My aim is to optimize the geometry in order to get the maximum reaction force. Therefore I want the genetic algorithm to vary the geometric parameters, here for example A. In total there are up to ten, but I'm trying it with one first. If I write
Fmax = @(A)FE_Calculation;
A = optimvar("A","LowerBound",1,"UpperBound",1.5);
I don't succeed in plotting
T0=0.75;
m=472.5;
s=linspace(0,m,m+1);
y2= A .*rem(s/70,T0)./T0+ s/8;
figure(1);
plot(s,y2);
since A is continuous (Error message: "Data must be numeric, datetime, duration or an array convertible to double.") Unfortunately, I need this plot to generate my geometry.
Does anybody have a solution or an idea how to approach this?
I would be very grateful for your help.
댓글 수: 2
Matt J
2022년 8월 24일
I don't succeed in plotting ...since A is continuous
No, A is not continuous. A does not possess value(s) at all!
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!