Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Generating iterations from Genetic Alogrithim
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to use Genetic Algorithm for optimization.
I have 5 variables (a,b,c,d,e), at the optimized solution, these variables values would be between 0 and 1.5.
The objective function which I want to minimize is x.
I don't want to construct a relation between objective function and these variables due to certain internal complex operations. Instead, I have a software where I plug the values of a,b,c,d,e and it gives be the value of X.
So instead of an equation to optimize I want to use my software to give the result value of X.
So I need to know the code to get next iteration/combination of (a,b,c,d,e) so I can plug them in my software and give the resultant X value to MATLAB so it can update and give me another set of iterations.
댓글 수: 0
답변 (1개)
Steve Grikschat
2012년 11월 12일
Do you have the Global Optimization Toolbox? That's the first step if you want to use GA.
See this on how to set your problem up: http://www.mathworks.com/help/gads/index.html#optimization-problem-setup
Try writing your objective as something like this:
function objectiveVal = myFunction(x)
a = x(1);
b = x(2);
c = x(3);
d = x(4);
e = x(5);
% Call your other software
objectiveVal = otherSoftwareCall(a,b,c,d,e);
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!