Pulling information from main script or function to constraint
조회 수: 2 (최근 30일)
이전 댓글 표시
I am interested in solving an optimization problem with MATLAB's gamultiobj function. I have built the function with the options I need. But each problem needs to have a different constraint, which I have saved externally.
I have a separate constraint function that I call. But I don't see how I can include this data in my constraint function. On the other hand I have also built an initial population, and I can use "options" as an input to the function, which gives me a way to pass the data being read in the main function to the population generation function.
How can I do this with the constraint function?
Example: minimize x = p*n
s.t. n * s > y
But for each problem I run, y is different. I have the y values in an external data file.
댓글 수: 0
답변 (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!