Error when using optimtool for genetic algorithm
조회 수: 1 (최근 30일)
이전 댓글 표시
My fitness function file is:
function y=asdf(x)
y(1)=(1000000+2000000+1500000+300000+500000+350000+3*x(1)+4*x(1)*0.6+3*x(1)*0.6*0.3+8*x(2)+40*x(3)+4*x(1)*0.6*0.2+4*x(1)*0.6*0.3*0.35+2*x(2)*0.15+80*x(4)+15*x(1)+8*200*x(1)+8*150*x(2)+3*150*x(5)+8*100*(x(3)+x(6))+8*50*(x(7)+x(8))+20*(x(3)+x(6)-x(7)-x(8))+60*(10000-x(7)-x(6)+500-x(8)));
end
There are 8 number of variables.
When I run the code, it says:
"Optimization running.
Error running optimization.
Too many output arguments."
How do I solve this problem?
답변 (0개)
참고 항목
카테고리
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!