exhaustive search matlab with 4 variables

1 view (last 30 days)
Hello, i used genetic algorithm to find the minimum of a 4 variable(x1,x2,x3,x4) objective function(output result1). Now, to evaluate the results i need to run an exhaustive search in the following manner:I will keep x1,x2 constant and x3 x4 will take n values between their uppper and lower bounds with a fixed step.I will need to store the results to different vectors to see the combination of x1,x2,x3,x4 that minimizes result1(the output of the objective function). X1,x2,x3,x4 have also linear and non linear contraints which are implemented in the genetic algorithm Any ideas are welcome.

Accepted Answer

Alan Weiss
Alan Weiss on 5 May 2014
Your suggested method of evaluating the quality of your soloution is not necessarily the best. Instead, I suggest that you use patternsearch starting from a variety of initial points, including the final point ga returned. If you start patternsearch from a grid of initial points, or from a random sample of initial points within your bounds, I would bet that you get at least as good an answer as you got by the genetic algorithm, and the total computational time will be far lower.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  1 Comment
Anastasios
Anastasios on 6 May 2014
I am thinking of using Multistart with a CustomStartPointSet(uniform grid including the solution of the genetic).Is there an easy way to store all the results(objective function) of the Multistart initial points to a vector and plot them to create the objective function graph.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!