Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Hello everyone, Can I use predefined scattered values for the variables used in Genetic algorithms instead of ranges?
조회 수: 1 (최근 30일)
이전 댓글 표시
Can I use predefined scattered values for the variables used in Genetic algorithms instead of ranges?
EX.
I have 2 variables to be obtimized using an objective function; I have 5 scaterred values for each variable and want to use them instead of using ranges(upper and lower bounds).
댓글 수: 0
답변 (1개)
John D'Errico
2019년 2월 22일
Well, you can, IF that is correct for your problem.
For example, suppose you knew that you wanted variable x to take on 5 different values, and ONLY those 5 values. What is more, the values of interest are scattered. (Why? Hey, that is your problem to know.) For example, suppose x can take only the values [1, 2.5, 3.14, 5.653, 12.2].
Just tell GA that x is integer valued, taking on the values only [1 2 3 4 5]. Then inside your objective function, remap the integers [1:5] into [1, 2.5, 3.14, 5.653, 12.2]. This is just a table lookup.
Sorry, I don't have the Global optimization toolbox, so I don't have the syntax to give you an example.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!