mco 패키지의 ngsa2를 사용하여 3 가지 목표로 최적화 문제를 해결하고 싶습니다. 요컨대 환경 문제를 해결하기 위해 최적의 토지 이용을 모색하고 있습니다. 여기 내 실험이 있습니다 : - 100 개의 토지 이용이 가능합니다 (아래 코드의 all.options). 각 토지 이용은 3 가지 공연 (main.goal1, main.goal2 및 main.goal3)이 특징입니다. - 50 개의 필드가 있습니다. 특성 (토양의 토양 Kq)은 100 개의 토지 용도를 부분 집합합니다. 즉, 모든 토지 용도가 각 필드에 대해 가능하지 않습니다. => options.soil1 및 options.soil2글로벌 다중 최적화 기능 사양은 R
내 목표는입니다. maintgoal1, main.goal2 및 main.goal3을 최소화하기 위해 각 50 개 필드에 토지 용도를 지정해야합니다. 내가 읽은 것에서, 유전자 알고리즘은 이러한 유형의 문제에 매우 강력합니다.
여기 내 가상 데이터가 있습니다.
set.seed(0)
all.options<-data.frame(num.option=1:100,main.goal1 = abs(rnorm(100)),
main.goal2 = abs(rnorm(100)),
main.goal3 = abs(rnorm(100))) # all possible combinations of the 3 goals
options.soil1<-subset(all.options, main.goal1>0.5) # possible combinations for soil1
options.soil2<-subset(all.options, main.goal3<0.5) # possible combinations for soil2
fields.Kq<-data.frame(num.field=1:50,soil=round(runif(50,0,1),0))
나는
my.function<-function(x) {
x[1]<-sum(A[,1) # main.goal1 for selected options for each of fields.Kq
x[2]<-sum(A[,2) # main.goal2 for selected options for each of fields.Kq
x[3]<-sum(A[,3) # main.goal3 for selected options for each of fields.Kq
} # where A should be a matrix of 50 lines with one line per field, and #"choosen" land use option
nsga2(my.function)
불행하게도 내가 더 갈 수 없었다처럼 나는 선택이 끝난 토지 이용으로, 행렬 A를 구축하는 방법 R.와 최적화에 새로운 오전 나의 목적 함수가 보일 것입니다 추측 각 분야마다? 그리고이 토지 용도를 반환하는 방법은 무엇입니까? (main.goal1, main.goal2 및 main.goal3에 대한 최적화 된 (최소화 된) 값과 함께)
당신이 나에게 제공 할 수있는 모든 도움을 미리 감사드립니다. 나는 정말로 조언/링크/책을 찾고 있습니다. . 내 최적화 문제에 진출하는
안부를
LH
다음