필터 지우기
필터 지우기

how to use bit string in fitness ga(tool) genetic algorithm matlab

조회 수: 1 (최근 30일)
mohammed sportman
mohammed sportman 2012년 12월 20일
i have problem in my program routing(ga tool) when i find the result i want the ga tool to stop but it still running until the generation equal 0 ; i use the bit string type so i want way to put condition in my project to stop the running when find the first solution for example (ans = 100)
--------- my code---------
function g =myfitness2(X)
LAMDA=X(1)+X(2)*2+X(3)*4+X(4)*8+X(5)*16
TYPE=1;
ITER=1000;
R1=Routing3a(TYPE,LAMDA,ITER);
g=-R1
end
........
result of program it
LAMDA 3
g=33.25
LAMDA 17
g=-100
LAMDA 11
g=-100

답변 (0개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by