Pulling information from main script or function to constraint

조회 수: 2 (최근 30일)
ew1124
ew1124 2018년 11월 14일
편집: ew1124 2018년 11월 14일
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개)

카테고리

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