How to set the variables as integers in a Genetic Algorithm Function?
조회 수: 32 (최근 30일)
이전 댓글 표시
Hi,
Supposing the objective function is @(x)f(x(1),x(2)). I would like to set the variable 'x' as a integer in a Genetic Algorithm Function.
How should I do? Is there anyone knowing it?
Thanks, Zheng
댓글 수: 0
채택된 답변
Walter Roberson
2012년 7월 7일
편집: Walter Roberson
2015년 2월 27일
Note that there are a number of restrictions on ga()'s operation when you constrain to integer.
댓글 수: 9
Pratik Anandpara
2017년 3월 22일
how to set it in ga boundry value only in integer lb=[100 1] ub=[500 50]
i want upper and lower boundry value only in integer not in decimal point
Walter Roberson
2017년 3월 22일
Is the general form
x = ga(fitnessfcn,nvars,A,b,[],[],LB,UB,nonlcon,IntCon)
not what you need?
추가 답변 (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!