Genetic Optimization with Probabilistic Constraints

5 views (last 30 days)
Hello, I am modelling the removal of a contaminant in a pond. Given the large variability of environmental inputs, I run a Monte Carlo simulation which, given ranges of input variables and their individual probabilistic distributions, spits out an effluent value associated with the 95th percentile. I am designing my code to reduce the land use of the pond as much as possible while making sure it meets legal limits at a 95th percentile. The way my genetic optimization code is currently set up is the following:
Objective = @ Area f(Pond Dimensions)
A = [];
B = [];
Aeq = [];
Beq = [];
LB= [Pond_Dimension1min Pond_Dimension2min];
UB= [Pond_Dimension1max Pond_Dimension1max];
fun = @(x)this function runs a Monte Carlo simulation and compares the 95th percentile effluent concentration to the set limit concentration given the pond dimensions, making "c" negative if the limit is not met.
[a]=ga(Objective,3,A,B,Aeq,Beq,LB,UB,fun);
As it stands, the code does not seem to find the best solutions given the minimum and maximum pond dimensions. Is my nonlinear constraint set up wrong?
  1 Comment
Arvind Narayanan
Arvind Narayanan on 26 Jun 2018
Hi,
Please refer the documentation for ga function: https://in.mathworks.com/help/gads/ga.html#d119e36098
Here, it lists that the non-linear constraints for the ga function are to be specified in such a way that it returns two arrays, c(x) and ceq(x).
c(x) is the array of nonlinear inequality constraints at x. ga attempts to satisfy
c(x) <= 0
for all entries of c.
ceq(x) is the array of nonlinear equality constraints at x. ga attempts to satisfy
ceq(x) = 0
for all entries of ceq. I hope you have taken this into consideration appropriately when specifying the arguments to the ga function.
Additionally, it would be a good idea for you to share the script that you are using to test the behavior of the ga function in this scenario. Please share the original script or a sample so that we can understand this further.
Thanks,
Arvind

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!