Pulling information from main script or function to constraint
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!